1DUMPCAP(1)                                                          DUMPCAP(1)
2
3
4

NAME

6       dumpcap - Dump network traffic
7

SYNOPSIS

9       dumpcap [ -a|--autostop <capture autostop condition> ] ...
10       [ -b|--ring-buffer <capture ring buffer option> ] ...
11       [ -B|--buffer-size <capture buffer size> ]
12       [ -c <capture packet count> ] [ -C <byte limit> ] [ -d ]
13       [ -D|--list-interfaces ] [ -f <capture filter> ] [ -g ] [ -h|--help ]
14       [ -i|--interface <capture interface>|rpcap://<host>:<port>/<capture interface>|TCP@<host>:<port>|- ]
15       [ -I|--monitor-mode ]
16       [ -k <freq>,[<type>],[<center_freq1>],[<center_freq2>] ]
17       [ -L|--list-data-link-types ] [ -M ] [ -n ] [ -N <packet limit> ]
18       [ -p|--no-promiscuous-mode ] [ --ifdescr <description> ]
19       [ --ifname <name> ] [ -P ] [ -q ]
20       [ -s|--snapshot-length <capture snaplen> ] [ -S ] [ -t ]
21       [ -v|--version ] [ -w <outfile> ] [ -y|--linktype <capture link type> ]
22       [ --capture-comment <comment> ] [ --list-time-stamp-types ]
23       [ --time-stamp-type <type> ]
24

DESCRIPTION

26       Dumpcap is a network traffic dump tool. It lets you capture packet data
27       from a live network and write the packets to a file. Dumpcap's default
28       capture file format is pcapng format. When the -P option is specified,
29       the output file is written in the pcap format.
30
31       Without any options set it will use the libpcap, Npcap, or WinPcap
32       library to capture traffic from the first available network interface
33       and writes the received raw packet data, along with the packets' time
34       stamps into a pcap file.
35
36       If the -w option is not specified, Dumpcap writes to a newly created
37       pcap file with a randomly chosen name. If the -w option is specified,
38       Dumpcap writes to the file specified by that option.
39
40       Packet capturing is performed with the pcap library. The capture filter
41       syntax follows the rules of the pcap library.
42

OPTIONS

44       -a|--autostop  <capture autostop condition>
45
46           Specify a criterion that specifies when Dumpcap is to stop writing
47           to a capture file. The criterion is of the form test:value, where
48           test is one of:
49
50           duration:value Stop writing to a capture file after value seconds
51           have elapsed. Floating point values (e.g. 0.5) are allowed.
52
53           files:value Stop writing to capture files after value number of
54           files were written.
55
56           filesize:value Stop writing to a capture file after it reaches a
57           size of value kB. If this option is used together with the -b
58           option, dumpcap will stop writing to the current capture file and
59           switch to the next one if filesize is reached. Note that the
60           filesize is limited to a maximum value of 2 GiB.
61
62           packets:value Stop writing to a capture file after value packets
63           have been written. Same as -c <capture packet count>.
64
65       -b|--ring-buffer  <capture ring buffer option>
66
67           Cause Dumpcap to run in "multiple files" mode. In "multiple files"
68           mode, Dumpcap will write to several capture files. When the first
69           capture file fills up, Dumpcap will switch writing to the next file
70           and so on.
71
72           The created filenames are based on the filename given with the -w
73           option, the number of the file and on the creation date and time,
74           e.g. outfile_00001_20210714120117.pcap,
75           outfile_00002_20210714120523.pcap, ...
76
77           With the files option it’s also possible to form a "ring buffer".
78           This will fill up new files until the number of files specified, at
79           which point Dumpcap will discard the data in the first file and
80           start writing to that file and so on. If the files option is not
81           set, new files filled up until one of the capture stop conditions
82           match (or until the disk is full).
83
84           The criterion is of the form key:value, where key is one of:
85
86           duration:value switch to the next file after value seconds have
87           elapsed, even if the current file is not completely filled up.
88           Floating point values (e.g. 0.5) are allowed.
89
90           files:value begin again with the first file after value number of
91           files were written (form a ring buffer). This value must be less
92           than 100000. Caution should be used when using large numbers of
93           files: some filesystems do not handle many files in a single
94           directory well. The files criterion requires either duration,
95           interval or filesize to be specified to control when to go to the
96           next file. It should be noted that each -b parameter takes exactly
97           one criterion; to specify two criterion, each must be preceded by
98           the -b option.
99
100           filesize:value switch to the next file after it reaches a size of
101           value kB. Note that the filesize is limited to a maximum value of 2
102           GiB.
103
104           interval:value switch to the next file when the time is an exact
105           multiple of value seconds. For example, use 3600 to switch to a new
106           file every hour on the hour.
107
108           packets:value switch to the next file after it contains value
109           packets.
110
111           printname:filename print the name of the most recently written file
112           to filename after the file is closed. filename can be stdout or -
113           for standard output, or stderr for standard error.
114
115           Example: -b filesize:1000 -b files:5 results in a ring buffer of
116           five files of size one megabyte each.
117
118       -B|--buffer-size  <capture buffer size>
119
120           Set capture buffer size (in MiB, default is 2 MiB). This is used by
121           the capture driver to buffer packet data until that data can be
122           written to disk. If you encounter packet drops while capturing, try
123           to increase this size. Note that, while Dumpcap attempts to set the
124           buffer size to 2 MiB by default, and can be told to set it to a
125           larger value, the system or interface on which you’re capturing
126           might silently limit the capture buffer size to a lower value or
127           raise it to a higher value.
128
129           This is available on UNIX systems with libpcap 1.0.0 or later and
130           on Windows. It is not available on UNIX systems with earlier
131           versions of libpcap.
132
133           This option can occur multiple times. If used before the first
134           occurrence of the -i option, it sets the default capture buffer
135           size. If used after an -i option, it sets the capture buffer size
136           for the interface specified by the last -i option occurring before
137           this option. If the capture buffer size is not set specifically,
138           the default capture buffer size is used instead.
139
140       -c  <capture packet count>
141
142           Set the maximum number of packets to read when capturing live data.
143           Same as -a packets:<capture packet count>.
144
145       -C  <byte limit>
146
147           Limit the amount of memory in bytes used for storing captured
148           packets in memory while processing it. If used in combination with
149           the -N option, both limits will apply. Setting this limit will
150           enable the usage of the separate thread per interface.
151
152       -d
153
154           Dump the code generated for the capture filter in a human-readable
155           form, and exit.
156
157       -D|--list-interfaces
158
159           Print a list of the interfaces on which Dumpcap can capture, and
160           exit. For each network interface, a number and an interface name,
161           possibly followed by a text description of the interface, is
162           printed. The interface name or the number can be supplied to the -i
163           option to specify an interface on which to capture.
164
165           This can be useful on systems that don’t have a command to list
166           them (UNIX systems lacking ifconfig -a or Linux systems lacking ip
167           link show). The number can be useful on Windows systems, where the
168           interface name might be a long name or a GUID.
169
170           Note that "can capture" means that Dumpcap was able to open that
171           device to do a live capture. Depending on your system you may need
172           to run dumpcap from an account with special privileges (for
173           example, as root) to be able to capture network traffic. If
174           "dumpcap -D" is not run from such an account, it will not list any
175           interfaces.
176
177       -f  <capture filter>
178
179           Set the capture filter expression.
180
181           The entire filter expression must be specified as a single argument
182           (which means that if it contains spaces, it must be quoted).
183
184           This option can occur multiple times. If used before the first
185           occurrence of the -i option, it sets the default capture filter
186           expression. If used after an -i option, it sets the capture filter
187           expression for the interface specified by the last -i option
188           occurring before this option. If the capture filter expression is
189           not set specifically, the default capture filter expression is used
190           if provided.
191
192           Pre-defined capture filter names, as shown in the GUI menu item
193           Capture→Capture Filters, can be used by prefixing the argument with
194           "predef:". Example: -f "predef:MyPredefinedHostOnlyFilter"
195
196       -g
197
198           This option causes the output file(s) to be created with group-read
199           permission (meaning that the output file(s) can be read by other
200           members of the calling user’s group).
201
202       -h|--help
203
204           Print the version and options and exits.
205
206       -i|--interface  <capture interface>|rpcap://<host>:<port>/<capture
207       interface>|TCP@<host>:<port>|-
208
209           Set the name of the network interface or pipe to use for live
210           packet capture.
211
212           Network interface names should match one of the names listed in
213           "dumpcap -D" (described above); a number, as reported by "dumpcap
214           -D", can also be used. If you’re using UNIX, "netstat -i",
215           "ifconfig -a" or "ip link" might also work to list interface names,
216           although not all versions of UNIX support the -a option to
217           ifconfig.
218
219           If no interface is specified, Dumpcap searches the list of
220           interfaces, choosing the first non-loopback interface if there are
221           any non-loopback interfaces, and choosing the first loopback
222           interface if there are no non-loopback interfaces. If there are no
223           interfaces at all, Dumpcap reports an error and doesn’t start the
224           capture.
225
226           Pipe names should be either the name of a FIFO (named pipe) or "-"
227           to read data from the standard input. On Windows systems, pipe
228           names must be of the form "\\pipe\.*pipename*". Data read from
229           pipes must be in standard pcapng or pcap format. Pcapng data must
230           have the same endianness as the capturing host.
231
232           This option can occur multiple times. When capturing from multiple
233           interfaces, the capture file will be saved in pcapng format.
234
235       --ifdescr> <description>
236
237           Use description as the description in the capture file for the
238           interface or pipe specified before it with -i.
239
240       --ifname> <name>
241
242           Use name as the name in the capture file for the the interface or
243           pipe specified before it with -i.
244
245       -I|--monitor-mode
246
247           Put the interface in "monitor mode"; this is supported only on IEEE
248           802.11 Wi-Fi interfaces, and supported only on some operating
249           systems.
250
251           Note that in monitor mode the adapter might disassociate from the
252           network with which it’s associated, so that you will not be able to
253           use any wireless networks with that adapter. This could prevent
254           accessing files on a network server, or resolving host names or
255           network addresses, if you are capturing in monitor mode and are not
256           connected to another network with another adapter.
257
258           This option can occur multiple times. If used before the first
259           occurrence of the -i option, it enables the monitor mode for all
260           interfaces. If used after an -i option, it enables the monitor mode
261           for the interface specified by the last -i option occurring before
262           this option.
263
264       -k  <freq>,[<type>],[<center_freq1>],[<center_freq2>>
265
266           Set the channel on the interface; this is supported only on IEEE
267           802.11 Wi-Fi interfaces, and supported only on some operating
268           systems.
269
270           freq is the frequency of the channel. type is the type of the
271           channel, for 802.11n and 802.11ac. The values for type are
272
273       NOHT
274
275           Used for non-802.11n/non-802.1ac channels
276
277       HT20
278
279           20 MHz channel
280
281       HT40-
282
283           40 MHz primary channel and a lower secondary channel
284
285       HT40+
286
287           40 MHz primary channel and a higher secondary channel
288
289       HT80
290
291           80 MHz channel, with centerfreq1 as its center frequency
292
293       VHT80+80
294
295           two 80 MHz channels combined, with centerfreq1 and centerfreq2 as
296           the center frequencies of the two channels
297
298       VHT160
299
300           160 MHz channel, with centerfreq1 as its center frequency
301
302       -L|--list-data-link-types
303
304           List the data link types supported by the interface and exit. The
305           reported link types can be used for the -y option.
306
307       -M
308
309           When used with -D, -L, -S or --list-time-stamp-types print
310           machine-readable output. The machine-readable output is intended to
311           be read by Wireshark and TShark; its format is subject to change
312           from release to release.
313
314       -n
315
316           Save files as pcapng. This is the default.
317
318       -N  <packet limit>
319
320           Limit the number of packets used for storing captured packets in
321           memory while processing it. If used in combination with the -C
322           option, both limits will apply. Setting this limit will enable the
323           usage of the separate thread per interface.
324
325       -p|--no-promiscuous-mode
326
327           Don’t put the interface into promiscuous mode. Note that the
328           interface might be in promiscuous mode for some other reason;
329           hence, -p cannot be used to ensure that the only traffic that is
330           captured is traffic sent to or from the machine on which Dumpcap is
331           running, broadcast traffic, and multicast traffic to addresses
332           received by that machine.
333
334           This option can occur multiple times. If used before the first
335           occurrence of the -i option, no interface will be put into the
336           promiscuous mode. If used after an -i option, the interface
337           specified by the last -i option occurring before this option will
338           not be put into the promiscuous mode.
339
340       -P
341
342           Save files as pcap instead of the default pcapng. In situations
343           that require pcapng, such as capturing from multiple interfaces,
344           this option will be overridden.
345
346       -q
347
348           When capturing packets, don’t display the continuous count of
349           packets captured that is normally shown when saving a capture to a
350           file; instead, just display, at the end of the capture, a count of
351           packets captured. On systems that support the SIGINFO signal, such
352           as various BSDs, you can cause the current count to be displayed by
353           typing your "status" character (typically control-T, although it
354           might be set to "disabled" by default on at least some BSDs, so
355           you’d have to explicitly set it to use it).
356
357       -s|--snapshot-length  <capture snaplen>
358
359           Set the default snapshot length to use when capturing live data. No
360           more than snaplen bytes of each network packet will be read into
361           memory, or saved to disk. A value of 0 specifies a snapshot length
362           of 262144, so that the full packet is captured; this is the
363           default.
364
365           This option can occur multiple times. If used before the first
366           occurrence of the -i option, it sets the default snapshot length.
367           If used after an -i option, it sets the snapshot length for the
368           interface specified by the last -i option occurring before this
369           option. If the snapshot length is not set specifically, the default
370           snapshot length is used if provided.
371
372       -S
373
374           Print statistics for each interface once every second.
375
376       -t
377
378           Use a separate thread per interface.
379
380       -v|--version
381
382           Print the version and exit.
383
384       -w  <outfile>
385
386           Write raw packet data to outfile. Use "-" for stdout.
387
388       -y|--linktype  <capture link type>
389
390           Set the data link type to use while capturing packets. The values
391           reported by -L are the values that can be used.
392
393           This option can occur multiple times. If used before the first
394           occurrence of the -i option, it sets the default capture link type.
395           If used after an -i option, it sets the capture link type for the
396           interface specified by the last -i option occurring before this
397           option. If the capture link type is not set specifically, the
398           default capture link type is used if provided.
399
400       --capture-comment  <comment>
401
402           Add a capture comment to the output file, if supported by the
403           output file format.
404
405           This option is only available if we output the captured packets to
406           a single file.
407
408           This option may be specified multiple times. Note that Wireshark
409           currently only displays the first comment of a capture file.
410
411       --list-time-stamp-types
412
413           List time stamp types supported for the interface. If no time stamp
414           type can be set, no time stamp types are listed.
415
416       --time-stamp-type  <type>
417
418           Change the interface’s timestamp method.
419

CAPTURE FILTER SYNTAX

421       See the manual page of pcap-filter(7) or, if that doesn’t exist,
422       tcpdump(8), or, if that doesn’t exist,
423       https://gitlab.com/wireshark/wireshark/-/wikis/CaptureFilters.
424

SEE ALSO

426       wireshark(1), tshark(1), editcap(1), mergecap(1), capinfos(1), pcap(3),
427       pcap-filter(7) or tcpdump(8)
428

NOTES

430       This is the manual page for Dumpcap 3.6.0. Dumpcap is part of the
431       Wireshark distribution. The latest version of Wireshark can be found at
432       https://www.wireshark.org.
433
434       HTML versions of the Wireshark project man pages are available at
435       https://www.wireshark.org/docs/man-pages.
436

AUTHORS

438       Dumpcap is derived from the Wireshark capturing engine code; see the
439       list of authors in the Wireshark man page for a list of authors of that
440       code.
441
442
443
444                                  2021-11-25                        DUMPCAP(1)
Impressum