]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ether.c
From Kevin Steves: fix the printing of options in a parameter request
[tcpdump] / print-ether.c
index ecd5ba873a4800391fd85eedcfbed6a4d238eaa9..441cee0f1afd5cfb69a1aad7ecbc9e18f7c8a35e 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.101 2006-02-10 04:52:25 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.103 2006-10-12 10:26:12 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -74,6 +74,7 @@ const struct tok ethertype_values[] = {
     { ETHERTYPE_LOOPBACK,       "Loopback" },
     { ETHERTYPE_ISO,            "OSI" },
     { ETHERTYPE_GRE_ISO,        "GRE-OSI" },
+    { ETHERTYPE_CFM,            "CFM" },
     { 0, NULL}
 };
 
@@ -243,11 +244,13 @@ ether_encap_print(u_short ether_type, const u_char *p,
 
                if (llc_print(p, length, caplen, p - 18, p - 12,
                    extracted_ether_type) == 0) {
-                               ether_hdr_print(p - 18, length + 4);
+                        ether_hdr_print(p - 18, length + 4);
+
+                        if (!suppress_default_print) {
+                                default_print(p - 18, caplen + 4);
+                        }
                }
 
-               if (!suppress_default_print)
-                       default_print(p - 18, caplen + 4);
 
                return (1);
 
@@ -269,10 +272,11 @@ ether_encap_print(u_short ether_type, const u_char *p,
                 if (llc_print(p, length, caplen, p - 16, p - 10,
                               extracted_ether_type) == 0) {
                     ether_hdr_print(p - 16, length + 2);
-                }
 
-                if (!suppress_default_print)
-                    default_print(p - 16, caplen + 2);
+                    if (!suppress_default_print) {
+                            default_print(p - 16, caplen + 2);
+                    }
+                }
 
                 return (1);
 
@@ -304,6 +308,10 @@ ether_encap_print(u_short ether_type, const u_char *p,
                slow_print(p, length);
                return (1);
 
+       case ETHERTYPE_CFM:
+               cfm_print(p, length);
+               return (1);
+
         case ETHERTYPE_LOOPBACK:
                 return (1);