]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print.c
IPX: Add a length check
[tcpdump] / print.c
diff --git a/print.c b/print.c
index 5fe620bf56dfae5a6d1c2118fab40cc2267d669b..37ae91a89eda1ba4ec4aab19e874214c6e581112 100644 (file)
--- a/print.c
+++ b/print.c
@@ -57,6 +57,9 @@ static const struct printer printers[] = {
 #ifdef DLT_IEEE802_15_4_NOFCS
        { ieee802_15_4_if_print, DLT_IEEE802_15_4_NOFCS },
 #endif
+#ifdef DLT_IEEE802_15_4_TAP
+       { ieee802_15_4_tap_if_print, DLT_IEEE802_15_4_TAP },
+#endif
 #ifdef DLT_PPI
        { ppi_if_print,         DLT_PPI },
 #endif
@@ -223,6 +226,12 @@ static const struct printer printers[] = {
 #endif
 #ifdef DLT_PPP_SERIAL
        { ppp_hdlc_if_print,    DLT_PPP_SERIAL },
+#endif
+#ifdef DLT_DSA_TAG_BRCM
+       { brcm_tag_if_print,    DLT_DSA_TAG_BRCM },
+#endif
+#ifdef DLT_DSA_TAG_BRCM_PREPEND
+       { brcm_tag_prepend_if_print, DLT_DSA_TAG_BRCM_PREPEND },
 #endif
        { NULL,                 0 },
 };
@@ -320,11 +329,11 @@ pretty_print_packet(netdissect_options *ndo, const struct pcap_pkthdr *h,
        u_int hdrlen;
        int invalid_header = 0;
 
-       if(ndo->ndo_packet_number)
+       if (ndo->ndo_packet_number)
                ND_PRINT("%5u  ", packets_captured);
 
        /* Sanity checks on packet length / capture length */
-       if(h->caplen == 0) {
+       if (h->caplen == 0) {
                invalid_header = 1;
                ND_PRINT("[Invalid header: caplen==0");
        }
@@ -471,7 +480,7 @@ ndo_error(netdissect_options *ndo, status_exit_codes_t status,
 {
        va_list ap;
 
-       if(ndo->program_name)
+       if (ndo->program_name)
                (void)fprintf(stderr, "%s: ", ndo->program_name);
        va_start(ap, fmt);
        (void)vfprintf(stderr, fmt, ap);
@@ -492,7 +501,7 @@ ndo_warning(netdissect_options *ndo, const char *fmt, ...)
 {
        va_list ap;
 
-       if(ndo->program_name)
+       if (ndo->program_name)
                (void)fprintf(stderr, "%s: ", ndo->program_name);
        (void)fprintf(stderr, "WARNING: ");
        va_start(ap, fmt);