]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Properly document "-X" - it turns on "-x" for you.
authorguy <guy>
Thu, 19 Dec 2002 05:44:47 +0000 (05:44 +0000)
committerguy <guy>
Thu, 19 Dec 2002 05:44:47 +0000 (05:44 +0000)
Have "-xx" and "-XX" cause the link-level header to be dumped; don't
make "-e" affect that at all, as the fact that "-x" doesn't dump the
link-level header was documented, with no mention of "-e", at least as
far back as tcpdump 3.4, and scripts might depend on that working even
with "-e".

tcpdump.1
tcpdump.c

index 3c2d7ffa0b7cb60260b5ff18e4f43a8c340fe421..c564a27200bad8a36ae0a77605ed11c93ba6306d 100644 (file)
--- a/tcpdump.1
+++ b/tcpdump.1
@@ -1,4 +1,4 @@
-.\" @(#) $Header: /tcpdump/master/tcpdump/Attic/tcpdump.1,v 1.133 2002-12-19 05:35:57 guy Exp $ (LBL)
+.\" @(#) $Header: /tcpdump/master/tcpdump/Attic/tcpdump.1,v 1.134 2002-12-19 05:44:47 guy Exp $ (LBL)
 .\"
 .\" Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992, 1994, 1995, 1996, 1997
 .\"    The Regents of the University of California.  All rights reserved.
@@ -436,7 +436,7 @@ telnet \fBSB\fP ... \fBSE\fP options
 are printed in full.
 With
 .B \-X
-telnet options are printed in hex as well.
+Telnet options are printed in hex as well.
 .TP
 .B \-w
 Write the raw packets to \fIfile\fR rather than parsing and printing
@@ -445,10 +445,7 @@ They can later be printed with the \-r option.
 Standard output is used if \fIfile\fR is ``-''.
 .TP
 .B \-x
-Print each packet (minus its link level header, unless
-.B \-e
-is specified)
-in hex.
+Print each packet (minus its link level header) in hex.
 The smaller of the entire packet or
 .I snaplen
 bytes will be printed.  Note that this is the entire link-layer
@@ -456,16 +453,19 @@ packet, so for link layers that pad (e.g. Ethernet), the padding bytes
 will also be printed when the higher layer packet is shorter than the
 required padding.
 .TP
+.B \-xx
+Print each packet,
+.I including
+its link level header, in hex.
+.TP
 .B \-X
-When printing hex, print ASCII too.
-Thus if
-.B \-x
-is also set, the packet is printed in hex/ASCII.
+Print each packet (minus its link level header) in hex and ASCII.
 This is very handy for analysing new protocols.
-Even if
-.B \-x
-is not also set, some parts of some packets may be printed
-in hex/ASCII.
+.TP
+.B \-XX
+Print each packet,
+.I including
+its link level header, in hex and ASCII.
 .IP "\fI expression\fP"
 .RS
 selects which packets will be dumped.
index 59eae3faccdea4cb57a8e87fb6c8beeeb8d37c5a..4fd5c6a791f834c62f0d49d1cc399e6fe2d2c97a 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.190 2002-12-18 09:41:19 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.191 2002-12-19 05:44:47 guy Exp $ (LBL)";
 #endif
 
 /*
@@ -812,7 +812,7 @@ void
 default_print_packet(register const u_char *bp, register u_int length,
     u_int hdr_length)
 {
-       if (eflag) {
+       if (xflag > 1) {
                /*
                 * Include the link-layer header.
                 */