4 tshark - Dump and analyze network traffic
9 S<[ B<-a> E<lt>capture autostop conditionE<gt> ] ...>
10 S<[ B<-b> E<lt>capture ring buffer optionE<gt>] ...>
11 S<[ B<-B> E<lt>capture buffer sizeE<gt> ] >
12 S<[ B<-c> E<lt>capture packet countE<gt> ]>
13 S<[ B<-C> E<lt>configuration profileE<gt> ]>
14 S<[ B<-d> E<lt>layer typeE<gt>==E<lt>selectorE<gt>,E<lt>decode-as protocolE<gt> ]>
16 S<[ B<-e> E<lt>fieldE<gt> ]>
17 S<[ B<-E> E<lt>field print optionE<gt> ]>
18 S<[ B<-f> E<lt>capture filterE<gt> ]>
19 S<[ B<-F> E<lt>file formatE<gt> ]>
21 S<[ B<-H> E<lt>input hosts fileE<gt> ]>
22 S<[ B<-i> E<lt>capture interfaceE<gt>|- ]>
24 S<[ B<-K> E<lt>keytabE<gt> ]>
28 S<[ B<-N> E<lt>name resolving flagsE<gt> ]>
29 S<[ B<-o> E<lt>preference settingE<gt> ] ...>
32 S<[ B<-r> E<lt>infileE<gt> ]>
33 S<[ B<-R> E<lt>read (display) filterE<gt> ]>
34 S<[ B<-s> E<lt>capture snaplenE<gt> ]>
36 S<[ B<-t> ad|a|r|d|dd|e ]>
37 S<[ B<-T> pdml|psml|ps|text|fields ]>
40 S<[ B<-O> E<lt>protocolsE<gt> ]>
41 S<[ B<-w> E<lt>outfileE<gt>|- ]>
42 S<[ B<-W> E<lt>file format optionE<gt>]>
44 S<[ B<-X> E<lt>eXtension optionE<gt>]>
45 S<[ B<-y> E<lt>capture link typeE<gt> ]>
46 S<[ B<-z> E<lt>statisticsE<gt> ]>
47 S<[ E<lt>capture filterE<gt> ]>
50 B<-G> [fields|fields2|fields3|protocols|values|decodes|defaultprefs|currentprefs]
54 B<TShark> is a network protocol analyzer. It lets you capture packet
55 data from a live network, or read packets from a previously saved
56 capture file, either printing a decoded form of those packets to the
57 standard output or writing the packets to a file. B<TShark>'s native
58 capture file format is B<libpcap> format, which is also the format used
59 by B<tcpdump> and various other tools.
61 Without any options set, B<TShark> will work much like B<tcpdump>. It will
62 use the pcap library to capture traffic from the first available network
63 interface and displays a summary line on stdout for each received packet.
65 B<TShark> is able to detect, read and write the same capture files that
66 are supported by B<Wireshark>.
67 The input file doesn't need a specific filename extension; the file
68 format and an optional gzip compression will be automatically detected.
69 Near the beginning of the DESCRIPTION section of wireshark(1) or
70 L<http://www.wireshark.org/docs/man-pages/wireshark.html>
71 is a detailed description of the way B<Wireshark> handles this, which is
72 the same way B<Tshark> handles this.
74 Compressed file support uses (and therefore requires) the zlib library.
75 If the zlib library is not present, B<TShark> will compile, but will
76 be unable to read compressed files.
78 If the B<-w> option is not specified, B<TShark> writes to the standard
79 output the text of a decoded form of the packets it captures or reads.
80 If the B<-w> option is specified, B<TShark> writes to the file
81 specified by that option the raw data of the packets, along with the
84 When writing a decoded form of packets, B<TShark> writes, by
85 default, a summary line containing the fields specified by the
86 preferences file (which are also the fields displayed in the packet list
87 pane in B<Wireshark>), although if it's writing packets as it captures
88 them, rather than writing packets from a saved capture file, it won't
89 show the "frame number" field. If the B<-V> option is specified, it
90 writes instead a view of the details of the packet, showing all the
91 fields of all protocols in the packet. If the B<-O> option is
92 specified in combination with B<-V>, it will only show the full
93 protocols specified. Use the output of "tshark -G protocols" to
94 find the abbrevations of the protocols you can specify.
96 If you want to write the decoded form of packets to a file, run
97 B<TShark> without the B<-w> option, and redirect its standard output to
98 the file (do I<not> use the B<-w> option).
100 When writing packets to a file, B<TShark>, by default, writes the
101 file in B<libpcap> format, and writes all of the packets it sees to the
102 output file. The B<-F> option can be used to specify the format in which
103 to write the file. This list of available file formats is displayed by
104 the B<-F> flag without a value. However, you can't specify a file format
107 Read filters in B<TShark>, which allow you to select which packets
108 are to be decoded or written to a file, are very powerful; more fields
109 are filterable in B<TShark> than in other protocol analyzers, and the
110 syntax you can use to create your filters is richer. As B<TShark>
111 progresses, expect more and more protocol fields to be allowed in read
114 Packet capturing is performed with the pcap library. The capture filter
115 syntax follows the rules of the pcap library. This syntax is different
116 from the read filter syntax. A read filter can also be specified when
117 capturing, and only packets that pass the read filter will be displayed
118 or saved to the output file; note, however, that capture filters are much
119 more efficient than read filters, and it may be more difficult for
120 B<TShark> to keep up with a busy network if a read filter is
121 specified for a live capture.
123 A capture or read filter can either be specified with the B<-f> or B<-R>
124 option, respectively, in which case the entire filter expression must be
125 specified as a single argument (which means that if it contains spaces,
126 it must be quoted), or can be specified with command-line arguments
127 after the option arguments, in which case all the arguments after the
128 filter arguments are treated as a filter expression. Capture filters
129 are supported only when doing a live capture; read filters are supported
130 when doing a live capture and when reading a capture file, but require
131 TShark to do more work when filtering, so you might be more likely to
132 lose packets under heavy load if you're using a read filter. If the
133 filter is specified with command-line arguments after the option
134 arguments, it's a capture filter if a capture is being done (i.e., if no
135 B<-r> option was specified) and a read filter if a capture file is being
136 read (i.e., if a B<-r> option was specified).
138 The B<-G> option is a special mode that simply causes B<Tshark>
139 to dump one of several types of internal glossaries and then exit.
145 =item -a E<lt>capture autostop conditionE<gt>
147 Specify a criterion that specifies when B<TShark> is to stop writing
148 to a capture file. The criterion is of the form I<test>B<:>I<value>,
149 where I<test> is one of:
151 B<duration>:I<value> Stop writing to a capture file after I<value> seconds
154 B<filesize>:I<value> Stop writing to a capture file after it reaches a size of
155 I<value> kilobytes (where a kilobyte is 1024 bytes). If this option is used
156 together with the -b option, B<TShark> will stop writing to the current
157 capture file and switch to the next one if filesize is reached. When reading a
158 capture file, B<TShark> will stop reading the file after the number of bytes
159 read exceeds this number (the complete packet will be read, so more bytes than
160 this number may be read).
162 B<files>:I<value> Stop writing to capture files after I<value> number of files
165 =item -b E<lt>capture ring buffer optionE<gt>
167 Cause B<TShark> to run in "multiple files" mode. In "multiple files" mode,
168 B<TShark> will write to several capture files. When the first capture file
169 fills up, B<TShark> will switch writing to the next file and so on.
171 The created filenames are based on the filename given with the B<-w> option,
172 the number of the file and on the creation date and time,
173 e.g. outfile_00001_20050604120117.pcap, outfile_00002_20050604120523.pcap, ...
175 With the I<files> option it's also possible to form a "ring buffer".
176 This will fill up new files until the number of files specified,
177 at which point B<TShark> will discard the data in the first file and start
178 writing to that file and so on. If the I<files> option is not set,
179 new files filled up until one of the capture stop conditions match (or
180 until the disk is full).
182 The criterion is of the form I<key>B<:>I<value>,
183 where I<key> is one of:
185 B<duration>:I<value> switch to the next file after I<value> seconds have
186 elapsed, even if the current file is not completely filled up.
188 B<filesize>:I<value> switch to the next file after it reaches a size of
189 I<value> kilobytes (where a kilobyte is 1024 bytes).
191 B<files>:I<value> begin again with the first file after I<value> number of
192 files were written (form a ring buffer). This value must be less than 100000.
193 Caution should be used when using large numbers of files: some filesystems do
194 not handle many files in a single directory well. The B<files> criterion
195 requires either B<duration> or B<filesize> to be specified to control when to
196 go to the next file. It should be noted that each B<-b> parameter takes exactly
197 one criterion; to specify two criterion, each must be preceded by the B<-b>
200 Example: B<-b filesize:1024 -b files:5> results in a ring buffer of five files
201 of size one megabyte.
203 =item -B E<lt>capture buffer sizeE<gt>
205 Set capture buffer size (in MB, default is 1MB). This is used by the
206 the capture driver to buffer packet data until that data can be written
207 to disk. If you encounter packet drops while capturing, try to increase
208 this size. Note that, while B<Tshark> attempts to set the buffer size
209 to 1MB by default, and can be told to set it to a larger value, the
210 system or interface on which you're capturing might silently limit the
211 capture buffer size to a lower value or raise it to a higher value.
213 This is available on UNIX systems with libpcap 1.0.0 or later and on
214 Windows. It is not available on UNIX systems with earlier versions of
217 This option can occur multiple times. If used before the first
218 occurrence of the B<-i> option, it sets the default capture buffer size.
219 If used after an B<-i> option, it sets the capture buffer size for
220 the interface specified by the last B<-i> option occurring before
221 this option. If the capture buffer size is not set specifically,
222 the default capture buffer size is used if provided.
224 =item -c E<lt>capture packet countE<gt>
226 Set the maximum number of packets to read when capturing live
227 data. If reading a capture file, set the maximum number of packets to read.
229 =item -C E<lt>configuration profileE<gt>
231 Run with the given configuration profile.
233 =item -d E<lt>layer typeE<gt>==E<lt>selectorE<gt>,E<lt>decode-as protocolE<gt>
235 Like Wireshark's B<Decode As...> feature, this lets you specify how a
236 layer type should be dissected. If the layer type in question (for example,
237 B<tcp.port> or B<udp.port> for a TCP or UDP port number) has the specified
238 selector value, packets should be dissected as the specified protocol.
240 Example: B<-d tcp.port==8888,http> will decode any traffic running over
241 TCP port 8888 as HTTP.
243 Using an invalid selector or protocol will print out a list of valid selectors
244 and protocol names, respectively.
246 Example: B<-d .> is a quick way to get a list of valid selectors.
248 Example: B<-d ethertype==0x0800.> is a quick way to get a list of protocols that can be
249 selected with an ethertype.
253 Print a list of the interfaces on which B<TShark> can capture, and
254 exit. For each network interface, a number and an
255 interface name, possibly followed by a text description of the
256 interface, is printed. The interface name or the number can be supplied
257 to the B<-i> option to specify an interface on which to capture.
259 This can be useful on systems that don't have a command to list them
260 (e.g., Windows systems, or UNIX systems lacking B<ifconfig -a>);
261 the number can be useful on Windows 2000 and later systems, where the
262 interface name is a somewhat complex string.
264 Note that "can capture" means that B<TShark> was able to open that
265 device to do a live capture. Depending on your system you may need to
266 run tshark from an account with special privileges (for example, as
267 root) to be able to capture network traffic. If B<TShark -D> is not run
268 from such an account, it will not list any interfaces.
270 =item -e E<lt>fieldE<gt>
272 Add a field to the list of fields to display if B<-T fields> is
273 selected. This option can be used multiple times on the command line.
274 At least one field must be provided if the B<-T fields> option is
277 Example: B<-e frame.number -e ip.addr -e udp>
279 Giving a protocol rather than a single field will print multiple items
280 of data about the protocol as a single field. Fields are separated by
281 tab characters by default. B<-E> controls the format of the printed
284 =item -E E<lt>field print optionE<gt>
286 Set an option controlling the printing of fields when B<-T fields> is
291 B<header=y|n> If B<y>, print a list of the field names given using B<-e>
292 as the first line of the output; the field name will be separated using
293 the same character as the field values. Defaults to B<n>.
295 B<separator=/t|/s|>E<lt>characterE<gt> Set the separator character to
296 use for fields. If B</t> tab will be used (this is the default), if
297 B</s>, a single space will be used. Otherwise any character that can be
298 accepted by the command line as part of the option may be used.
300 B<occurrence=f|l|a> Select which occurrence to use for fields that have
301 multiple occurrences. If B<f> the first occurrence will be used, if B<l>
302 the last occurrence will be used and if B<a> all occurrences will be used
303 (this is the default).
305 B<aggregator=,|/s|>E<lt>characterE<gt> Set the aggregator character to
306 use for fields that have multiple occurrences. If B<,> a comma will be used
307 (this is the default), if B</s>, a single space will be used. Otherwise
308 any character that can be accepted by the command line as part of the
311 B<quote=d|s|n> Set the quote character to use to surround fields. B<d>
312 uses double-quotes, B<s> single-quotes, B<n> no quotes (the default).
314 =item -f E<lt>capture filterE<gt>
316 Set the capture filter expression.
318 This option can occur multiple times. If used before the first
319 occurrence of the B<-i> option, it sets the default capture filter expression.
320 If used after an B<-i> option, it sets the capture filter expression for
321 the interface specified by the last B<-i> option occurring before
322 this option. If the capture filter expression is not set specifically,
323 the default capture filter expression is used if provided.
325 =item -F E<lt>file formatE<gt>
327 Set the file format of the output capture file written using the B<-w>
328 option. The output written with the B<-w> option is raw packet data, not
329 text, so there is no B<-F> option to request text output. The option B<-F>
330 without a value will list the available formats.
332 =item -G [fields|fields2|fields3|protocols|values|decodes|defaultprefs|currentprefs]
334 The B<-G> option will cause B<Tshark> to dump one of several types of glossaries
335 and then exit. If no specific glossary type is specified, then the B<fields> report will be generated by default.
337 The available report types include:
339 B<fields> Dumps the contents of the registration database to
340 stdout. An independent program can take this output and format it into nice
341 tables or HTML or whatever. There is one record per line. Each record is
342 either a protocol or a header field, differentiated by the first field.
343 The fields are tab-delimited.
348 * Field 2 = descriptive protocol name
349 * Field 3 = protocol abbreviation
354 * Field 2 = descriptive field name
355 * Field 3 = field abbreviation
356 * Field 4 = type ( textual representation of the ftenum type )
357 * Field 5 = parent protocol abbreviation
358 * Field 6 = blurb describing field
360 B<fields2> Same as the B<fields> report but includes two additional columns.
362 * Field 7 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
363 * Field 8 = blurb describing field (yes, apparently we repeated this accidentally)
365 B<fields3> Same as the B<fields> report but includes two additional columns.
367 * Field 7 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
368 * Field 8 = bitmask: format: hex: 0x....
370 B<protocols> Dumps the protocols in the registration database to stdout.
371 An independent program can take this output and format it into nice tables
372 or HTML or whatever. There is one record per line. The fields are tab-delimited.
374 * Field 1 = protocol name
375 * Field 2 = protocol short name
376 * Field 3 = protocol filter name
378 B<values> Dumps the value_strings, range_strings or true/false strings
379 for fields that have them. There is one record per line. Fields are
380 tab-delimited. There are three types of records: Value String, Range
381 String and True/False String. The first field, 'V', 'R' or 'T', indicates
387 * Field 2 = field abbreviation to which this value string corresponds
388 * Field 3 = Integer value
394 * Field 2 = field abbreviation to which this range string corresponds
395 * Field 3 = Integer value: lower bound
396 * Field 4 = Integer value: upper bound
402 * Field 2 = field abbreviation to which this true/false string corresponds
403 * Field 3 = True String
404 * Field 4 = False String
406 B<decodes> Dumps the "layer type"/"decode as" associations to stdout.
407 There is one record per line. The fields are tab-delimited.
409 * Field 1 = layer type, e.g. "tcp.port"
410 * Field 2 = selector in decimal
411 * Field 3 = "decode as" name, e.g. "http"
413 B<defaultprefs> Dumps a default preferences file to stdout.
415 B<currentprefs> Dumps a copy of the current preferences file to stdout.
419 Print the version and options and exits.
421 =item -H E<lt>input hosts fileE<gt>
423 Read a list of entries from a "hosts" file, which will then be written
424 to a capture file. Implies B<-W n>.
426 The "hosts" file format is documented at
427 L<http://en.wikipedia.org/wiki/Hosts_(file)>.
429 =item -i E<lt>capture interfaceE<gt> | -
431 Set the name of the network interface or pipe to use for live packet
434 Network interface names should match one of the names listed in
435 "B<tshark -D>" (described above); a number, as reported by
436 "B<tshark -D>", can also be used. If you're using UNIX, "B<netstat
437 -i>" or "B<ifconfig -a>" might also work to list interface names,
438 although not all versions of UNIX support the B<-a> option to B<ifconfig>.
440 If no interface is specified, B<TShark> searches the list of
441 interfaces, choosing the first non-loopback interface if there are any
442 non-loopback interfaces, and choosing the first loopback interface if
443 there are no non-loopback interfaces. If there are no interfaces at all,
444 B<TShark> reports an error and doesn't start the capture.
446 Pipe names should be either the name of a FIFO (named pipe) or ``-'' to
447 read data from the standard input. Data read from pipes must be in
448 standard libpcap format.
450 This option can occur multiple times. When capturing from multiple
451 interfaces, the capture file will be saved in pcap-ng format.
453 Note: the Win32 version of B<TShark> doesn't support capturing from
458 Put the interface in "monitor mode"; this is supported only on IEEE
459 802.11 Wi-Fi interfaces, and supported only on some operating systems.
461 Note that in monitor mode the adapter might disassociate from the
462 network with which it's associated, so that you will not be able to use
463 any wireless networks with that adapter. This could prevent accessing
464 files on a network server, or resolving host names or network addresses,
465 if you are capturing in monitor mode and are not connected to another
466 network with another adapter.
468 This option can occur multiple times. If used before the first
469 occurrence of the B<-i> option, it enables the monitor mode for all interfaces.
470 If used after an B<-i> option, it enables the monitor mode for
471 the interface specified by the last B<-i> option occurring before
474 =item -K E<lt>keytabE<gt>
476 Load kerberos crypto keys from the specified keytab file.
477 This option can be used multiple times to load keys from several files.
479 Example: B<-K krb5.keytab>
483 Flush the standard output after the information for each packet is
484 printed. (This is not, strictly speaking, line-buffered if B<-V>
485 was specified; however, it is the same as line-buffered if B<-V> wasn't
486 specified, as only one line is printed for each packet, and, as B<-l> is
487 normally used when piping a live capture to a program or script, so that
488 output for a packet shows up as soon as the packet is seen and
489 dissected, it should work just as well as true line-buffering. We do
490 this as a workaround for a deficiency in the Microsoft Visual C++ C
493 This may be useful when piping the output of B<TShark> to another
494 program, as it means that the program to which the output is piped will
495 see the dissected data for a packet as soon as B<TShark> sees the
496 packet and generates that output, rather than seeing it only when the
497 standard output buffer containing that data fills up.
501 List the data link types supported by the interface and exit. The reported
502 link types can be used for the B<-y> option.
506 Disable network object name resolution (such as hostname, TCP and UDP port
507 names); the B<-N> flag might override this one.
509 =item -N E<lt>name resolving flagsE<gt>
511 Turn on name resolving only for particular types of addresses and port
512 numbers, with name resolving for other types of addresses and port
513 numbers turned off. This flag overrides B<-n> if both B<-N> and B<-n> are
514 present. If both B<-N> and B<-n> flags are not present, all name resolutions are
517 The argument is a string that may contain the letters:
519 B<m> to enable MAC address resolution
521 B<n> to enable network address resolution
523 B<t> to enable transport-layer port number resolution
525 B<C> to enable concurrent (asynchronous) DNS lookups
527 =item -o E<lt>preferenceE<gt>:E<lt>valueE<gt>
529 Set a preference value, overriding the default value and any value read
530 from a preference file. The argument to the option is a string of the
531 form I<prefname>B<:>I<value>, where I<prefname> is the name of the
532 preference (which is the same name that would appear in the preference
533 file), and I<value> is the value to which it should be set.
537 I<Don't> put the interface into promiscuous mode. Note that the
538 interface might be in promiscuous mode for some other reason; hence,
539 B<-p> cannot be used to ensure that the only traffic that is captured is
540 traffic sent to or from the machine on which B<TShark> is running,
541 broadcast traffic, and multicast traffic to addresses received by that
544 This option can occur multiple times. If used before the first
545 occurrence of the B<-i> option, no interface will be put into the
547 If used after an B<-i> option, the interface specified by the last B<-i>
548 option occurring before this option will not be put into the
553 When capturing packets, don't display the continuous count of packets
554 captured that is normally shown when saving a capture to a file;
555 instead, just display, at the end of the capture, a count of packets
556 captured. On systems that support the SIGINFO signal, such as various
557 BSDs, you can cause the current count to be displayed by typing your
558 "status" character (typically control-T, although it
559 might be set to "disabled" by default on at least some BSDs, so you'd
560 have to explicitly set it to use it).
562 When reading a capture file, or when capturing and not saving to a file,
563 don't print packet information; this is useful if you're using a B<-z>
564 option to calculate statistics and don't want the packet information
565 printed, just the statistics.
567 =item -r E<lt>infileE<gt>
569 Read packet data from I<infile>, can be any supported capture file format
570 (including gzipped files). It's B<not> possible to use named pipes
573 =item -R E<lt>read (display) filterE<gt>
575 Cause the specified filter (which uses the syntax of read/display filters,
576 rather than that of capture filters) to be applied before printing a
577 decoded form of packets or writing packets to a file; packets not
578 matching the filter are discarded rather than being printed or written.
580 =item -s E<lt>capture snaplenE<gt>
582 Set the default snapshot length to use when capturing live data.
583 No more than I<snaplen> bytes of each network packet will be read into
584 memory, or saved to disk. A value of 0 specifies a snapshot length of
585 65535, so that the full packet is captured; this is the default.
587 This option can occur multiple times. If used before the first
588 occurrence of the B<-i> option, it sets the default snapshot length.
589 If used after an B<-i> option, it sets the snapshot length for
590 the interface specified by the last B<-i> option occurring before
591 this option. If the snapshot length is not set specifically,
592 the default snapshot length is used if provided.
596 Decode and display packets even while writing raw packet data using the
599 =item -t ad|a|r|d|dd|e
601 Set the format of the packet timestamp printed in summary lines.
602 The format can be one of:
604 B<ad> absolute with date: The absolute date and time is the actual time and
605 date the packet was captured
607 B<a> absolute: The absolute time is the actual time the packet was captured,
608 with no date displayed
610 B<r> relative: The relative time is the time elapsed between the first packet
611 and the current packet
613 B<d> delta: The delta time is the time since the previous packet was
616 B<dd> delta_displayed: The delta_displayed time is the time since the
617 previous displayed packet was captured
619 B<e> epoch: The time in seconds since epoch (Jan 1, 1970 00:00:00)
621 The default format is relative.
623 =item -T pdml|psml|ps|text|fields
625 Set the format of the output when viewing decoded packet data. The
628 B<pdml> Packet Details Markup Language, an XML-based format for the details of
629 a decoded packet. This information is equivalent to the packet details
630 printed with the B<-V> flag.
632 B<psml> Packet Summary Markup Language, an XML-based format for the summary
633 information of a decoded packet. This information is equivalent to the
634 information shown in the one-line summary printed by default.
636 B<ps> PostScript for a human-readable one-line summary of each of the packets,
637 or a multi-line view of the details of each of the packets, depending on
638 whether the B<-V> flag was specified.
640 B<text> Text of a human-readable one-line summary of each of the packets, or a
641 multi-line view of the details of each of the packets, depending on
642 whether the B<-V> flag was specified. This is the default.
644 B<fields> The values of fields specified with the B<-e> option, in a
645 form specified by the B<-E> option. For example,
647 -T fields -E separator=, -E quote=d
649 would generate comma-separated values (CSV) output suitable for importing
650 into your favorite spreadsheet program.
655 Print the version and exit.
659 Cause B<TShark> to print a view of the packet details rather
660 than a one-line summary of the packet.
662 =item -w E<lt>outfileE<gt> | -
664 Write raw packet data to I<outfile> or to the standard output if
667 NOTE: -w provides raw packet data, not text. If you want text output
668 you need to redirect stdout (e.g. using '>'), don't use the B<-w>
671 =item -W E<lt>file format optionE<gt>
673 Save extra information in the file if the format supports it. For
678 will save host name resolution records along with captured packets.
680 Future versions of Wireshark may automatically change the capture format to
683 The argument is a string that may contain the following letter:
685 B<n> write network address resolution information (pcapng only)
689 Cause B<TShark> to print a hex and ASCII dump of the packet data
690 after printing the summary or details.
692 =item -X E<lt>eXtension optionsE<gt>
694 Specify an option to be passed to a B<TShark> module. The eXtension option
695 is in the form I<extension_key>B<:>I<value>, where I<extension_key> can be:
697 B<lua_script>:I<lua_script_filename> tells B<Wireshark> to load the given script in addition to the
700 =item -y E<lt>capture link typeE<gt>
702 Set the data link type to use while capturing packets. The values
703 reported by B<-L> are the values that can be used.
705 This option can occur multiple times. If used before the first
706 occurrence of the B<-i> option, it sets the default capture link type.
707 If used after an B<-i> option, it sets the capture link type for
708 the interface specified by the last B<-i> option occurring before
709 this option. If the capture link type is not set specifically,
710 the default capture link type is used if provided.
712 =item -z E<lt>statisticsE<gt>
714 Get B<TShark> to collect various types of statistics and display the result
715 after finishing reading the capture file. Use the B<-q> flag if you're
716 reading a capture file and only want the statistics printed, not any
717 per-packet information.
719 Note that the B<-z proto> option is different - it doesn't cause
720 statistics to be gathered and printed when the capture is complete, it
721 modifies the regular packet summary output to include the values of
722 fields specified with the option. Therefore you must not use the B<-q>
723 option, as that option would suppress the printing of the regular packet
724 summary output, and must also not use the B<-V> option, as that would
725 cause packet detail information rather than packet summary information
728 Currently implemented statistics are:
732 =item B<-z> afp,srt[,I<filter>]
734 =item B<-z> camel,srt
736 =item B<-z> dcerpc,srt,I<uuid>,I<major>.I<minor>[,I<filter>]
738 Collect call/reply SRT (Service Response Time) data for DCERPC interface I<uuid>,
739 version I<major>.I<minor>.
740 Data collected is the number of calls for each procedure, MinSRT, MaxSRT
743 Example: S<B<-z dcerpc,srt,12345778-1234-abcd-ef00-0123456789ac,1.0>> will collect data for the CIFS SAMR Interface.
745 This option can be used multiple times on the command line.
747 If the optional I<filter> is provided, the stats will only be calculated
748 on those calls that match that filter.
750 Example: S<B<-z dcerpc,srt,12345778-1234-abcd-ef00-0123456789ac,1.0,ip.addr==1.2.3.4>> will collect SAMR
751 SRT statistics for a specific host.
753 =item B<-z> hosts[,ipv4][,ipv6]
755 Dump any collected IPv4 and/or IPv6 addresses in "hosts" format. Both IPv4
756 and IPv6 addresses are dumped by default.
758 Addresses are collected from a number of sources, including standard "hosts"
759 files and captured traffic.
761 =item B<-z> icmp,srt[,I<filter>]
763 Compute total ICMP echo requests, replies, loss, and percent loss, as well as
764 minimum, maximum, mean, median and sample standard deviation SRT statistics
765 typical of what ping provides.
767 Example: S<B<-z icmp,srt,ip.src==1.2.3.4>> will collect ICMP SRT statistics
768 for ICMP echo request packets originating from a specific host.
770 This option can be used multiple times on the command line.
772 =item B<-z> icmpv6,srt[,I<filter>]
774 Compute total ICMPv6 echo requests, replies, loss, and percent loss, as well as
775 minimum, maximum, mean, median and sample standard deviation SRT statistics
776 typical of what ping provides.
778 Example: S<B<-z icmpv6,srt,ipv6.src==fe80::1>> will collect ICMPv6 SRT statistics
779 for ICMPv6 echo request packets originating from a specific host.
781 This option can be used multiple times on the command line.
783 =item B<-z> io,phs[,I<filter>]
785 Create Protocol Hierarchy Statistics listing both number of packets and bytes.
786 If no I<filter> is specified the statistics will be calculated for all packets.
787 If a I<filter> is specified statistics will be only calculated for those
788 packets that match the filter.
790 This option can be used multiple times on the command line.
792 =item B<-z> io,stat,I<interval>[,I<filter>][,I<filter>][,I<filter>]...
794 Collect packet/bytes statistics for the capture in intervals of
795 I<interval> seconds. I<Interval> can be specified either as a whole or
796 fractional second and can be specified with microsecond (us) resolution.
797 If I<interval> is 0, the statistics will be calculated over all packets.
799 If no I<filter> is specified the statistics will be calculated for all packets.
800 If one or more I<filters> are specified statistics will be calculated for
801 all filters and presented with one column of statistics for each filter.
803 This option can be used multiple times on the command line.
805 Example: B<-z io,stat,1,ip.addr==1.2.3.4> will generate 1 second
806 statistics for all traffic to/from host 1.2.3.4.
808 Example: B<-z "io,stat,0.001,smb&&ip.addr==1.2.3.4"> will generate 1ms
809 statistics for all SMB packets to/from host 1.2.3.4.
811 The examples above all use the standard syntax for generating statistics
812 which only calculates the number of packets and bytes in each interval.
814 B<io,stat> can also do much more statistics and calculate COUNT(), SUM(),
815 MIN(), MAX(), AVG() and LOAD() using a slightly different filter syntax:
817 =item -z io,stat,E<34>[COUNT|SUM|MIN|MAX|AVG|LOAD](I<field>)I<field> [and I<filter>]E<34>
819 NOTE: One important thing to note here is that the field that the
820 calculation is based on MUST also be part of the filter string or
821 else the calculation will fail.
823 So: B<-z io,stat,0.010,AVG(smb.time)> does not work. Use B<-z
824 io,stat,0.010,AVG(smb.time)smb.time> instead. Also be aware that a field
825 can exist multiple times inside the same packet and will then be counted
826 multiple times in those packets.
828 NOTE: A second important thing to note is that the system setting for
829 decimal separator is set to "."! If it is set to "," the statistics
830 will not be displayed per filter.
832 B<COUNT(I<field>)I<field> [and I<filter>]> - Calculates the number of times that the
833 field I<name> (not its value) appears per interval in the filtered packet list.
834 ''I<field>'' can be any display filter name.
836 Example: B<-z io,stat,0.010,E<34>COUNT(smb.sid)smb.sidE<34>>
838 This will count the total number of SIDs seen in each 10ms interval.
840 B<SUM(I<field>)I<field> [and I<filter>]> - Unlike COUNT, the I<values> of the
841 specified field are summed per time interval.
842 ''I<field>'' can only be a named integer or relative time field.
844 Example: B<-z io,stat,0.010,E<34>SUM(frame.len)frame.lenE<34>>
846 Reports the total number of bytes that were transmitted bidirectionally in
847 all the packets within a 10 millisecond interval.
849 B<MIN/MAX/AVG(I<field>)I<field> [and I<filter>]> - The minimum, maximum, or average field value
850 in each interval is calculated. The specified field must be a named integer
851 or relative time field. For relative time fields, the output is presented in
852 seconds with six decimal digits of precision rounded to the nearest microsecond.
854 In the following example, The time of the first Read_AndX call, the last Read_AndX
855 response values are displayed and the minimum, maximum, and average Read response times
856 (SRTs) are calculated. NOTE: If the DOS command shell line continuation character, ''^''
857 is used, each line cannot end in a comma so it is placed at the beginning of each
860 tshark -o tcp.desegment_tcp_streams:FALSE -n -q -r smb_reads.cap -z io,stat,0,
861 "MIN(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==0",
862 "MAX(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==1",
863 "MIN(smb.time)smb.time and smb.cmd==0x2e",
864 "MAX(smb.time)smb.time and smb.cmd==0x2e",
865 "AVG(smb.time)smb.time and smb.cmd==0x2e"
868 ======================================================================================================
870 Column #0: MIN(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==0
871 Column #1: MAX(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==1
872 Column #2: MIN(smb.time)smb.time and smb.cmd==0x2e
873 Column #3: MAX(smb.time)smb.time and smb.cmd==0x2e
874 Column #4: AVG(smb.time)smb.time and smb.cmd==0x2e
875 | Column #0 | Column #1 | Column #2 | Column #3 | Column #4 |
876 Time | MIN | MAX | MIN | MAX | AVG |
877 000.000- 0.000000 7.704054 0.000072 0.005539 0.000295
878 ======================================================================================================
880 The following command displays the average SMB Read response PDU size, the
881 total number of read PDU bytes, the average SMB Write request PDU size, and
882 the total number of bytes transferred in SMB Write PDUs:
884 tshark -n -q -r smb_reads_writes.cap -z io,stat,0,
885 "AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to",
886 "SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to",
887 "AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to",
888 "SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to"
890 =====================================================================================
892 Column #0: AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to
893 Column #1: SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to
894 Column #2: AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to
895 Column #3: SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to
896 | Column #0 | Column #1 | Column #2 | Column #3 |
897 Time | AVG | SUM | AVG | SUM |
898 000.000- 30018 28067522 72 3240
899 =====================================================================================
901 B<LOAD(I<field>)I<field> [and I<filter>]> - The LOAD/Queue-Depth
902 in each interval is calculated. The specified field must be a relative-time filed that represents a response time. For example smb.time.
903 For each interval the Queue-Depth for the specified protocol is calculated.
905 The following command displays the average SMB LOAD.
906 A value of 1.0 represents one I/O in flight.
908 tshark -n -q -r smb_reads_writes.cap
909 -z "io,stat,0.001,LOAD(smb.time)smb.time"
911 ============================================================================
913 Interval: 0.001000 secs
914 Column #0: LOAD(smb.time)smb.time
917 0000.000000-0000.001000 1.000000
918 0000.001000-0000.002000 0.741000
919 0000.002000-0000.003000 0.000000
920 0000.003000-0000.004000 1.000000
924 B<FRAMES | BYTES[()I<filter>]> - Displays the total number of frames or bytes.
925 The filter field is optional but if included it must be prepended with ''()''.
927 The following command displays five columns: the total number of frames and bytes
928 (transferred bidirectionally) using a single comma, the same two stats using the FRAMES and BYTES
929 subcommands, the total number of frames containing at least one SMB Read response, and
930 the total number of bytes transmitted to the client (unidirectionally) at IP address 10.1.0.64.
932 tshark -o tcp.desegment_tcp_streams:FALSE -n -q -r smb_reads.cap -z io,stat,0,,FRAMES,BYTES,
933 "FRAMES()smb.cmd==0x2e and smb.response_to","BYTES()ip.dst==10.1.0.64"
935 =======================================================================================================================
940 Column #3: FRAMES()smb.cmd==0x2e and smb.response_to
941 Column #4: BYTES()ip.dst==10.1.0.64
942 | Column #0 | Column #1 | Column #2 | Column #3 | Column #4 |
943 Time | Frames | Bytes | FRAMES | BYTES | FRAMES | BYTES |
944 000.000- 33576 29721685 33576 29721685 870 29004801
945 =======================================================================================================================
947 =item B<-z> conv,I<type>[,I<filter>]
949 Create a table that lists all conversations that could be seen in the
950 capture. I<type> specifies the conversation endpoint types for which we
951 want to generate the statistics; currently the supported ones are:
953 "eth" Ethernet addresses
954 "fc" Fibre Channel addresses
955 "fddi" FDDI addresses
957 "ipv6" IPv6 addresses
959 "tcp" TCP/IP socket pairs Both IPv4 and IPv6 are supported
960 "tr" Token Ring addresses
961 "udp" UDP/IP socket pairs Both IPv4 and IPv6 are supported
963 If the optional I<filter> is specified, only those packets that match the
964 filter will be used in the calculations.
966 The table is presented with one line for each conversation and displays
967 the number of packets/bytes in each direction as well as the total
968 number of packets/bytes. The table is sorted according to the total
971 =item B<-z> proto,colinfo,I<filter>,I<field>
973 Append all I<field> values for the packet to the Info column of the
974 one-line summary output.
975 This feature can be used to append arbitrary fields to the Info column
976 in addition to the normal content of that column.
977 I<field> is the display-filter name of a field which value should be placed
979 I<filter> is a filter string that controls for which packets the field value
980 will be presented in the info column. I<field> will only be presented in the
981 Info column for the packets which match I<filter>.
983 NOTE: In order for B<TShark> to be able to extract the I<field> value
984 from the packet, I<field> MUST be part of the I<filter> string. If not,
985 B<TShark> will not be able to extract its value.
987 For a simple example to add the "nfs.fh.hash" field to the Info column
988 for all packets containing the "nfs.fh.hash" field, use
990 B<-z proto,colinfo,nfs.fh.hash,nfs.fh.hash>
992 To put "nfs.fh.hash" in the Info column but only for packets coming from
995 B<-z "proto,colinfo,nfs.fh.hash && ip.src==1.2.3.4,nfs.fh.hash">
997 This option can be used multiple times on the command line.
999 =item B<-z> diameter,avp[,I<cmd.code>,I<field>,I<field>,I<...>]
1001 This option enables extraction of most important diameter fields from large capture files.
1002 Exactly one text line for each diameter message with matched B<diameter.cmd.code> will be printed.
1004 Empty diameter command code or '*' can be specified to mach any B<diameter.cmd.code>
1006 Example: B<-z diameter,avp> extract default field set from diameter messages.
1008 Example: B<-z diameter,avp,280> extract default field set from diameter DWR messages.
1010 Example: B<-z diameter,avp,272> extract default field set from diameter CC messages.
1012 Extract most important fields from diameter CC messages:
1014 B<tshark -r file.cap.gz -q -z diameter,avp,272,CC-Request-Type,CC-Request-Number,Session-Id,Subscription-Id-Data,Rating-Group,Result-Code>
1016 Following fields will be printed out for each diameter message:
1018 "frame" Frame number.
1019 "time" Unix time of the frame arrival.
1020 "src" Source address.
1021 "srcport" Source port.
1022 "dst" Destination address.
1023 "dstport" Destination port.
1024 "proto" Constant string 'diameter', which can be used for post processing of tshark output. e.g. grep/sed/awk.
1025 "msgnr" seq. number of diameter message within the frame. E.g. '2' for the third diameter message in the same frame.
1026 "is_request" '0' if message is a request, '1' if message is an answer.
1027 "cmd" diameter.cmd_code, E.g. '272' for credit control messages.
1028 "req_frame" Number of frame where matched request was found or '0'.
1029 "ans_frame" Number of frame where matched answer was found or '0'.
1030 "resp_time" response time in seconds, '0' in case if matched Request/Answer is not found in trace. E.g. in the begin or end of capture.
1032 B<-z diameter,avp> option is much faster than B<-V -T text> or B<-T pdml> options.
1034 B<-z diameter,avp> option is more powerful than B<-T field> and B<-z proto,colinfo> options.
1036 Multiple diameter messages in one frame are supported.
1038 Several fields with same name within one diameter message are supported, e.g. I<diameter.Subscription-Id-Data> or I<diameter.Rating-Group>.
1040 Note: B<tshark -q> option is recommended to suppress default B<tshark> output.
1042 =item B<-z> rpc,srt,I<program>,I<version>[,I<filter>]
1044 Collect call/reply SRT (Service Response Time) data for I<program>/I<version>. Data collected
1045 is number of calls for each procedure, MinSRT, MaxSRT and AvgSRT.
1047 Example: B<-z rpc,srt,100003,3> will collect data for NFS v3.
1049 This option can be used multiple times on the command line.
1051 If the optional I<filter> is provided, the stats will only be calculated
1052 on those calls that match that filter.
1054 Example: B<-z rpc,srt,100003,3,nfs.fh.hash==0x12345678> will collect NFS v3
1055 SRT statistics for a specific file.
1057 =item B<-z> rpc,programs
1059 Collect call/reply SRT data for all known ONC-RPC programs/versions.
1060 Data collected is number of calls for each protocol/version, MinSRT,
1062 This option can only be used once on the command line.
1064 =item B<-z> rtp,streams
1066 Collect statistics for all RTP streams and calculate max. delta, max. and
1067 mean jitter and packet loss percentages.
1069 =item B<-z> scsi,srt,I<cmdset>[,<filter>]
1071 Collect call/reply SRT (Service Response Time) data for SCSI commandset <cmdset>.
1073 Commandsets are 0:SBC 1:SSC 5:MMC
1076 is the number of calls for each procedure, MinSRT, MaxSRT and AvgSRT.
1078 Example: B<-z scsi,srt,0> will collect data for SCSI BLOCK COMMANDS (SBC).
1080 This option can be used multiple times on the command line.
1082 If the optional I<filter> is provided, the stats will only be calculated
1083 on those calls that match that filter.
1085 Example: B<-z scsi,srt,0,ip.addr==1.2.3.4> will collect SCSI SBC
1086 SRT statistics for a specific iscsi/ifcp/fcip host.
1088 =item B<-z> smb,srt[,I<filter>]
1090 Collect call/reply SRT (Service Response Time) data for SMB. Data collected
1091 is number of calls for each SMB command, MinSRT, MaxSRT and AvgSRT.
1093 Example: B<-z smb,srt>
1095 The data will be presented as separate tables for all normal SMB commands,
1096 all Transaction2 commands and all NT Transaction commands.
1097 Only those commands that are seen in the capture will have its stats
1099 Only the first command in a xAndX command chain will be used in the
1100 calculation. So for common SessionSetupAndX + TreeConnectAndX chains,
1101 only the SessionSetupAndX call will be used in the statistics.
1102 This is a flaw that might be fixed in the future.
1104 This option can be used multiple times on the command line.
1106 If the optional I<filter> is provided, the stats will only be calculated
1107 on those calls that match that filter.
1109 Example: B<-z "smb,srt,ip.addr==1.2.3.4"> will only collect stats for
1110 SMB packets exchanged by the host at IP address 1.2.3.4 .
1112 =item B<-z> smb,sids
1114 When this feature is used B<TShark> will print a report with all the
1115 discovered SID and account name mappings. Only those SIDs where the
1116 account name is known will be presented in the table.
1118 For this feature to work you will need to either to enable
1119 "Edit/Preferences/Protocols/SMB/Snoop SID to name mappings" in the
1120 preferences or you can override the preferences by specifying
1121 S<B<-o "smb.sid_name_snooping:TRUE">> on the B<TShark> command line.
1123 The current method used by B<TShark> to find the SID->name mapping
1124 is relatively restricted with a hope of future expansion.
1126 =item B<-z> mgcp,rtd[I<,filter>]
1128 Collect requests/response RTD (Response Time Delay) data for MGCP.
1129 (This is similar to B<-z smb,srt>). Data collected is the number of calls
1130 for each known MGCP Type, MinRTD, MaxRTD and AvgRTD.
1131 Additionally you get the number of duplicate requests/responses,
1132 unresponded requests, responses, which don't match with any request.
1133 Example: B<-z mgcp,rtd>.
1135 This option can be used multiple times on the command line.
1137 If the optional I<filter> is provided, the stats will only be calculated
1138 on those calls that match that filter.
1139 Example: B<-z "mgcp,rtd,ip.addr==1.2.3.4"> will only collect stats for
1140 MGCP packets exchanged by the host at IP address 1.2.3.4 .
1142 =item B<-z> megaco,rtd[I<,filter>]
1144 Collect requests/response RTD (Response Time Delay) data for MEGACO.
1145 (This is similar to B<-z smb,srt>). Data collected is the number of calls
1146 for each known MEGACO Type, MinRTD, MaxRTD and AvgRTD.
1147 Additionally you get the number of duplicate requests/responses,
1148 unresponded requests, responses, which don't match with any request.
1149 Example: B<-z megaco,rtd>.
1151 If the optional I<filter> is provided, the stats will only be calculated
1152 on those calls that match that filter.
1153 Example: B<-z "megaco,rtd,ip.addr==1.2.3.4"> will only collect stats for
1154 MEGACO packets exchanged by the host at IP address 1.2.3.4 .
1156 This option can be used multiple times on the command line.
1158 =item B<-z> h225,counter[I<,filter>]
1160 Count ITU-T H.225 messages and their reasons. In the first column you get a
1161 list of H.225 messages and H.225 message reasons, which occur in the current
1162 capture file. The number of occurrences of each message or reason is displayed
1163 in the second column.
1165 Example: B<-z h225,counter>.
1167 If the optional I<filter> is provided, the stats will only be calculated
1168 on those calls that match that filter.
1169 Example: use B<-z "h225,counter,ip.addr==1.2.3.4"> to only collect stats for
1170 H.225 packets exchanged by the host at IP address 1.2.3.4 .
1172 This option can be used multiple times on the command line.
1174 =item B<-z> h225,srt[I<,filter>]
1176 Collect requests/response SRT (Service Response Time) data for ITU-T H.225 RAS.
1177 Data collected is number of calls of each ITU-T H.225 RAS Message Type,
1178 Minimum SRT, Maximum SRT, Average SRT, Minimum in Packet, and Maximum in Packet.
1179 You will also get the number of Open Requests (Unresponded Requests),
1180 Discarded Responses (Responses without matching request) and Duplicate Messages.
1182 Example: B<-z h225,srt>
1184 This option can be used multiple times on the command line.
1186 If the optional I<filter> is provided, the stats will only be calculated
1187 on those calls that match that filter.
1189 Example: B<-z "h225,srt,ip.addr==1.2.3.4"> will only collect stats for
1190 ITU-T H.225 RAS packets exchanged by the host at IP address 1.2.3.4 .
1192 =item B<-z> sip,stat[I<,filter>]
1194 This option will activate a counter for SIP messages. You will get the number
1195 of occurrences of each SIP Method and of each SIP Status-Code. Additionally you
1196 also get the number of resent SIP Messages (only for SIP over UDP).
1198 Example: B<-z sip,stat>.
1200 This option can be used multiple times on the command line.
1202 If the optional I<filter> is provided, the stats will only be calculated
1203 on those calls that match that filter.
1204 Example: B<-z "sip,stat,ip.addr==1.2.3.4"> will only collect stats for
1205 SIP packets exchanged by the host at IP address 1.2.3.4 .
1211 =head1 CAPTURE FILTER SYNTAX
1213 See the manual page of pcap-filter(4) or, if that doesn't exist, tcpdump(8),
1214 or, if that doesn't exist, L<http://wiki.wireshark.org/CaptureFilters>.
1216 =head1 READ FILTER SYNTAX
1218 For a complete table of protocol and protocol fields that are filterable
1219 in B<TShark> see the wireshark-filter(4) manual page.
1223 These files contains various B<Wireshark> configuration values.
1229 The F<preferences> files contain global (system-wide) and personal
1230 preference settings. If the system-wide preference file exists, it is
1231 read first, overriding the default settings. If the personal preferences
1232 file exists, it is read next, overriding any previous values. Note: If
1233 the command line option B<-o> is used (possibly more than once), it will
1234 in turn override values from the preferences files.
1236 The preferences settings are in the form I<prefname>B<:>I<value>,
1238 where I<prefname> is the name of the preference
1239 and I<value> is the value to
1240 which it should be set; white space is allowed between B<:> and
1241 I<value>. A preference setting can be continued on subsequent lines by
1242 indenting the continuation lines with white space. A B<#> character
1243 starts a comment that runs to the end of the line:
1245 # Capture in promiscuous mode?
1246 # TRUE or FALSE (case-insensitive).
1247 capture.prom_mode: TRUE
1249 The global preferences file is looked for in the F<wireshark> directory
1250 under the F<share> subdirectory of the main installation directory (for
1251 example, F</usr/local/share/wireshark/preferences>) on UNIX-compatible
1252 systems, and in the main installation directory (for example,
1253 F<C:\Program Files\Wireshark\preferences>) on Windows systems.
1255 The personal preferences file is looked for in
1256 F<$HOME/.wireshark/preferences> on
1257 UNIX-compatible systems and F<%APPDATA%\Wireshark\preferences> (or, if
1258 %APPDATA% isn't defined, F<%USERPROFILE%\Application
1259 Data\Wireshark\preferences>) on Windows systems.
1261 =item Disabled (Enabled) Protocols
1263 The F<disabled_protos> files contain system-wide and personal lists of
1264 protocols that have been disabled, so that their dissectors are never
1265 called. The files contain protocol names, one per line, where the
1266 protocol name is the same name that would be used in a display filter
1272 The global F<disabled_protos> file uses the same directory as the global
1275 The personal F<disabled_protos> file uses the same directory as the
1276 personal preferences file.
1278 =item Name Resolution (hosts)
1280 If the personal F<hosts> file exists, it is
1281 used to resolve IPv4 and IPv6 addresses before any other
1282 attempts are made to resolve them. The file has the standard F<hosts>
1283 file syntax; each line contains one IP address and name, separated by
1284 whitespace. The same directory as for the personal preferences file is
1287 Capture filter name resolution is handled by libpcap on UNIX-compatible
1288 systems and WinPCAP on Windows. As such the Wireshark personal F<hosts> file
1289 will not be consulted for capture filter name resolution.
1291 =item Name Resolution (ethers)
1293 The F<ethers> files are consulted to correlate 6-byte hardware addresses to
1294 names. First the personal F<ethers> file is tried and if an address is not
1295 found there the global F<ethers> file is tried next.
1297 Each line contains one hardware address and name, separated by
1298 whitespace. The digits of the hardware address are separated by colons
1299 (:), dashes (-) or periods (.). The same separator character must be
1300 used consistently in an address. The following three lines are valid
1301 lines of an F<ethers> file:
1303 ff:ff:ff:ff:ff:ff Broadcast
1304 c0-00-ff-ff-ff-ff TR_broadcast
1305 00.00.00.00.00.00 Zero_broadcast
1307 The global F<ethers> file is looked for in the F</etc> directory on
1308 UNIX-compatible systems, and in the main installation directory (for
1309 example, F<C:\Program Files\Wireshark>) on Windows systems.
1311 The personal F<ethers> file is looked for in the same directory as the personal
1314 Capture filter name resolution is handled by libpcap on UNIX-compatible
1315 systems and WinPCAP on Windows. As such the Wireshark personal F<ethers> file
1316 will not be consulted for capture filter name resolution.
1318 =item Name Resolution (manuf)
1320 The F<manuf> file is used to match the 3-byte vendor portion of a 6-byte
1321 hardware address with the manufacturer's name; it can also contain well-known
1322 MAC addresses and address ranges specified with a netmask. The format of the
1323 file is the same as the F<ethers> files, except that entries of the form:
1327 can be provided, with the 3-byte OUI and the name for a vendor, and
1330 00-00-0C-07-AC/40 All-HSRP-routers
1332 can be specified, with a MAC address and a mask indicating how many bits
1333 of the address must match. The above entry, for example, has 40
1334 significant bits, or 5 bytes, and would match addresses from
1335 00-00-0C-07-AC-00 through 00-00-0C-07-AC-FF. The mask need not be a
1338 The F<manuf> file is looked for in the same directory as the global
1341 =item Name Resolution (ipxnets)
1343 The F<ipxnets> files are used to correlate 4-byte IPX network numbers to
1344 names. First the global F<ipxnets> file is tried and if that address is not
1345 found there the personal one is tried next.
1347 The format is the same as the F<ethers>
1348 file, except that each address is four bytes instead of six.
1349 Additionally, the address can be represented as a single hexadecimal
1350 number, as is more common in the IPX world, rather than four hex octets.
1351 For example, these four lines are valid lines of an F<ipxnets> file:
1355 00:00:BE:EF IT_Server1
1358 The global F<ipxnets> file is looked for in the F</etc> directory on
1359 UNIX-compatible systems, and in the main installation directory (for
1360 example, F<C:\Program Files\Wireshark>) on Windows systems.
1362 The personal F<ipxnets> file is looked for in the same directory as the
1363 personal preferences file.
1367 =head1 ENVIRONMENT VARIABLES
1371 =item WIRESHARK_DEBUG_EP_NO_CHUNKS
1373 Normally per-packet memory is allocated in large "chunks." This behavior
1374 doesn't work well with debugging tools such as Valgrind or ElectricFence.
1375 Export this environment variable to force individual allocations.
1376 Note: disabling chunks also disables canaries (see below).
1378 =item WIRESHARK_DEBUG_SE_NO_CHUNKS
1380 Normally per-file memory is allocated in large "chunks." This behavior
1381 doesn't work well with debugging tools such as Valgrind or ElectricFence.
1382 Export this environment variable to force individual allocations.
1383 Note: disabling chunks also disables canaries (see below).
1385 =item WIRESHARK_DEBUG_EP_NO_CANARY
1387 Normally per-packet memory allocations are separated by "canaries" which
1388 allow detection of memory overruns. This comes at the expense of some extra
1389 memory usage. Exporting this environment variable disables these canaries.
1391 =item WIRESHARK_DEBUG_SE_USE_CANARY
1393 Exporting this environment variable causes per-file memory allocations to be
1394 protected with "canaries" which allow for detection of memory overruns.
1395 This comes at the expense of significant extra memory usage.
1397 =item WIRESHARK_DEBUG_SCRUB_MEMORY
1399 If this environment variable is exported, the contents of per-packet and
1400 per-file memory is initialized to 0xBADDCAFE when the memory is allocated
1401 and is reset to 0xDEADBEEF when the memory is freed. This functionality is
1402 useful mainly to developers looking for bugs in the way memory is handled.
1404 =item WIRESHARK_RUN_FROM_BUILD_DIRECTORY
1406 This environment variable causes the plugins and other data files to be loaded
1407 from the build directory (where the program was compiled) rather than from the
1408 standard locations. It has no effect when the program in question is running
1409 with root (or setuid) permissions on *NIX.
1411 =item WIRESHARK_DATA_DIR
1413 This environment variable causes the various data files to be loaded from
1414 a directory other than the standard locations. It has no effect when the
1415 program in question is running with root (or setuid) permissions on *NIX.
1417 =item WIRESHARK_PYTHON_DIR
1419 This environment variable points to an alternate location for Python.
1420 It has no effect when the program in question is running with root (or setuid)
1421 permissions on *NIX.
1423 =item ERF_RECORDS_TO_CHECK
1425 This environment variable controls the number of ERF records checked when
1426 deciding if a file really is in the ERF format. Setting this environment
1427 variable a number higher than the default (20) would make false positives
1430 =item IPFIX_RECORDS_TO_CHECK
1432 This environment variable controls the number of IPFIX records checked when
1433 deciding if a file really is in the IPFIX format. Setting this environment
1434 variable a number higher than the default (20) would make false positives
1437 =item WIRESHARK_ABORT_ON_DISSECTOR_BUG
1439 If this environment variable is set, B<TShark> will call abort(3)
1440 when a dissector bug is encountered. abort(3) will cause the program to
1441 exit abnormally; if you are running B<TShark> in a debugger, it
1442 should halt in the debugger and allow inspection of the process, and, if
1443 you are not running it in a debugger, it will, on some OSes, assuming
1444 your environment is configured correctly, generate a core dump file.
1445 This can be useful to developers attempting to troubleshoot a problem
1446 with a protocol dissector.
1448 =item WIRESHARK_EP_VERIFY_POINTERS
1450 This environment variable, if exported, causes certain uses of pointers to be
1451 audited to ensure they do not point to memory that is deallocated after each
1452 packet has been fully dissected. This can be useful to developers writing or
1455 =item WIRESHARK_SE_VERIFY_POINTERS
1457 This environment variable, if exported, causes certain uses of pointers to be
1458 audited to ensure they do not point to memory that is deallocated after when
1459 a capture file is closed. This can be useful to developers writing or
1466 wireshark-filter(4), wireshark(1), editcap(1), pcap-filter(4), tcpdump(8),
1467 pcap(3), dumpcap(1), text2pcap(1), mergecap(1)
1471 B<TShark> is part of the B<Wireshark> distribution. The latest version
1472 of B<Wireshark> can be found at L<http://www.wireshark.org>.
1474 HTML versions of the Wireshark project man pages are available at:
1475 L<http://www.wireshark.org/docs/man-pages>.
1479 B<TShark> uses the same packet dissection code that B<Wireshark> does,
1480 as well as using many other modules from B<Wireshark>; see the list of
1481 authors in the B<Wireshark> man page for a list of authors of that code.