Without any options set it will use the pcap 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 libpcap file.
If the -w option is not specified, Dumpcap writes to a newly created libpcap file with a randomly chosen name. If the -w option is specified, Dumpcap writes to the file specified by that option.
Packet capturing is performed with the pcap library. The capture filter syntax follows the rules of the pcap library.
duration:value Stop writing to a capture file after value seconds have elapsed.
filesize:value Stop writing to a capture file after it reaches a size of value kilobytes (where a kilobyte is 1024 bytes). 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.
files:value Stop writing to capture files after value number of files were written.
The created filenames are based on the filename given with the -w option, the number of the file and on the creation date and time, e.g. outfile_00001_20050604120117.pcap, outfile_00001_20050604120523.pcap, ...
With the files option it's also possible to form a ``ring buffer''. This will fill up new files until the number of files specified, at which point Dumpcap will discard the data in the first file and start writing to that file and so on. If the files option is not set, new files filled up until one of the capture stop conditions match (or until the disk if full).
The criterion is of the form key:value, where key is one of:
duration:value switch to the next file after value seconds have elapsed, even if the current file is not completely filled up.
filesize:value switch to the next file after it reaches a size of value kilobytes (where a kilobyte is 1024 bytes).
files:value begin again with the first file after value number of files were written (form a ring buffer).
This can be useful on systems that don't have a command to list them (e.g., Windows systems, or UNIX systems lacking ifconfig -a); the number can be useful on Windows 2000 and later systems, where the interface name is a somewhat complex string.
Note that ``can capture'' means that Dumpcap 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 "dumpcap -D" is not run from such an account, it will not list any interfaces.
The entire filter expression must be specified as a single argument (which means that if it contains spaces, it must be quoted).
Network interface names should match one of the names listed in "dumpcap -D`` (described above); a number, as reported by ''dumpcap -D``, can also be used. If you're using UNIX, ''netstat -i`` or ''ifconfig -a" might also work to list interface names, although not all versions of UNIX support the -a option to ifconfig.
If no interface is specified, Dumpcap 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, Dumpcap reports an error and doesn't start the capture.
Pipe names should be either the name of a FIFO (named pipe) or ``-'' to read data from the standard input. Data read from pipes must be in standard libpcap format.
Note: the Win32 version of Dumpcap doesn't support capturing from pipes or stdin!
NOTE: The usage of ``-'' for stdout is not allowed here!
HTML versions of the Wireshark project man pages are available at: <http://www.wireshark.org/docs/man-pages>.