]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Skip the LLC header after printing information for it.
authorGuy Harris <[email protected]>
Sat, 18 Apr 2015 17:51:17 +0000 (10:51 -0700)
committerGuy Harris <[email protected]>
Sat, 18 Apr 2015 17:51:17 +0000 (10:51 -0700)
No effect on behavior, but looks a bit nicer.

print-llc.c

index 3839240a411d199710fdaf549e53ff7fcad3f2ee..1398e99624eb0d8a2eac50c32d405ea73d08adee 100644 (file)
@@ -230,13 +230,6 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen,
        dsap = dsap_field & ~LLC_IG;
        ssap = ssap_field & ~LLC_GSAP;
 
-       /*
-        * Skip LLC header.
-        */
-       p += hdrlen;
-       length -= hdrlen;
-       caplen -= hdrlen;
-
        if (ndo->ndo_eflag) {
                 ND_PRINT((ndo, "LLC, dsap %s (0x%02x) %s, ssap %s (0x%02x) %s",
                        tok2str(llc_values, "Unknown", dsap),
@@ -253,6 +246,13 @@ llc_print(netdissect_options *ndo, const u_char *p, u_int length, u_int caplen,
                }
        }
 
+       /*
+        * Skip LLC header.
+        */
+       p += hdrlen;
+       length -= hdrlen;
+       caplen -= hdrlen;
+
        if (ssap == LLCSAP_SNAP && dsap == LLCSAP_SNAP
            && control == LLC_UI) {
                /*