]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-symantec.c
Update from current NetBSD version of ieee80211_radiotap.h.
[tcpdump] / print-symantec.c
index d07646c3114a12e0ba2e706d2fc2c9f5964797e3..1b0f2ec5d50f68cee7404c2bf46885a78ed7911b 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-symantec.c,v 1.1 2004-03-11 09:36:16 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-symantec.c,v 1.4.2.1 2005-07-07 01:24:39 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -38,8 +38,6 @@ static const char rcsid[] _U_ =
 
 #include "ether.h"
 
-const u_char *snapend;
-
 struct symantec_header {
        u_int8_t  stuff1[6];
        u_int16_t ether_type;
@@ -57,16 +55,16 @@ symantec_hdr_print(register const u_char *bp, u_int length)
        etype = ntohs(sp->ether_type);
        if (!qflag) {
                if (etype <= ETHERMTU)
-                         (void)printf("invalid ethertype %u", etype);
+                         (void)printf("invalid ethertype %u", etype);
                 else 
-                         (void)printf("ethertype %s (0x%04x)",
+                         (void)printf("ethertype %s (0x%04x)",
                                       tok2str(ethertype_values,"Unknown", etype),
                                        etype);
         } else {
                 if (etype <= ETHERMTU)
-                          (void)printf("invalid ethertype %u", etype);
+                          (void)printf("invalid ethertype %u", etype);
                 else 
-                          (void)printf("%s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", etype));  
+                          (void)printf("%s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", etype));  
         }
 
        (void)printf(", length %u: ", length);
@@ -75,7 +73,7 @@ symantec_hdr_print(register const u_char *bp, u_int length)
 /*
  * This is the top level routine of the printer.  'p' points
  * to the ether 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
@@ -88,7 +86,7 @@ symantec_if_print(const struct pcap_pkthdr *h, const u_char *p)
        u_short extracted_ether_type;
 
        if (caplen < sizeof (struct symantec_header)) {
-               printf("[|syhmantec]");
+               printf("[|symantec]");
                return caplen;
        }
 
@@ -107,7 +105,7 @@ symantec_if_print(const struct pcap_pkthdr *h, const u_char *p)
                if (!eflag)
                        symantec_hdr_print((u_char *)sp, length + sizeof (struct symantec_header));
 
-               if (!xflag && !qflag)
+               if (!suppress_default_print)
                        default_print(p, caplen);
        } else if (ether_encap_print(ether_type, p, length, caplen,
            &extracted_ether_type) == 0) {
@@ -115,7 +113,7 @@ symantec_if_print(const struct pcap_pkthdr *h, const u_char *p)
                if (!eflag)
                        symantec_hdr_print((u_char *)sp, length + sizeof (struct symantec_header));
 
-               if (!xflag && !qflag)
+               if (!suppress_default_print)
                        default_print(p, caplen);
        }