]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-fddi.c
Add changes in 4.2.1.
[tcpdump] / print-fddi.c
index 3b19c3a8c878729a72988af214e0dd6e79c2c8f6..1e7d554ad7104268ef61f4276de0b5468801dc64 100644 (file)
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
+#ifndef lint
+static const char rcsid[] _U_ =
+    "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.66 2005-11-13 12:12:41 guy Exp $ (LBL)";
+#endif
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #include "addrtoname.h"
 #include "ethertype.h"
 
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-fddi.c,v 1.62 2003-11-15 00:39:22 guy Exp $ (LBL)";
-#endif
 #include "ether.h"
 #include "fddi.h"
 
@@ -264,7 +264,6 @@ fddi_print(const u_char *p, u_int length, u_int caplen)
        caplen -= FDDI_HDRLEN;
 
        /* Frame Control field determines interpretation of packet */
-       extracted_ethertype = 0;
        if ((fddip->fddi_fc & FDDIFC_CLFF) == FDDIFC_LLC_ASYNC) {
                /* Try to print the LLC-layer header & higher layers */
                if (llc_print(p, length, caplen, ESRC(&ehdr), EDST(&ehdr),
@@ -280,7 +279,7 @@ fddi_print(const u_char *p, u_int length, u_int caplen)
                                printf("(LLC %s) ",
                        etherproto_string(htons(extracted_ethertype)));
                        }
-                       if (!xflag && !qflag)
+                       if (!suppress_default_print)
                                default_print(p, caplen);
                }
        } else if ((fddip->fddi_fc & FDDIFC_CLFF) == FDDIFC_SMT)
@@ -290,7 +289,7 @@ fddi_print(const u_char *p, u_int length, u_int caplen)
                if (!eflag)
                        fddi_hdr_print(fddip, length + FDDI_HDRLEN, ESRC(&ehdr),
                            EDST(&ehdr));
-               if (!xflag && !qflag)
+               if (!suppress_default_print)
                        default_print(p, caplen);
        }
 }
@@ -298,7 +297,7 @@ fddi_print(const u_char *p, u_int length, u_int caplen)
 /*
  * This is the top level routine of the printer.  'p' points
  * to the FDDI header of the packet, 'h->ts' is the timestamp,
- * 'h->length' is the length of the packet off the wire, and 'h->caplen'
+ * 'h->len' is the length of the packet off the wire, and 'h->caplen'
  * is the number of bytes actually captured.
  */
 u_int