]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Improved VLAN support, from Peter Jeremy - "vlan" filtering keyword,
authorguy <guy>
Sun, 22 Oct 2000 04:17:52 +0000 (04:17 +0000)
committerguy <guy>
Sun, 22 Oct 2000 04:17:52 +0000 (04:17 +0000)
letting you filter based on the VLAN to which a packet belongs, and an
improvement to the printing of VLAN packets (adding an extra space to
separate the VLAN priority and flags from the next stuff printed).

CREDITS
print-ether.c
tcpdump.1

diff --git a/CREDITS b/CREDITS
index f71a71250cdd340ee1c2edfcd0674b8a6c0a23e7..91924a0ceb4da8a6fba443a16839809fb0f55e51 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -33,6 +33,7 @@ Additional people who have contributed patches:
        Motonori Shindo                 <[email protected]>
        Onno van der Linden             <[email protected]>
        Pasvorn Boonmark                <[email protected]>
+       Peter Jeremy                    <[email protected]>
        Rafal Maszkowski                <[email protected]>
        Richard Sharpe                  <[email protected]>
        Rick Jones                      <[email protected]>
index 3838e73d6dc7537db4ba3f1cb012d5aebd1967c7..167c53e21337a70c3ff092d445ac9e7dfc720e38 100644 (file)
@@ -20,7 +20,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.58 2000-10-09 02:59:39 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ether.c,v 1.59 2000-10-22 04:17:53 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -191,7 +191,7 @@ ether_encap_print(u_short ethertype, const u_char *p,
                return (1);
 
        case ETHERTYPE_8021Q:
-               printf("802.1Q vlan#%d P%d%s",
+               printf("802.1Q vlan#%d P%d%s ",
                       ntohs(*(u_int16_t *)p) & 0xfff,
                       ntohs(*(u_int16_t *)p) >> 13,
                       (ntohs(*(u_int16_t *)p) & 0x1000) ? " CFI" : "");
index 6eb22586b952ad851f83395fe926b81234f72466..bfd70674cf313b26ffb3cfbec7e066b06b3ee488 100644 (file)
--- a/tcpdump.1
+++ b/tcpdump.1
@@ -1,4 +1,4 @@
-.\" @(#) $Header: /tcpdump/master/tcpdump/Attic/tcpdump.1,v 1.85 2000-07-29 08:10:06 assar Exp $ (LBL)
+.\" @(#) $Header: /tcpdump/master/tcpdump/Attic/tcpdump.1,v 1.86 2000-10-22 04:17:53 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.
@@ -566,6 +566,13 @@ Abbreviations for:
 where \fIp\fR is one of the above protocols.
 Note that
 \fItcpdump\fP does not currently know how to parse these protocols.
+.IP "\fBvlan \fI[vlan_id]\fR"
+True if the packet is an IEEE 802.1Q VLAN packet.
+If \fI[vlan_id]\fR is specified, only true is the packet has the specified
+\fIvlan_id\fR.
+Note that the first \fBvlan\fR keyword encountered in \fIexpression\fR
+changes the decoding offsets for the remainder of \fIexpression\fR
+on the assumption that the packet is a VLAN packet.
 .IP  "\fBtcp\fR, \fBudp\fR, \fBicmp\fR"
 Abbreviations for:
 .in +.5i