summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/tcpdump.1
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2005-07-11 03:54:22 +0000
committersam <sam@FreeBSD.org>2005-07-11 03:54:22 +0000
commit1166f90fe87cef69f7923a1b8c386eecdc6cb92b (patch)
tree87e350d89f0c352cd41839a49086d78bf700350e /contrib/tcpdump/tcpdump.1
parenta6836add6eafd2d06f4eeb7200e8217ba3399c1b (diff)
downloadFreeBSD-src-1166f90fe87cef69f7923a1b8c386eecdc6cb92b.zip
FreeBSD-src-1166f90fe87cef69f7923a1b8c386eecdc6cb92b.tar.gz
Virgin import of tcpdump v3.9.1 (release) from tcpdump.org
Approved by: re (scottl)
Diffstat (limited to 'contrib/tcpdump/tcpdump.1')
-rw-r--r--contrib/tcpdump/tcpdump.161
1 files changed, 46 insertions, 15 deletions
diff --git a/contrib/tcpdump/tcpdump.1 b/contrib/tcpdump/tcpdump.1
index 708ab02..b08d2c6 100644
--- a/contrib/tcpdump/tcpdump.1
+++ b/contrib/tcpdump/tcpdump.1
@@ -1,4 +1,4 @@
-.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1,v 1.167 2004/12/28 22:31:25 guy Exp $ (LBL)
+.\" @(#) $Header: /tcpdump/master/tcpdump/tcpdump.1,v 1.167.2.4 2005/05/02 21:27:34 guy Exp $ (LBL)
.\"
.\" $NetBSD: tcpdump.8,v 1.9 2003/03/31 00:18:17 perry Exp $
.\"
@@ -22,7 +22,7 @@
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
-.TH TCPDUMP 1 "22 March 2004"
+.TH TCPDUMP 1 "18 April 2005"
.SH NAME
tcpdump \- dump traffic on a network
.SH SYNOPSIS
@@ -596,10 +596,11 @@ different kinds of qualifier:
qualifiers say what kind of thing the id name or number refers to.
Possible types are
.BR host ,
-.B net
+.B net ,
+.B port
and
-.BR port .
-E.g., `host foo', `net 128.3', `port 20'.
+.BR portrange .
+E.g., `host foo', `net 128.3', `port 20', `portrange 6000-6008'.
If there is no type
qualifier,
.B host
@@ -641,7 +642,8 @@ protos are:
.B tcp
and
.BR udp .
-E.g., `ether src foo', `arp net 128.3', `tcp port 21'.
+E.g., `ether src foo', `arp net 128.3', `tcp port 21', `udp portrange
+7000-7009'.
If there is
no proto qualifier, all protocols consistent with the type are
assumed.
@@ -693,6 +695,7 @@ which may be either an address or a name.
True if the IPv4/v6 source field of the packet is \fIhost\fP.
.IP "\fBhost \fIhost\fP
True if either the IPv4/v6 source or destination of the packet is \fIhost\fP.
+.IP
Any of the above host expressions can be prepended with the keywords,
\fBip\fP, \fBarp\fP, \fBrarp\fP, or \fBip6\fP as in:
.in +.5i
@@ -747,7 +750,7 @@ number of \fInet\fP.
True if either the IPv4/v6 source or destination address of the packet has a network
number of \fInet\fP.
.IP "\fBnet \fInet\fR \fBmask \fInetmask\fR"
-True if the IP address matches \fInet\fR with the specific \fInetmask\fR.
+True if the IPv4 address matches \fInet\fR with the specific \fInetmask\fR.
May be qualified with \fBsrc\fR or \fBdst\fR.
Note that this syntax is not valid for IPv6 \fInet\fR.
.IP "\fBnet \fInet\fR/\fIlen\fR"
@@ -771,8 +774,25 @@ both tcp/domain and udp/domain traffic).
True if the packet has a source port value of \fIport\fP.
.IP "\fBport \fIport\fR"
True if either the source or destination port of the packet is \fIport\fP.
-Any of the above port expressions can be prepended with the keywords,
-\fBtcp\fP or \fBudp\fP, as in:
+.IP "\fBdst portrange \fIport1\fB-\fIport2\fR"
+True if the packet is ip/tcp, ip/udp, ip6/tcp or ip6/udp and has a
+destination port value between \fIport1\fP and \fIport2\fP.
+.I port1
+and
+.I port2
+are interpreted in the same fashion as the
+.I port
+parameter for
+.BR port .
+.IP "\fBsrc portrange \fIport1\fB-\fIport2\fR"
+True if the packet has a source port value between \fIport1\fP and
+\fIport2\fP.
+.IP "\fBportrange \fIport1\fB-\fIport2\fR"
+True if either the source or destination port of the packet is between
+\fIport1\fP and \fIport2\fP.
+.IP
+Any of the above port or port range expressions can be prepended with
+the keywords, \fBtcp\fP or \fBudp\fP, as in:
.in +.5i
.nf
\fBtcp src port \fIport\fR
@@ -796,7 +816,7 @@ This is equivalent to:
.fi
.in -.5i
.IP "\fBip proto \fIprotocol\fR"
-True if the packet is an IP packet (see
+True if the packet is an IPv4 packet (see
.IR ip (4P))
of protocol type \fIprotocol\fP.
\fIProtocol\fP can be a number or one of the names
@@ -848,7 +868,7 @@ The \fBether\fP
keyword is optional.
This is shorthand for `\fBether[0] & 1 != 0\fP'.
.IP "\fBip multicast\fR"
-True if the packet is an IP multicast packet.
+True if the packet is an IPv4 multicast packet.
.IP "\fBip6 multicast\fR"
True if the packet is an IPv6 multicast packet.
.IP "\fBether proto \fIprotocol\fR"
@@ -998,6 +1018,15 @@ If \fI[vlan_id]\fR is specified, only true is the packet has the specified
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.
+the \fI[vlan_id]\fR statement may be used more than once, to filter on vlan hierarchies.
+each use of the \fI[vlan_id]\fR \fIexpression\fR increments the filter offsets by 4.
+.fi
+example(s):
+.fi
+"vlan 100 && vlan 200" filters on vlan 200 encapsulated within vlan 100
+.fi
+"vlan && vlan 300 && ip" filters IPv4 protocols encapsulated in vlan 300 encapsulated within any higher order vlan
+.fi
.IP "\fBtcp\fR, \fBudp\fR, \fBicmp\fR"
Abbreviations for:
.in +.5i
@@ -1087,10 +1116,11 @@ data inside the packet, use the following syntax:
.fi
.in -.5i
\fIProto\fR is one of \fBether, fddi, tr, wlan, ppp, slip, link,
-ip, arp, rarp, tcp, udp, icmp\fR or \fBip6\fR, and
+ip, arp, rarp, tcp, udp, icmp, ip6\fR or \fBradio\fR, and
indicates the protocol layer for the index operation.
(\fBether, fddi, wlan, tr, ppp, slip\fR and \fBlink\fR all refer to the
-link layer.)
+link layer. \fBradio\fR refers to the "radio header" added to some
+802.11 captures.)
Note that \fItcp, udp\fR and other upper-layer protocol types only
apply to IPv4, not IPv6 (this will be fixed in the future).
The byte offset, relative to the indicated protocol layer, is
@@ -1102,10 +1132,11 @@ length of the packet.
For example, `\fBether[0] & 1 != 0\fP' catches all multicast traffic.
The expression `\fBip[0] & 0xf != 5\fP'
-catches all IP packets with options.
+catches all IPv4 packets with options.
The expression
`\fBip[6:2] & 0x1fff = 0\fP'
-catches only unfragmented datagrams and frag zero of fragmented datagrams.
+catches only unfragmented IPv4 datagrams and frag zero of fragmented
+IPv4 datagrams.
This check is implicitly applied to the \fBtcp\fP and \fBudp\fP
index operations.
For instance, \fBtcp[0]\fP always means the first
OpenPOWER on IntegriCloud