]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ether.c
Use EXTRACT_16BITS to extract big-endian 16-bit quantities from the packet.
[tcpdump] / print-ether.c
index 441cee0f1afd5cfb69a1aad7ecbc9e18f7c8a35e..20a2a65fb868eff1acb5c563bd89c8629983062d 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.103 2006-10-12 10:26:12 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.106 2008-02-06 10:47:53 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -56,6 +56,7 @@ const struct tok ethertype_values[] = {
     { ETHERTYPE_DN,             "DN" },
     { ETHERTYPE_LAT,            "LAT" },
     { ETHERTYPE_SCA,            "SCA" },
+    { ETHERTYPE_TEB,            "TEB" },
     { ETHERTYPE_LANBRIDGE,      "Lanbridge" },
     { ETHERTYPE_DECDNS,         "DEC DNS" },
     { ETHERTYPE_DECDTS,         "DEC DTS" },
@@ -70,11 +71,14 @@ const struct tok ethertype_values[] = {
     { ETHERTYPE_PPPOED,         "PPPoE D" },
     { ETHERTYPE_PPPOES,         "PPPoE S" },
     { ETHERTYPE_EAPOL,          "EAPOL" },
+    { ETHERTYPE_RRCP,           "RRCP" },
     { ETHERTYPE_JUMBO,          "Jumbo" },
     { ETHERTYPE_LOOPBACK,       "Loopback" },
     { ETHERTYPE_ISO,            "OSI" },
     { ETHERTYPE_GRE_ISO,        "GRE-OSI" },
+    { ETHERTYPE_CFM_OLD,        "CFM (old)" },
     { ETHERTYPE_CFM,            "CFM" },
+    { ETHERTYPE_LLDP,           "LLDP" },
     { 0, NULL}
 };
 
@@ -286,6 +290,8 @@ ether_encap_print(u_short ether_type, const u_char *p,
 
        case ETHERTYPE_PPPOED:
        case ETHERTYPE_PPPOES:
+       case ETHERTYPE_PPPOED2:
+       case ETHERTYPE_PPPOES2:
                pppoe_print(p, length);
                return (1);
 
@@ -293,6 +299,10 @@ ether_encap_print(u_short ether_type, const u_char *p,
                eap_print(gndo, p, length);
                return (1);
 
+       case ETHERTYPE_RRCP:
+               rrcp_print(gndo, p - 14 , length + 14);
+               return (1);
+
        case ETHERTYPE_PPP:
                if (length) {
                        printf(": ");
@@ -309,9 +319,14 @@ ether_encap_print(u_short ether_type, const u_char *p,
                return (1);
 
        case ETHERTYPE_CFM:
+       case ETHERTYPE_CFM_OLD:
                cfm_print(p, length);
                return (1);
 
+       case ETHERTYPE_LLDP:
+               lldp_print(p, length);
+               return (1);
+
         case ETHERTYPE_LOOPBACK:
                 return (1);