]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Don't print the LLC header stuff if it's an 802.3 IPX frame - there
authorguy <guy>
Tue, 26 Apr 2005 03:51:38 +0000 (03:51 +0000)
committerguy <guy>
Tue, 26 Apr 2005 03:51:38 +0000 (03:51 +0000)
isn't an LLC header on those frames.

print-llc.c

index 3c1fd54f93dd8ad59f26ae51d47f0c85b5b01d16..06d0d296d003de476ca7caee4b2236194ae93d65 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.63 2005-04-26 03:38:09 guy Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-llc.c,v 1.64 2005-04-26 03:51:38 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -129,14 +129,6 @@ llc_print(const u_char *p, u_int length, u_int caplen,
        /* Watch out for possible alignment problems */
        memcpy((char *)&llc, (char *)p, min(caplen, sizeof(llc)));
 
-       if (eflag)
-         printf("LLC, dsap %s (0x%02x), ssap %s (0x%02x), cmd 0x%02x: ",
-                 tok2str(llc_values,"Unknown",llc.dsap),
-                llc.dsap,
-                 tok2str(llc_values,"Unknown",llc.ssap),
-                llc.ssap,
-                llc.llcu);
-
        if (llc.ssap == LLCSAP_GLOBAL && llc.dsap == LLCSAP_GLOBAL) {
                /*
                 * This is an Ethernet_802.3 IPX frame; it has an
@@ -160,6 +152,14 @@ llc_print(const u_char *p, u_int length, u_int caplen,
             return (1);
        }
 
+       if (eflag)
+         printf("LLC, dsap %s (0x%02x), ssap %s (0x%02x), cmd 0x%02x: ",
+                 tok2str(llc_values,"Unknown",llc.dsap),
+                llc.dsap,
+                 tok2str(llc_values,"Unknown",llc.ssap),
+                llc.ssap,
+                llc.llcu);
+
        if (llc.ssap == LLCSAP_8021D && llc.dsap == LLCSAP_8021D) {
                stp_print(p, length);
                return (1);