.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DUMPCAP 1" .TH DUMPCAP 1 "2021-12-09" "3.4.10" "The Wireshark Network Analyzer" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" dumpcap \- Dump network traffic .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBdumpcap\fR [\ \fB\-a\fR|\fB\-\-autostop\fR\ \ ]\ ... [\ \fB\-b\fR|\fB\-\-ring\-buffer\fR\ ]\ ... [\ \fB\-B\fR|\fB\-\-buffer\-size\fR\ \ ]\ [\ \fB\-c\fR\ \ ] [\ \fB\-C\fR\ \ ] [\ \fB\-d\fR\ ] [\ \fB\-D\fR|\fB\-\-list\-interfaces\fR\ ] [\ \fB\-f\fR\ \ ] [\ \fB\-g\fR\ ] [\ \fB\-h\fR|\fB\-\-help\fR\ ] [\ \fB\-i\fR|\fB\-\-interface\fR\ |rpcap://:/|TCP@:|\-\ ] [\ \fB\-I\fR|\fB\-\-monitor\-mode\fR\ ] [\ \fB\-k\fR\ ,[],[],[]\ ] [\ \fB\-L\fR|\fB\-\-list\-data\-link\-types\fR\ ] [\ \fB\-M\fR\ ] [\ \fB\-n\fR\ ] [\ \fB\-N\fR\ \ ] [\ \fB\-p\fR|\fB\-\-no\-promiscuous\-mode\fR\ ] [\ \fB\-P\fR\ ] [\ \fB\-q\fR\ ] [\ \fB\-s\fR|\fB\-\-snapshot\-length\fR\ \ ] [\ \fB\-S\fR\ ] [\ \fB\-t\fR\ ] [\ \fB\-v\fR|\fB\-\-version\fR\ ] [\ \fB\-w\fR\ \ ] [\ \fB\-y\fR|\fB\-\-linktype\fR\ \ ] [\ \fB\-\-capture\-comment\fR\ \ ] [\ \fB\-\-list\-time\-stamp\-types\fR\ ] [\ \fB\-\-time\-stamp\-type\fR\ \ ] .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBDumpcap\fR is a network traffic dump tool. It lets you capture packet data from a live network and write the packets to a file. \fBDumpcap\fR's default capture file format is \fBpcapng\fR format. When the \fB\-P\fR option is specified, the output file is written in the \&\fBpcap\fR format. .PP Without any options set it will use the libpcap, Npcap, or WinPcap library to capture traffic from the first available network interface and writes the received raw packet data, along with the packets' time stamps into a pcap file. .PP If the \fB\-w\fR option is not specified, \fBDumpcap\fR writes to a newly created pcap file with a randomly chosen name. If the \fB\-w\fR option is specified, \fBDumpcap\fR writes to the file specified by that option. .PP Packet capturing is performed with the pcap library. The capture filter syntax follows the rules of the pcap library. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\-a|\-\-autostop " 4 .IX Item "-a|--autostop " Specify a criterion that specifies when \fBDumpcap\fR is to stop writing to a capture file. The criterion is of the form \fItest:value\fR, where \fItest\fR is one of: .Sp \&\fBduration\fR:\fIvalue\fR Stop writing to a capture file after \fIvalue\fR seconds have elapsed. Floating point values (e.g. 0.5) are allowed. .Sp \&\fBfiles\fR:\fIvalue\fR Stop writing to capture files after \fIvalue\fR number of files were written. .Sp \&\fBfilesize\fR:\fIvalue\fR Stop writing to a capture file after it reaches a size of \&\fIvalue\fR kB. If this option is used together with the \-b option, dumpcap will stop writing to the current capture file and switch to the next one if filesize is reached. Note that the filesize is limited to a maximum value of 2 GiB. .Sp \&\fBpackets\fR:\fIvalue\fR Stop writing to a capture file after \fIvalue\fR packets have been written. Same as \fB\-c\fR . .IP "\-b|\-\-ring\-buffer " 4 .IX Item "-b|--ring-buffer " Cause \fBDumpcap\fR to run in \*(L"multiple files\*(R" mode. In \*(L"multiple files\*(R" mode, \&\fBDumpcap\fR will write to several capture files. When the first capture file fills up, \fBDumpcap\fR will switch writing to the next file and so on. .Sp The created filenames are based on the filename given with the \fB\-w\fR option, the number of the file and on the creation date and time, e.g. outfile_00001_20210714120117.pcap, outfile_00002_20210714120523.pcap, ... .Sp With the \fIfiles\fR option it's also possible to form a \*(L"ring buffer\*(R". This will fill up new files until the number of files specified, at which point \fBDumpcap\fR will discard the data in the first file and start writing to that file and so on. If the \fIfiles\fR option is not set, new files filled up until one of the capture stop conditions match (or until the disk is full). .Sp The criterion is of the form \fIkey:value\fR, where \fIkey\fR is one of: .Sp \&\fBduration\fR:\fIvalue\fR switch to the next file after \fIvalue\fR seconds have elapsed, even if the current file is not completely filled up. Floating point values (e.g. 0.5) are allowed. .Sp \&\fBfiles\fR:\fIvalue\fR begin again with the first file after \fIvalue\fR number of files were written (form a ring buffer). This value must be less than 100000. Caution should be used when using large numbers of files: some filesystems do not handle many files in a single directory well. The \fBfiles\fR criterion requires either \fBduration\fR, \fBinterval\fR or \fBfilesize\fR to be specified to control when to go to the next file. It should be noted that each \fB\-b\fR parameter takes exactly one criterion; to specify two criterion, each must be preceded by the \fB\-b\fR option. .Sp \&\fBfilesize\fR:\fIvalue\fR switch to the next file after it reaches a size of \&\fIvalue\fR kB. Note that the filesize is limited to a maximum value of 2 GiB. .Sp \&\fBinterval\fR:\fIvalue\fR switch to the next file when the time is an exact multiple of \fIvalue\fR seconds. For example, use 3600 to switch to a new file every hour on the hour. .Sp \&\fBpackets\fR:\fIvalue\fR switch to the next file after it contains \fIvalue\fR packets. .Sp \&\fBprintname\fR:\fIfilename\fR print the name of the most recently written file to \fIfilename\fR after the file is closed. \fIfilename\fR can be \f(CW\*(C`stdout\*(C'\fR or \f(CW\*(C`\-\*(C'\fR for standard output, or \f(CW\*(C`stderr\*(C'\fR for standard error. .Sp Example: \fB\-b filesize:1000 \-b files:5\fR results in a ring buffer of five files of size one megabyte each. .IP "\-B|\-\-buffer\-size " 4 .IX Item "-B|--buffer-size " Set capture buffer size (in MiB, default is 2 MiB). This is used by the capture driver to buffer packet data until that data can be written to disk. If you encounter packet drops while capturing, try to increase this size. Note that, while \fBDumpcap\fR attempts to set the buffer size to 2 MiB by default, and can be told to set it to a larger value, the system or interface on which you're capturing might silently limit the capture buffer size to a lower value or raise it to a higher value. .Sp This is available on \s-1UNIX\s0 systems with libpcap 1.0.0 or later and on Windows. It is not available on \s-1UNIX\s0 systems with earlier versions of libpcap. .Sp This option can occur multiple times. If used before the first occurrence of the \fB\-i\fR option, it sets the default capture buffer size. If used after an \fB\-i\fR option, it sets the capture buffer size for the interface specified by the last \fB\-i\fR option occurring before this option. If the capture buffer size is not set specifically, the default capture buffer size is used instead. .IP "\-c " 4 .IX Item "-c " Set the maximum number of packets to read when capturing live data. Same as \fB\-a packets:\fR. .IP "\-C " 4 .IX Item "-C " Limit the amount of memory in bytes used for storing captured packets in memory while processing it. If used in combination with the \fB\-N\fR option, both limits will apply. Setting this limit will enable the usage of the separate thread per interface. .IP "\-d" 4 .IX Item "-d" Dump the code generated for the capture filter in a human-readable form, and exit. .IP "\-D|\-\-list\-interfaces" 4 .IX Item "-D|--list-interfaces" Print a list of the interfaces on which \fBDumpcap\fR can capture, and exit. For each network interface, a number and an interface name, possibly followed by a text description of the interface, is printed. The interface name or the number can be supplied to the \fB\-i\fR option to specify an interface on which to capture. .Sp This can be useful on systems that don't have a command to list them (\s-1UNIX\s0 systems lacking \fBifconfig \-a\fR or Linux systems lacking \&\fBip link show\fR). The number can be useful on Windows systems, where the interface name might be a long name or a \s-1GUID.\s0 .Sp Note that \*(L"can capture\*(R" means that \fBDumpcap\fR was able to open that device to do a live capture. Depending on your system you may need to run dumpcap from an account with special privileges (for example, as root) to be able to capture network traffic. If "\fBdumpcap \-D\fR" is not run from such an account, it will not list any interfaces. .IP "\-f " 4 .IX Item "-f " Set the capture filter expression. .Sp The entire filter expression must be specified as a single argument (which means that if it contains spaces, it must be quoted). .Sp This option can occur multiple times. If used before the first occurrence of the \fB\-i\fR option, it sets the default capture filter expression. If used after an \fB\-i\fR option, it sets the capture filter expression for the interface specified by the last \fB\-i\fR option occurring before this option. If the capture filter expression is not set specifically, the default capture filter expression is used if provided. .Sp Pre-defined capture filter names, as shown in the \s-1GUI\s0 menu item Capture\->Capture Filters, can be used by prefixing the argument with \*(L"predef:\*(R". Example: \fB\-f \*(L"predef:MyPredefinedHostOnlyFilter\*(R"\fR .IP "\-g" 4 .IX Item "-g" This option causes the output file(s) to be created with group-read permission (meaning that the output file(s) can be read by other members of the calling user's group). .IP "\-h|\-\-help" 4 .IX Item "-h|--help" Print the version and options and exits. .IP "\-i|\-\-interface |rpcap://:/|TCP@:|\-" 4 .IX Item "-i|--interface |rpcap://:/|TCP@:|-" Set the name of the network interface or pipe to use for live packet capture. .Sp Network interface names should match one of the names listed in "\fBdumpcap \-D\fR\*(L" (described above); a number, as reported by \&\*(R"\fBdumpcap \-D\fR\*(L", can also be used. If you're using \s-1UNIX, \*(R"\s0\fBnetstat \&\-i\fR\*(L", \*(R"\fBifconfig \-a\fR\*(L" or \*(R"\fBip link\fR" might also work to list interface names, although not all versions of \s-1UNIX\s0 support the \fB\-a\fR option to \fBifconfig\fR. .Sp If no interface is specified, \fBDumpcap\fR searches the list of interfaces, choosing the first non-loopback interface if there are any non-loopback interfaces, and choosing the first loopback interface if there are no non-loopback interfaces. If there are no interfaces at all, \&\fBDumpcap\fR reports an error and doesn't start the capture. .Sp Pipe names should be either the name of a \s-1FIFO\s0 (named pipe) or \*(L"\-\*(R" to read data from the standard input. On Windows systems, pipe names must be of the form "\e\epipe\e.\e\fBpipename\fR". Data read from pipes must be in standard pcapng or pcap format. Pcapng data must have the same endianness as the capturing host. .Sp This option can occur multiple times. When capturing from multiple interfaces, the capture file will be saved in pcapng format. .IP "\-I|\-\-monitor\-mode" 4 .IX Item "-I|--monitor-mode" Put the interface in \*(L"monitor mode\*(R"; this is supported only on \s-1IEEE 802.11\s0 Wi-Fi interfaces, and supported only on some operating systems. .Sp Note that in monitor mode the adapter might disassociate from the network with which it's associated, so that you will not be able to use any wireless networks with that adapter. This could prevent accessing files on a network server, or resolving host names or network addresses, if you are capturing in monitor mode and are not connected to another network with another adapter. .Sp This option can occur multiple times. If used before the first occurrence of the \fB\-i\fR option, it enables the monitor mode for all interfaces. If used after an \fB\-i\fR option, it enables the monitor mode for the interface specified by the last \fB\-i\fR option occurring before this option. .IP "\-k ,[],[],[>" 4 .IX Item "-k ,[],[],[>" Set the channel on the interface; this is supported only on \s-1IEEE 802.11\s0 Wi-Fi interfaces, and supported only on some operating systems. .Sp \&\fIfreq\fR is the frequency of the channel. \fItype\fR is the type of the channel, for 802.11n and 802.11ac. The values for \fItype\fR are .RS 4 .IP "\s-1NOHT\s0" 8 .IX Item "NOHT" Used for non\-802.11n/non\-802.1ac channels .IP "\s-1HT20\s0" 8 .IX Item "HT20" 20 MHz channel .IP "\s-1HT40\-\s0" 8 .IX Item "HT40-" 40 MHz primary channel and a lower secondary channel .IP "\s-1HT40+\s0" 8 .IX Item "HT40+" 40 MHz primary channel and a higher secondary channel .IP "\s-1HT80\s0" 8 .IX Item "HT80" 80 MHz channel, with \fIcenterfreq1\fR as its center frequency .IP "\s-1VHT80+80\s0" 8 .IX Item "VHT80+80" two 80 MHz channels combined, with \fIcenterfreq1\fR and \fIcenterfreq2\fR as the center frequencies of the two channels .IP "\s-1VHT160\s0" 8 .IX Item "VHT160" 160 MHz channel, with \fIcenterfreq1\fR as its center frequency .RE .RS 4 .RE .IP "\-L|\-\-list\-data\-link\-types" 4 .IX Item "-L|--list-data-link-types" List the data link types supported by the interface and exit. The reported link types can be used for the \fB\-y\fR option. .IP "\-M" 4 .IX Item "-M" When used with \fB\-D\fR, \fB\-L\fR, \fB\-S\fR or \fB\-\-list\-time\-stamp\-types\fR print machine-readable output. The machine-readable output is intended to be read by \fBWireshark\fR and \&\fBTShark\fR; its format is subject to change from release to release. .IP "\-n" 4 .IX Item "-n" Save files as pcapng. This is the default. .IP "\-N " 4 .IX Item "-N " Limit the number of packets used for storing captured packets in memory while processing it. If used in combination with the \fB\-C\fR option, both limits will apply. Setting this limit will enable the usage of the separate thread per interface. .IP "\-p|\-\-no\-promiscuous\-mode" 4 .IX Item "-p|--no-promiscuous-mode" \&\fIDon't\fR put the interface into promiscuous mode. Note that the interface might be in promiscuous mode for some other reason; hence, \&\fB\-p\fR cannot be used to ensure that the only traffic that is captured is traffic sent to or from the machine on which \fBDumpcap\fR is running, broadcast traffic, and multicast traffic to addresses received by that machine. .Sp This option can occur multiple times. If used before the first occurrence of the \fB\-i\fR option, no interface will be put into the promiscuous mode. If used after an \fB\-i\fR option, the interface specified by the last \fB\-i\fR option occurring before this option will not be put into the promiscuous mode. .IP "\-P" 4 .IX Item "-P" Save files as pcap instead of the default pcapng. In situations that require pcapng, such as capturing from multiple interfaces, this option will be overridden. .IP "\-q" 4 .IX Item "-q" When capturing packets, don't display the continuous count of packets captured that is normally shown when saving a capture to a file; instead, just display, at the end of the capture, a count of packets captured. On systems that support the \s-1SIGINFO\s0 signal, such as various BSDs, you can cause the current count to be displayed by typing your \&\*(L"status\*(R" character (typically control-T, although it might be set to \*(L"disabled\*(R" by default on at least some BSDs, so you'd have to explicitly set it to use it). .IP "\-s|\-\-snapshot\-length " 4 .IX Item "-s|--snapshot-length " Set the default snapshot length to use when capturing live data. No more than \fIsnaplen\fR bytes of each network packet will be read into memory, or saved to disk. A value of 0 specifies a snapshot length of 262144, so that the full packet is captured; this is the default. .Sp This option can occur multiple times. If used before the first occurrence of the \fB\-i\fR option, it sets the default snapshot length. If used after an \fB\-i\fR option, it sets the snapshot length for the interface specified by the last \fB\-i\fR option occurring before this option. If the snapshot length is not set specifically, the default snapshot length is used if provided. .IP "\-S" 4 .IX Item "-S" Print statistics for each interface once every second. .IP "\-t" 4 .IX Item "-t" Use a separate thread per interface. .IP "\-v|\-\-version" 4 .IX Item "-v|--version" Print the version and exit. .IP "\-w " 4 .IX Item "-w " Write raw packet data to \fIoutfile\fR. Use \*(L"\-\*(R" for stdout. .IP "\-y|\-\-linktype " 4 .IX Item "-y|--linktype " Set the data link type to use while capturing packets. The values reported by \fB\-L\fR are the values that can be used. .Sp This option can occur multiple times. If used before the first occurrence of the \fB\-i\fR option, it sets the default capture link type. If used after an \fB\-i\fR option, it sets the capture link type for the interface specified by the last \fB\-i\fR option occurring before this option. If the capture link type is not set specifically, the default capture link type is used if provided. .IP "\-\-capture\-comment " 4 .IX Item "--capture-comment " Add a capture comment to the output file. .Sp This option is only available if we output the captured packets to a single file in pcapng format. Only one capture comment may be set per output file. .IP "\-\-list\-time\-stamp\-types" 4 .IX Item "--list-time-stamp-types" List time stamp types supported for the interface. If no time stamp type can be set, no time stamp types are listed. .IP "\-\-time\-stamp\-type " 4 .IX Item "--time-stamp-type " Change the interface's timestamp method. .SH "CAPTURE FILTER SYNTAX" .IX Header "CAPTURE FILTER SYNTAX" See the manual page of \fBpcap\-filter\fR\|(7) or, if that doesn't exist, \fBtcpdump\fR\|(8), or, if that doesn't exist, . .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBwireshark\fR\|(1), \fBtshark\fR\|(1), \fBeditcap\fR\|(1), \fBmergecap\fR\|(1), \fBcapinfos\fR\|(1), \fBpcap\fR\|(3), \&\fBpcap\-filter\fR\|(7) or \fBtcpdump\fR\|(8) .SH "NOTES" .IX Header "NOTES" \&\fBDumpcap\fR is part of the \fBWireshark\fR distribution. The latest version of \fBWireshark\fR can be found at . .PP \&\s-1HTML\s0 versions of the Wireshark project man pages are available at: . .SH "AUTHORS" .IX Header "AUTHORS" \&\fBDumpcap\fR is derived from the \fBWireshark\fR capturing engine code; see the list of authors in the \fBWireshark\fR man page for a list of authors of that code.