]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-symantec.c
Makefile.in: don't remove configure and config.h.in in make distclean.
[tcpdump] / print-symantec.c
index 5e203581187dfd7dd3c5106d612226c7617acc64..0d394e30f2ec8b79becd4b825c35154bcaffce85 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "netdissect-stdinc.h"
 
+#define ND_LONGJMP_FROM_TCHECK
 #include "netdissect.h"
 #include "extract.h"
 #include "ethertype.h"
@@ -78,13 +79,9 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
        u_short ether_type;
 
        ndo->ndo_protocol = "symantec";
-       if (caplen < sizeof (struct symantec_header)) {
-               ndo->ndo_ll_header_length += caplen;
-               nd_print_trunc(ndo);
-               return;
-       }
+       ND_TCHECK_LEN(p, sizeof(struct symantec_header));
 
-       ndo->ndo_ll_header_length += sizeof (struct symantec_header);
+       ndo->ndo_ll_hdr_len += sizeof (struct symantec_header);
        if (ndo->ndo_eflag)
                symantec_hdr_print(ndo, p, length);
 
@@ -110,6 +107,4 @@ symantec_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_
                if (!ndo->ndo_suppress_default_print)
                        ND_DEFAULTPRINT(p, caplen);
        }
-
-       return;
 }