diff options
-rw-r--r-- | llc.h | 5 | ||||
-rw-r--r-- | print-llc.c | 28 | ||||
-rw-r--r-- | print-sll.c | 9 |
3 files changed, 39 insertions, 3 deletions
@@ -18,7 +18,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.8 2000-12-18 07:55:36 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/llc.h,v 1.9 2001-01-15 00:33:59 guy Exp $ (LBL) */ /* @@ -118,3 +118,6 @@ struct llc { #ifndef LLCSAP_ISONS #define LLCSAP_ISONS 0xfe #endif +#ifndef LLCSAP_IPX +#define LLCSAP_IPX 0xe0 +#endif diff --git a/print-llc.c b/print-llc.c index 2e30d8b4..880f7488 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.32 2000-12-18 07:55:36 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.33 2001-01-15 00:33:59 guy Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -81,6 +81,15 @@ llc_print(const u_char *p, u_int length, u_int caplen, memcpy((char *)&llc, (char *)p, min(caplen, sizeof(llc))); if (llc.ssap == LLCSAP_GLOBAL && llc.dsap == LLCSAP_GLOBAL) { + /* + * This is an Ethernet_802.3 IPX frame; it has an + * 802.3 header (i.e., an Ethernet header where the + * type/length field is <= ETHERMTU, i.e. it's a length + * field, not a type field), but has no 802.2 header - + * the IPX packet starts right after the Ethernet header, + * with a signature of two bytes of 0xFF (which is + * LLCSAP_GLOBAL). + */ ipx_print(p, length); return (1); } @@ -97,6 +106,23 @@ llc_print(const u_char *p, u_int length, u_int caplen, stp_print(p, length); return (1); } + + if (llc.ssap == LLCSAP_IPX && llc.dsap == LLCSAP_IPX && + llc.llcui == LLC_UI) { + /* + * This is an Ethernet_802.2 IPX frame, with an 802.3 + * header and an 802.2 LLC header with the source and + * destination SAPs being the IPX SAP. + * + * Skip DSAP, LSAP, and control field. + */ + p += 3; + length -= 3; + caplen -= 3; + ipx_print(p, length); + return (1); + } + if (llc.ssap == 0xf0 && llc.dsap == 0xf0 && (!(llc.llcu & LLC_S_FMT) || llc.llcu == LLC_U_FMT)) { /* diff --git a/print-sll.c b/print-sll.c index b3f70ccf..cd0596c3 100644 --- a/print-sll.c +++ b/print-sll.c @@ -20,7 +20,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.3 2000-12-23 20:49:34 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-sll.c,v 1.4 2001-01-15 00:33:59 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -200,6 +200,13 @@ sll_if_print(u_char *user, const struct pcap_pkthdr *h, const u_char *p) */ switch (ether_type) { + case LINUX_SLL_P_802_3: + /* + * Ethernet_802.3 IPX frame. + */ + ipx_print(p, length); + break; + case LINUX_SLL_P_802_2: /* * 802.2. |