]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Include the CFLAGS setting when configure was run in the compiler flags.
[tcpdump] / tcpdump.c
index cc25014377f5b2f5864e545de61f774cc7ffe188..06683af344a483ff5c9874d546e7aea165654afa 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -90,9 +90,9 @@ extern int SIZE_BUF;
 netdissect_options Gndo;
 netdissect_options *gndo = &Gndo;
 
-int dflag;                     /* print filter code */
-int Lflag;                     /* list available data link types and exit */
-char *zflag = NULL;            /* compress each savefile using a specified command (like gzip or bzip2) */
+static int dflag;                      /* print filter code */
+static int Lflag;                      /* list available data link types and exit */
+static char *zflag = NULL;             /* compress each savefile using a specified command (like gzip or bzip2) */
 
 static int infodelay;
 static int infoprint;
@@ -285,12 +285,14 @@ 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},
-#endif
-#if defined(HAVE_PCAP_USB_H) && defined(DLT_USB_LINUX_MMAPPED)
-       { usb_linux_print,      DLT_USB_LINUX_MMAPPED},
-#endif
+#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
@@ -598,7 +600,7 @@ main(int argc, char **argv)
 
        opterr = 0;
        while (
-           (op = getopt(argc, argv, "aA" B_FLAG "c:C:d" D_FLAG "eE:fF:G:i:" I_FLAG "KlLm:M:nNOpqr:Rs:StT:u" U_FLAG "vw:W:xXy:Yz:Z:")) != -1)
+           (op = getopt(argc, argv, "aAb" B_FLAG "c:C:d" D_FLAG "eE:fF:G:i:" I_FLAG "KlLm:M:nNOpqr:Rs:StT:u" U_FLAG "vw:W:xXy:Yz:Z:")) != -1)
                switch (op) {
 
                case 'a':
@@ -608,6 +610,7 @@ main(int argc, char **argv)
                case 'A':
                        ++Aflag;
                        break;
+
                case 'b':
                        ++bflag;
                        break;
@@ -1777,7 +1780,7 @@ usage(void)
 #endif /* WIN32 */
 #endif /* HAVE_PCAP_LIB_VERSION */
        (void)fprintf(stderr,
-"Usage: %s [-aAd" D_FLAG "ef" I_FLAG "KlLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [ -c count ]\n", program_name);
+"Usage: %s [-aAbd" D_FLAG "ef" I_FLAG "KlLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [ -c count ]\n", program_name);
        (void)fprintf(stderr,
 "\t\t[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]\n");
        (void)fprintf(stderr,