]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pppoe.c
Address Michael's comments.
[tcpdump] / print-pppoe.c
index 0c0b8f7b1a1feab384b91fc5c7c4c7c13a508da0..bcc976c4b7981c768049978263bf417952f67ece 100644 (file)
@@ -23,7 +23,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.30 2004-08-27 03:57:41 guy Exp $ (LBL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-pppoe.c,v 1.31 2005-04-26 19:48:38 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -70,6 +70,7 @@ enum {
        PPPOE_AC_COOKIE = 0x0104,
        PPPOE_VENDOR = 0x0105,
        PPPOE_RELAY_SID = 0x0110,
+       PPPOE_MAX_PAYLOAD = 0x0120,
        PPPOE_SERVICE_NAME_ERROR = 0x0201,
        PPPOE_AC_SYSTEM_ERROR = 0x0202,
        PPPOE_GENERIC_ERROR = 0x0203
@@ -83,6 +84,7 @@ static struct tok pppoetag2str[] = {
        { PPPOE_AC_COOKIE, "AC-Cookie" },
        { PPPOE_VENDOR, "Vendor-Specific" },
        { PPPOE_RELAY_SID, "Relay-Session-ID" },
+       { PPPOE_MAX_PAYLOAD, "PPP-Max-Payload" },
        { PPPOE_SERVICE_NAME_ERROR, "Service-Name-Error" },
        { PPPOE_AC_SYSTEM_ERROR, "AC-System-Error" },
        { PPPOE_GENERIC_ERROR, "Generic-Error" },
@@ -138,21 +140,6 @@ pppoe_print(register const u_char *bp, u_int length)
                printf(" [ses 0x%x]", pppoe_sessionid);
        }
 
-       if (pppoe_length < length && length + ETHER_HDRLEN > 60) {
-               /* (small packets are probably just padded up to the ethernet
-                  minimum of 60 bytes of data + 4 bytes of CRC) */
-               printf(" [length %u (%u extra bytes)]",
-                   pppoe_length, length - pppoe_length);
-#if RESPECT_PAYLOAD_LENGTH
-               if (snaplend > pppoe_payload+pppoe_length)
-                       snapend = pppoe_payload+pppoe_length;
-#else
-               /* Actual PPPoE implementations appear to ignore the payload
-                  length and use the full ethernet frame anyways */
-               pppoe_length = length;
-#endif
-       }
-
        if (pppoe_code) {
                /* PPP session packets don't contain tags */
                u_short tag_type = 0xffff, tag_len;