.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .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. | will give a .\" real vertical bar. \*(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-|\(bv\*(Tr .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" '' 'br\} .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .\" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .hy 0 .if n .na .\" .\" 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 "2009-01-15" "1.1.2" "The Wireshark Network Analyzer" .SH "NAME" dumpcap \- Dump network traffic .SH "SYNOPSYS" .IX Header "SYNOPSYS" \&\fBdumpcap\fR [\ \fB\-a\fR\ \ ]\ ... [\ \fB\-b\fR\ ]\ ... [\ \fB\-B\fR\ \ ]\ [\ \fB\-c\fR\ \ ] [\ \fB\-D\fR\ ] [\ \fB\-f\fR\ \ ] [\ \fB\-h\fR\ ] [\ \fB\-i\fR\ |\-\ ] [\ \fB\-L\fR\ ] [\ \fB\-M\fR\ ] [\ \fB\-p\fR\ ] [\ \fB\-s\fR\ \ ] [\ \fB\-v\fR\ ] [\ \fB\-w\fR\ \ ] [\ \fB\-y\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 native capture file format is \fBlibpcap\fR format, which is also the format used by \fBWireshark\fR, \fBtcpdump\fR and various other tools. .PP 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. .PP If the \fB\-w\fR option is not specified, \fBDumpcap\fR writes to a newly created libpcap 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 " 4 .IX Item "-a " Specify a criterion that specifies when \fBDumpcap\fR is to stop writing to a capture file. The criterion is of the form \fItest\fR\fB:\fR\fIvalue\fR, where \fItest\fR is one of: .Sp \&\fBduration\fR:\fIvalue\fR Stop writing to a capture file after \fIvalue\fR seconds have elapsed. .Sp \&\fBfilesize\fR:\fIvalue\fR Stop writing to a capture file after it reaches a size of \fIvalue\fR 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. .Sp \&\fBfiles\fR:\fIvalue\fR Stop writing to capture files after \fIvalue\fR number of files were written. .IP "\-b " 4 .IX Item "-b " 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_20050604120117.pcap, outfile_00001_20050604120523.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 if full). .Sp The criterion is of the form \fIkey\fR\fB:\fR\fIvalue\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. .Sp \&\fBfilesize\fR:\fIvalue\fR switch to the next file after it reaches a size of \&\fIvalue\fR kilobytes (where a kilobyte is 1024 bytes). .Sp \&\fBfiles\fR:\fIvalue\fR begin again with the first file after \fIvalue\fR number of files were written (form a ring buffer). .IP "\-B " 4 .IX Item "-B " Win32 only: set capture buffer size (in \s-1MB\s0, default is 1MB). This is used by the 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. .IP "\-c " 4 .IX Item "-c " Set the maximum number of packets to read when capturing live data. .IP "\-D" 4 .IX Item "-D" 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 (e.g., Windows systems, or \s-1UNIX\s0 systems lacking \fBifconfig \-a\fR); the number can be useful on Windows 2000 and later systems, where the interface name is a somewhat complex string. .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). .IP "\-h" 4 .IX Item "-h" Print the version and options and exits. .IP "\-i |\-" 4 .IX Item "-i |-" 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\s0, \*(R"\fBnetstat \&\-i\fR\*(L" or \*(R"\fBifconfig \-a\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 ``\-'' to read data from the standard input. Data read from pipes must be in standard libpcap format. .Sp Note: the Win32 version of \fBDumpcap\fR doesn't support capturing from pipes or stdin! .IP "\-L" 4 .IX Item "-L" 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 and \fB\-L\fR, print verbose, machine-readable output. .IP "\-p" 4 .IX Item "-p" \&\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. .IP "\-s " 4 .IX Item "-s " 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. .IP "\-v" 4 .IX Item "-v" Print the version and exit. .IP "\-w " 4 .IX Item "-w " Write raw packet data to \fIoutfile\fR. .Sp \&\s-1NOTE:\s0 The usage of \*(L"\-\*(R" for stdout is not allowed here! .IP "\-y " 4 .IX Item "-y " Set the data link type to use while capturing packets. The values reported by \fB\-L\fR are the values that can be used. .SH "CAPTURE FILTER SYNTAX" .IX Header "CAPTURE FILTER SYNTAX" See the manual page of \fIpcap\-filter\fR\|(4) or, if that doesn't exist, \fItcpdump\fR\|(8). .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIwireshark\fR\|(1), \fItshark\fR\|(1), \fIeditcap\fR\|(1), \fImergecap\fR\|(1), \fIcapinfos\fR\|(1), \fIpcap\-filter\fR\|(4), \&\fItcpdump\fR\|(8), \fIpcap\fR\|(3) .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.