]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Check the containing item length in some loops.
[tcpdump] / tcpdump.c
index c60cb6b4f5990b302c1c983def59445faa6fc218..87005e57aa1070692b4b0c518750aa7b7e4c5116 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -285,11 +285,19 @@ static struct printer printers[] = {
 #if defined(DLT_BLUETOOTH_HCI_H4_WITH_PHDR) && defined(HAVE_PCAP_BLUETOOTH_H)
        { bt_if_print,          DLT_BLUETOOTH_HCI_H4_WITH_PHDR},
 #endif
-#if defined(HAVE_PCAP_USB_H) && defined(DLT_USB_LINUX)
-       { usb_linux_print,      DLT_USB_LINUX},
+#ifdef HAVE_PCAP_USB_H
+#ifdef DLT_USB_LINUX
+       { usb_linux_48_byte_print, DLT_USB_LINUX},
+#endif /* DLT_USB_LINUX */
+#ifdef DLT_USB_LINUX_MMAPPED
+       { usb_linux_64_byte_print, DLT_USB_LINUX_MMAPPED},
+#endif /* DLT_USB_LINUX_MMAPPED */
+#endif /* HAVE_PCAP_USB_H */
+#ifdef DLT_IPV4
+       { raw_if_print,         DLT_IPV4 },
 #endif
-#if defined(HAVE_PCAP_USB_H) && defined(DLT_USB_LINUX_MMAPPED)
-       { usb_linux_print,      DLT_USB_LINUX_MMAPPED},
+#ifdef DLT_IPV6
+       { raw_if_print,         DLT_IPV6 },
 #endif
        { NULL,                 0 },
 };
@@ -297,12 +305,6 @@ static struct printer printers[] = {
 static struct ndo_printer ndo_printers[] = {
 #ifdef DLT_IPNET
        { ipnet_if_print,       DLT_IPNET },
-#endif
-#ifdef DLT_IPV4
-       { raw_if_print,         DLT_IPV4 },
-#endif
-#ifdef DLT_IPV6
-       { raw_if_print,         DLT_IPV6 },
 #endif
        { NULL,                 0 },
 };