]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
From Peter Fales <[email protected]>: add support for
[tcpdump] / tcpdump.c
index d596dbe846cfe5d81ed836ad8e3a1efb1985ea5e..e8a89fbe0d2a3630ab106c6073e677b87b527a70 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -30,7 +30,7 @@ static const char copyright[] =
     "@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
 The Regents of the University of California.  All rights reserved.\n";
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.197 2003-01-07 09:51:20 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.201 2003-01-23 09:05:38 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -132,6 +132,9 @@ struct printer {
 
 static struct printer printers[] = {
        { arcnet_if_print,      DLT_ARCNET },
+#ifdef DLT_ARCNET_LINUX
+       { arcnet_linux_if_print, DLT_ARCNET_LINUX },
+#endif
        { ether_if_print,       DLT_EN10MB },
        { token_if_print,       DLT_IEEE802 },
 #ifdef DLT_LANE8023
@@ -727,10 +730,15 @@ main(int argc, char **argv)
 #endif
 #ifndef WIN32
        if (RFileName == NULL) {
-            if (vflag == 0)
-                (void)fprintf(stderr, "%s: verbose output suppressed, use -v or -vv for full protocol decode\n",program_name);
-            (void)fprintf(stderr, "listening on %s, capture size %u bytes\n", device, snaplen);
-            (void)fflush(stderr);
+               if (!vflag && !WFileName) {
+                       (void)fprintf(stderr,
+                           "%s: verbose output suppressed, use -v or -vv for full protocol decode\n",
+                           program_name);
+               } else
+                       (void)fprintf(stderr, "%s: ", program_name);
+               (void)fprintf(stderr, "listening on %s, capture size %u bytes\n",
+                   device, snaplen);
+               (void)fflush(stderr);
        }
 #endif /* WIN32 */
        if (pcap_loop(pd, cnt, callback, pcap_userdata) < 0) {
@@ -1002,7 +1010,7 @@ usage(void)
        (void)fprintf(stderr, "libpcap version %s\n", pcap_version);
 #endif /* WIN32 */
        (void)fprintf(stderr,
-"Usage: %s [-aAd" D_FLAG "eflLnNOpqRStu" U_FLAG "vxXy]" B_FLAG_USAGE " [-c count] [ -C file_size ]\n", program_name);
+"Usage: %s [-aAd" D_FLAG "eflLnNOpqRStu" U_FLAG "vxX]" B_FLAG_USAGE " [-c count] [ -C file_size ]\n", program_name);
        (void)fprintf(stderr,
 "\t\t[ -E algo:secret ] [ -F file ] [ -i interface ] [ -r file ]\n");
        (void)fprintf(stderr,