From: hannes Date: Thu, 22 May 2003 16:52:36 +0000 (+0000) Subject: don't pass on src & dst MAC adresses to the isoclns decoder as MAC adresses X-Git-Tag: tcpdump-3.8-bp~132 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/8f94d68a09e1103353cc7d1133d6dfdf7d5a920d?hp=91a5c5da51e5b1ffcb8990c9a42ac70668901d41 don't pass on src & dst MAC adresses to the isoclns decoder as MAC adresses should be really printed in ether_print() using the eflag --- diff --git a/print-chdlc.c b/print-chdlc.c index 14d325a4..36ddd0d7 100644 --- a/print-chdlc.c +++ b/print-chdlc.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.27 2002-12-19 09:39:11 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-chdlc.c,v 1.28 2003-05-22 16:52:36 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -100,9 +100,9 @@ chdlc_if_print(const struct pcap_pkthdr *h, register const u_char *p) if (*(p+CHDLC_HDRLEN+1) == 0x81 || *(p+CHDLC_HDRLEN+1) == 0x82 || *(p+CHDLC_HDRLEN+1) == 0x83) - isoclns_print(p+CHDLC_HDRLEN+1, length-1, length-1, NULL, NULL); + isoclns_print(p+CHDLC_HDRLEN+1, length-1, length-1); else - isoclns_print(p+CHDLC_HDRLEN, length, length, NULL, NULL); + isoclns_print(p+CHDLC_HDRLEN, length, length); break; default: printf("unknown CHDLC protocol (0x%04x)", proto); diff --git a/print-fr.c b/print-fr.c index 03f2ce4e..199dec6c 100644 --- a/print-fr.c +++ b/print-fr.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.11 2002-12-19 09:39:12 guy Exp $ (LBL)"; + "@(#)$Header: /tcpdump/master/tcpdump/print-fr.c,v 1.12 2003-05-22 16:52:37 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -245,7 +245,7 @@ fr_if_print(const struct pcap_pkthdr *h, register const u_char *p) case NLPID_CLNP: case NLPID_ESIS: case NLPID_ISIS: - isoclns_print(p, length, caplen, NULL, NULL); + isoclns_print(p, length, caplen); break; case NLPID_SNAP: diff --git a/print-gre.c b/print-gre.c index 95cef154..1ec298f8 100644 --- a/print-gre.c +++ b/print-gre.c @@ -38,7 +38,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.21 2002-10-31 07:17:02 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-gre.c,v 1.22 2003-05-22 16:52:37 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -187,7 +187,7 @@ gre_print_0(const u_char *bp, u_int length) ip_print(bp, len); break; case GREPROTO_ISO: - isoclns_print(bp, len, len, NULL, NULL); + isoclns_print(bp, len, len); break; default: printf("gre-proto-0x%x", prot); diff --git a/print-isoclns.c b/print-isoclns.c index 2f608881..ab5135cc 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.83 2003-05-10 16:33:07 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.84 2003-05-22 16:52:37 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -479,8 +479,7 @@ print_nsap(register const u_int8_t *pptr, register int nsap_length) #define ISIS_CSNP_HEADER_SIZE (sizeof(struct isis_csnp_header)) #define ISIS_PSNP_HEADER_SIZE (sizeof(struct isis_psnp_header)) -void isoclns_print(const u_int8_t *p, u_int length, u_int caplen, - const u_int8_t *esrc, const u_int8_t *edst) +void isoclns_print(const u_int8_t *p, u_int length, u_int caplen) { u_int8_t pdu_type; const struct isis_common_header *header; @@ -488,11 +487,7 @@ void isoclns_print(const u_int8_t *p, u_int length, u_int caplen, header = (const struct isis_common_header *)p; pdu_type = header->pdu_type & PDU_TYPE_MASK; - printf("%sOSI ", caplen < 1 ? "|" : ""); - if (!eflag && esrc != NULL && edst != NULL) - (void)printf("%s > %s, ", - etheraddr_string(esrc), - etheraddr_string(edst)); + printf("%sOSI", caplen < 1 ? "|" : ""); if (caplen < 1) /* enough bytes on the wire ? */ return; @@ -500,7 +495,7 @@ void isoclns_print(const u_int8_t *p, u_int length, u_int caplen, switch (*p) { case NLPID_CLNS: - (void)printf("CLNS, length: %u", length); + (void)printf(", CLNS, length %u", length); break; case NLPID_ESIS: @@ -513,11 +508,11 @@ void isoclns_print(const u_int8_t *p, u_int length, u_int caplen, break; case NLPID_NULLNS: - (void)printf("ISO NULLNS, length: %u", length); + (void)printf(", ISO NULLNS, length: %u", length); break; default: - (void)printf("Unknown NLPID 0x%02x, length: %u", p[0], length); + (void)printf(", Unknown NLPID 0x%02x, length: %u", p[0], length); if (caplen > 1) print_unknown_data(p,"\n\t",caplen); break; @@ -578,7 +573,7 @@ esis_print(const u_int8_t *p, u_int length) return; } - printf("ES-IS, %s, length: %u", + printf(", ES-IS, %s, length %u", tok2str(esis_values,"unknown type: %u",eh->type & 0x1f), length); @@ -1293,7 +1288,7 @@ static int isis_print (const u_int8_t *p, u_int length) /* in non-verbose mode just lets print the basic PDU Type*/ if (vflag < 1) { - printf("IS-IS, %s, length: %u", + printf(", IS-IS, %s, length %u", tok2str(isis_pdu_values,"unknown PDU-Type %u",pdu_type), length); return(1); diff --git a/print-llc.c b/print-llc.c index c245f958..f4300f8a 100644 --- a/print-llc.c +++ b/print-llc.c @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.51 2002-11-13 16:08:39 hannes Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.52 2003-05-22 16:52:38 hannes Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -171,7 +171,7 @@ llc_print(const u_char *p, u_int length, u_int caplen, #endif if (llc.ssap == LLCSAP_ISONS && llc.dsap == LLCSAP_ISONS && llc.llcui == LLC_UI) { - isoclns_print(p + 3, length - 3, caplen - 3, esrc, edst); + isoclns_print(p + 3, length - 3, caplen - 3); return (1); } diff --git a/print-mpls.c b/print-mpls.c index 67e974bb..7161b7b3 100644 --- a/print-mpls.c +++ b/print-mpls.c @@ -28,7 +28,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.7 2003-05-08 15:05:41 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-mpls.c,v 1.8 2003-05-22 16:52:38 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -168,7 +168,7 @@ mpls_print(const u_char *bp, u_int length) case 0x83: if (vflag>0) { printf("\n\t"); - isoclns_print(p, length - (p - bp), length - (p - bp), NULL, NULL); + isoclns_print(p, length - (p - bp), length - (p - bp)); } else printf(", OSI, length: %u",length); break; diff --git a/print-null.c b/print-null.c index a0bd3c17..f0c246d6 100644 --- a/print-null.c +++ b/print-null.c @@ -21,7 +21,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.48 2003-02-05 02:28:45 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-null.c,v 1.49 2003-05-22 16:52:38 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -175,7 +175,7 @@ null_if_print(const struct pcap_pkthdr *h, const u_char *p) #endif case BSD_AF_ISO: - isoclns_print(p, length, caplen, NULL, NULL); + isoclns_print(p, length, caplen); break; case BSD_AF_APPLETALK: diff --git a/print-ppp.c b/print-ppp.c index 01159329..3067bbdf 100644 --- a/print-ppp.c +++ b/print-ppp.c @@ -31,7 +31,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.87 2003-05-22 15:54:53 hannes Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-ppp.c,v 1.88 2003-05-22 16:52:38 hannes Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -990,7 +990,7 @@ handle_ppp(u_int proto, const u_char *p, int length) ipx_print(p, length); break; case PPP_OSI: - isoclns_print(p, length, length, NULL, NULL); + isoclns_print(p, length, length); break; case PPP_MPLS_UCAST: case PPP_MPLS_MCAST: