1DUMPCAP(1)              The Wireshark Network Analyzer              DUMPCAP(1)
2
3
4

NAME

6       dumpcap - Dump network traffic
7

SYNOPSIS

9       dumpcap [ -a <capture autostop condition> ] ...
10       [ -b <capture ring buffer option>] ...  [ -B <capture buffer size> ]
11       [ -c <capture packet count> ] [ -D ] [ -f <capture filter> ] [ -h ]
12       [ -i <capture interface>|- ] [ -I ] [ -L ] [ -n ] [ -M ] [ -p ] [ -q ]
13       [ -s <capture snaplen> ] [ -S ] [ -v ] [ -w <outfile> ]
14       [ -y <capture link type> ]
15

DESCRIPTION

17       Dumpcap is a network traffic dump tool.  It lets you capture packet
18       data from a live network and write the packets to a file.  Dumpcap's
19       native capture file format is libpcap format, which is also the format
20       used by Wireshark, tcpdump and various other tools.  When the -n option
21       is specified, the output file is written in the new pcapng format.
22
23       Without any options set it will use the pcap library to capture traffic
24       from the first available network interface and writes the received raw
25       packet data, along with the packets' time stamps into a libpcap file.
26
27       If the -w option is not specified, Dumpcap writes to a newly created
28       libpcap file with a randomly chosen name.  If the -w option is
29       specified, Dumpcap writes to the file specified by that option.
30
31       Packet capturing is performed with the pcap library.  The capture
32       filter syntax follows the rules of the pcap library.
33

OPTIONS

35       -a  <capture autostop condition>
36           Specify a criterion that specifies when Dumpcap is to stop writing
37           to a capture file.  The criterion is of the form test:value, where
38           test is one of:
39
40           duration:value Stop writing to a capture file after value seconds
41           have elapsed.
42
43           filesize:value Stop writing to a capture file after it reaches a
44           size of value kilobytes (where a kilobyte is 1024 bytes). If this
45           option is used together with the -b option, dumpcap will stop
46           writing to the current capture file and switch to the next one if
47           filesize is reached.
48
49           files:value Stop writing to capture files after value number of
50           files were written.
51
52       -b  <capture ring buffer option>
53           Cause Dumpcap to run in "multiple files" mode.  In "multiple files"
54           mode, Dumpcap will write to several capture files. When the first
55           capture file fills up, Dumpcap will switch writing to the next file
56           and so on.
57
58           The created filenames are based on the filename given with the -w
59           option, the number of the file and on the creation date and time,
60           e.g. outfile_00001_20050604120117.pcap,
61           outfile_00002_20050604120523.pcap, ...
62
63           With the files option it's also possible to form a "ring buffer".
64           This will fill up new files until the number of files specified, at
65           which point Dumpcap will discard the data in the first file and
66           start writing to that file and so on. If the files option is not
67           set, new files filled up until one of the capture stop conditions
68           match (or until the disk is full).
69
70           The criterion is of the form key:value, where key is one of:
71
72           duration:value switch to the next file after value seconds have
73           elapsed, even if the current file is not completely filled up.
74
75           filesize:value switch to the next file after it reaches a size of
76           value kilobytes (where a kilobyte is 1024 bytes).
77
78           files:value begin again with the first file after value number of
79           files were written (form a ring buffer).  This value must be less
80           than 100000.  Caution should be used when using large numbers of
81           files: some filesystems do not handle many files in a single
82           directory well.  The files criterion requires either duration or
83           filesize to be specified to control when to go to the next file.
84           It should be noted that each -b parameter takes exactly one
85           criterion; to specify two criterion, each must be preceded by the
86           -b option.
87
88           Example: -b filesize:1024 -b files:5 results in a ring buffer of
89           five files of size one megabyte.
90
91       -B  <capture buffer size>
92           Set capture buffer size (in MB, default is 1MB).  This is used by
93           the the capture driver to buffer packet data until that data can be
94           written to disk.  If you encounter packet drops while capturing,
95           try to increase this size.  Note that, while Dumpcap attempts to
96           set the buffer size to 1MB by default, and can be told to set it to
97           a larger value, the system or interface on which you're capturing
98           might silently limit the capture buffer size to a lower value or
99           raise it to a higher value.
100
101           This is available on on UNIX systems with libpcap 1.0.0 or later
102           and on Windows.  It is not available on UNIX systems with earlier
103           versions of libpcap.
104
105       -c  <capture packet count>
106           Set the maximum number of packets to read when capturing live data.
107
108       -D  Print a list of the interfaces on which Dumpcap can capture, and
109           exit.  For each network interface, a number and an interface name,
110           possibly followed by a text description of the interface, is
111           printed.  The interface name or the number can be supplied to the
112           -i option to specify an interface on which to capture.
113
114           This can be useful on systems that don't have a command to list
115           them (e.g., Windows systems, or UNIX systems lacking ifconfig -a);
116           the number can be useful on Windows 2000 and later systems, where
117           the interface name is a somewhat complex string.
118
119           Note that "can capture" means that Dumpcap was able to open that
120           device to do a live capture. Depending on your system you may need
121           to run dumpcap from an account with special privileges (for
122           example, as root) to be able to capture network traffic.  If
123           "dumpcap -D" is not run from such an account, it will not list any
124           interfaces.
125
126       -f  <capture filter>
127           Set the capture filter expression.
128
129           The entire filter expression must be specified as a single argument
130           (which means that if it contains spaces, it must be quoted).
131
132       -h  Print the version and options and exits.
133
134       -i  <capture interface>|-
135           Set the name of the network interface or pipe to use for live
136           packet capture.
137
138           Network interface names should match one of the names listed in
139           "dumpcap -D" (described above); a number, as reported by "dumpcap
140           -D", can also be used.  If you're using UNIX, "netstat -i" or
141           "ifconfig -a" might also work to list interface names, although not
142           all versions of UNIX support the -a option to ifconfig.
143
144           If no interface is specified, Dumpcap searches the list of
145           interfaces, choosing the first non-loopback interface if there are
146           any non-loopback interfaces, and choosing the first loopback
147           interface if there are no non-loopback interfaces. If there are no
148           interfaces at all, Dumpcap reports an error and doesn't start the
149           capture.
150
151           Pipe names should be either the name of a FIFO (named pipe) or
152           ``-'' to read data from the standard input.  Data read from pipes
153           must be in standard libpcap format.
154
155           Note: the Win32 version of Dumpcap doesn't support capturing from
156           pipes or stdin!
157
158       -I  Put the interface in "monitor mode"; this is supported only on IEEE
159           802.11 Wi-Fi interfaces, and supported only on some operating
160           systems.
161
162           Note that in monitor mode the adapter might disassociate from the
163           network with which it's associated, so that you will not be able to
164           use any wireless networks with that adapter.  This could prevent
165           accessing files on a network server, or resolving host names or
166           network addresses, if you are capturing in monitor mode and are not
167           connected to another network with another adapter.
168
169       -L  List the data link types supported by the interface and exit. The
170           reported link types can be used for the -y option.
171
172       -M  When used with -D, -L and -S, print machine-readable output.  The
173           machine-readable output is intended to be read by Wireshark and
174           TShark; its format is subject to change from release to release.
175
176       -n  Write the output file in the pcap-ng format instead of the default
177           pcap format.
178
179       -p  Don't put the interface into promiscuous mode.  Note that the
180           interface might be in promiscuous mode for some other reason;
181           hence, -p cannot be used to ensure that the only traffic that is
182           captured is traffic sent to or from the machine on which Dumpcap is
183           running, broadcast traffic, and multicast traffic to addresses
184           received by that machine.
185
186       -q  When capturing packets, don't display the continuous count of
187           packets captured that is normally shown when saving a capture to a
188           file; instead, just display, at the end of the capture, a count of
189           packets captured.  On systems that support the SIGINFO signal, such
190           as various BSDs, you can cause the current count to be displayed by
191           typing your "status" character (typically control-T, although it
192           might be set to "disabled" by default on at least some BSDs, so
193           you'd have to explicitly set it to use it).
194
195       -s  <capture snaplen>
196           Set the default snapshot length to use when capturing live data.
197           No more than snaplen bytes of each network packet will be read into
198           memory, or saved to disk.  A value of 0 specifies a snapshot length
199           of 65535, so that the full packet is captured; this is the default.
200
201       -S  Print statistics for each interface once every second.
202
203       -v  Print the version and exit.
204
205       -w  <outfile>
206           Write raw packet data to outfile.
207
208           NOTE: The usage of "-" for stdout is not allowed here!
209
210       -y  <capture link type>
211           Set the data link type to use while capturing packets.  The values
212           reported by -L are the values that can be used.
213

CAPTURE FILTER SYNTAX

215       See the manual page of pcap-filter(4) or, if that doesn't exist,
216       tcpdump(8), or, if that doesn't exist,
217       <http://wiki.wireshark.org/CaptureFilters>.
218

SEE ALSO

220       wireshark(1), tshark(1), editcap(1), mergecap(1), capinfos(1),
221       pcap-filter(4), tcpdump(8), pcap(3)
222

NOTES

224       Dumpcap is part of the Wireshark distribution.  The latest version of
225       Wireshark can be found at <http://www.wireshark.org>.
226
227       HTML versions of the Wireshark project man pages are available at:
228       http://www.wireshark.org/docs/man-pages
229       <http://www.wireshark.org/docs/man-pages>.
230

AUTHORS

232       Dumpcap is derived from the Wireshark capturing engine code; see the
233       list of authors in the Wireshark man page for a list of authors of that
234       code.
235
236
237
2381.4.10                            2011-11-01                        DUMPCAP(1)
Impressum