]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ether.c
Protect code for particular Juniper DLT_ values with #ifdefs, so this
[tcpdump] / print-ether.c
index cbfefce027ebf1bc28bc9023f7b812aee810ecc3..87b77d3fde83c8ee635d86d8a5a42898946856a9 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.89 2004-03-17 23:24:36 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.95.2.1 2005-04-25 17:57:15 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -38,8 +38,6 @@ static const char rcsid[] _U_ =
 
 #include "ether.h"
 
-const u_char *snapend;
-
 const struct tok ethertype_values[] = { 
     { ETHERTYPE_IP,            "IPv4" },
     { ETHERTYPE_MPLS,          "MPLS unicast" },
@@ -69,9 +67,11 @@ const struct tok ethertype_values[] = {
     { ETHERTYPE_PPP,            "PPP" },
     { ETHERTYPE_PPPOED,         "PPPoE D" },
     { ETHERTYPE_PPPOES,         "PPPoE S" },
+    { ETHERTYPE_EAPOL,          "EAPOL" },
     { ETHERTYPE_JUMBO,          "Jumbo" },
     { ETHERTYPE_LOOPBACK,       "Loopback" },
     { ETHERTYPE_ISO,            "OSI" },
+    { ETHERTYPE_GRE_ISO,        "GRE-OSI" },
     { 0, NULL}
 };
 
@@ -186,7 +186,7 @@ ether_encap_print(u_short ether_type, const u_char *p,
        switch (ether_type) {
 
        case ETHERTYPE_IP:
-               ip_print(p, length);
+               ip_print(gndo, p, length);
                return (1);
 
 #ifdef INET6
@@ -197,7 +197,7 @@ ether_encap_print(u_short ether_type, const u_char *p,
 
        case ETHERTYPE_ARP:
        case ETHERTYPE_REVARP:
-               arp_print(p, length, caplen);
+               arp_print(gndo, p, length, caplen);
                return (1);
 
        case ETHERTYPE_DN:
@@ -284,6 +284,10 @@ ether_encap_print(u_short ether_type, const u_char *p,
                pppoe_print(p, length);
                return (1);
 
+       case ETHERTYPE_EAPOL:
+               eap_print(gndo, p, length);
+               return (1);
+
        case ETHERTYPE_PPP:
                if (length) {
                        printf(": ");
@@ -308,3 +312,12 @@ ether_encap_print(u_short ether_type, const u_char *p,
                return (0);
        }
 }
+
+
+/*
+ * Local Variables:
+ * c-style: whitesmith
+ * c-basic-offset: 8
+ * End:
+ */
+