X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/677dfa2dd1f1620c1a90bdce66f0571289800270..bdd6be1239614cf13b51aa0c893245ad2a0e2929:/print-isoclns.c diff --git a/print-isoclns.c b/print-isoclns.c index d1332956..f610fd32 100644 --- a/print-isoclns.c +++ b/print-isoclns.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.98 2003-10-21 23:04:23 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.102 2003-10-28 19:10:15 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -694,7 +694,7 @@ static char * isis_print_id(const u_int8_t *cp, int id_len) { int i; - static char id[21]; + static char id[sizeof("xxxx.xxxx.xxxx.yy-zz")]; char *pos = id; for (i = 1; i <= SYSTEM_ID_LEN; i++) { @@ -1229,7 +1229,10 @@ static int isis_print (const u_int8_t *p, u_int length) case L1_LAN_IIH: case L2_LAN_IIH: - printf(", source-id %s", isis_print_id(header_iih_lan->source_id,SYSTEM_ID_LEN)); + printf(", source-id %s", + isis_print_id(header_iih_lan->source_id,SYSTEM_ID_LEN)); + printf(", DIS lan-id %s", + isis_print_id(header_iih_lan->lan_id,NODE_ID_LEN)); break; case PTP_IIH: printf(", source-id %s", isis_print_id(header_iih_ptp->source_id,SYSTEM_ID_LEN)); @@ -1293,14 +1296,14 @@ static int isis_print (const u_int8_t *p, u_int length) } TCHECK(*header_iih_lan); - printf("\n\t source-id: %s, holding time: %us, Flags: [%s]", + printf("\n\t source-id: %s, holding time: %us, Flags: [%s]", isis_print_id(header_iih_lan->source_id,SYSTEM_ID_LEN), EXTRACT_16BITS(header_iih_lan->holding_time), tok2str(isis_iih_circuit_type_values, "unknown circuit type 0x%02x", header_iih_lan->circuit_type)); - printf("\n\t lan-id: %s, Priority: %u, PDU length: %u", + printf("\n\t DIS lan-id: %s, Priority: %u, PDU length: %u", isis_print_id(header_iih_lan->lan_id, NODE_ID_LEN), (header_iih_lan->priority) & PRIORITY_MASK, pdu_len); @@ -1328,13 +1331,15 @@ static int isis_print (const u_int8_t *p, u_int length) } TCHECK(*header_iih_ptp); - printf("\n\t source-id: %s, holding time: %us, circuit-id: 0x%02x, %s, PDU length: %u", + printf("\n\t source-id: %s, holding time: %us, Flags: [%s]", isis_print_id(header_iih_ptp->source_id,SYSTEM_ID_LEN), EXTRACT_16BITS(header_iih_ptp->holding_time), - header_iih_ptp->circuit_id, tok2str(isis_iih_circuit_type_values, "unknown circuit type 0x%02x", - header_iih_ptp->circuit_type), + header_iih_ptp->circuit_type)); + + printf("\n\t circuit-id: 0x%02x, PDU length: %u", + header_iih_ptp->circuit_id, pdu_len); if (vflag > 1) { @@ -1441,8 +1446,9 @@ static int isis_print (const u_int8_t *p, u_int length) } TCHECK(*header_psnp); - printf("\n\t source-id: %s", - isis_print_id(header_psnp->source_id, NODE_ID_LEN)); + printf("\n\t source-id: %s, PDU length: %u", + isis_print_id(header_psnp->source_id, NODE_ID_LEN), + pdu_len); if (vflag > 1) { if(!print_unknown_data(pptr,"\n\t ",ISIS_PSNP_HEADER_SIZE)) @@ -1513,7 +1519,7 @@ static int isis_print (const u_int8_t *p, u_int length) while (tmp >= ETHER_ADDR_LEN) { if (!TTEST2(*tptr, ETHER_ADDR_LEN)) goto trunctlv; - printf("\n\t IS Neighbor: %s",isis_print_id(tptr,ETHER_ADDR_LEN)); + printf("\n\t SNPA: %s",isis_print_id(tptr,ETHER_ADDR_LEN)); tmp -= ETHER_ADDR_LEN; tptr += ETHER_ADDR_LEN; } @@ -1795,7 +1801,7 @@ static int isis_print (const u_int8_t *p, u_int length) if (!TTEST2(*tptr, 1)) goto trunctlv; - printf(", %s", ISIS_MASK_TLV_SHARED_RISK_GROUP(*tptr++) ? "numbered" : "unnumbered"); + printf(", Flags: [%s]", ISIS_MASK_TLV_SHARED_RISK_GROUP(*tptr++) ? "numbered" : "unnumbered"); tmp--; if (!TTEST2(*tptr,4))