summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/print-ipx.c
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2002-06-21 00:49:02 +0000
committerfenner <fenner@FreeBSD.org>2002-06-21 00:49:02 +0000
commit6d9538de202e4b8787f1b1a2ee8dce6273a43dc2 (patch)
treecf4df09e1e89ebd11358792543230083e577ad0f /contrib/tcpdump/print-ipx.c
parentd832be42ce7cc0a492cddc15e8429bc29fb46462 (diff)
downloadFreeBSD-src-6d9538de202e4b8787f1b1a2ee8dce6273a43dc2.zip
FreeBSD-src-6d9538de202e4b8787f1b1a2ee8dce6273a43dc2.tar.gz
Merge tcpdump 3.7.1
MFC after: 2 weeks
Diffstat (limited to 'contrib/tcpdump/print-ipx.c')
-rw-r--r--contrib/tcpdump/print-ipx.c37
1 files changed, 23 insertions, 14 deletions
diff --git a/contrib/tcpdump/print-ipx.c b/contrib/tcpdump/print-ipx.c
index 867634c..9a4f60a 100644
--- a/contrib/tcpdump/print-ipx.c
+++ b/contrib/tcpdump/print-ipx.c
@@ -26,7 +26,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.27 2000/09/29 04:58:41 guy Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-ipx.c,v 1.32 2001/10/08 21:25:20 fenner Exp $";
#endif
#ifdef HAVE_CONFIG_H
@@ -110,10 +110,22 @@ ipx_decode(const struct ipxHdr *ipx, const u_char *datap, u_int length)
break;
case IPX_SKT_NETBIOS:
(void)printf(" ipx-netbios %d", length);
+#ifdef TCPDUMP_DO_SMB
+ ipx_netbios_print(datap, length);
+#endif
break;
case IPX_SKT_DIAGNOSTICS:
(void)printf(" ipx-diags %d", length);
break;
+ case IPX_SKT_NWLINK_DGM:
+ (void)printf(" ipx-nwlink-dgm %d", length);
+#ifdef TCPDUMP_DO_SMB
+ ipx_netbios_print(datap, length);
+#endif
+ break;
+ case IPX_SKT_EIGRP:
+ (void)printf(" ipx-eigrp %d", length);
+ break;
default:
(void)printf(" ipx-#%x %d", dstSkt, length);
break;
@@ -138,12 +150,8 @@ ipx_sap_print(const u_short *ipx, u_int length)
else
(void)printf("ipx-sap-nearest-req");
- if (length > 0) {
- TCHECK(ipx[1]);
- (void)printf(" %x '", EXTRACT_16BITS(&ipx[0]));
- fn_print((u_char *)&ipx[1], (u_char *)&ipx[1] + 48);
- putchar('\'');
- }
+ TCHECK(ipx[0]);
+ (void)printf(" %x", EXTRACT_16BITS(&ipx[0]));
break;
case 2:
@@ -154,7 +162,7 @@ ipx_sap_print(const u_short *ipx, u_int length)
(void)printf("ipx-sap-nearest-resp");
for (i = 0; i < 8 && length > 0; i++) {
- TCHECK2(ipx[27], 1);
+ TCHECK2(ipx[25], 10);
(void)printf(" %x '", EXTRACT_16BITS(&ipx[0]));
fn_print((u_char *)&ipx[1], (u_char *)&ipx[1] + 48);
printf("' addr %s",
@@ -164,12 +172,12 @@ ipx_sap_print(const u_short *ipx, u_int length)
}
break;
default:
- (void)printf("ipx-sap-?%x", command);
+ (void)printf("ipx-sap-?%x", command);
break;
}
- return;
+ return;
trunc:
- printf("[|ipx %d]", length);
+ printf("[|ipx %d]", length);
}
void
@@ -203,10 +211,11 @@ ipx_rip_print(const u_short *ipx, u_int length)
}
break;
default:
- (void)printf("ipx-rip-?%x", command);
+ (void)printf("ipx-rip-?%x", command);
+ break;
}
- return;
+ return;
trunc:
- printf("[|ipx %d]", length);
+ printf("[|ipx %d]", length);
}
OpenPOWER on IntegriCloud