Ensure to have a valid string pointer when writing OS SHB option
[metze/wireshark/wip.git] / doc / tshark.pod
1
2 =head1 NAME
3
4 tshark - Dump and analyze network traffic
5
6 =head1 SYNOPSIS
7
8 B<tshark>
9 S<[ B<-2> ]>
10 S<[ B<-a> E<lt>capture autostop conditionE<gt> ] ...>
11 S<[ B<-b> E<lt>capture ring buffer optionE<gt>] ...>
12 S<[ B<-B> E<lt>capture buffer sizeE<gt> ] >
13 S<[ B<-c> E<lt>capture packet countE<gt> ]>
14 S<[ B<-C> E<lt>configuration profileE<gt> ]>
15 S<[ B<-d> E<lt>layer typeE<gt>==E<lt>selectorE<gt>,E<lt>decode-as protocolE<gt> ]>
16 S<[ B<-D> ]>
17 S<[ B<-e> E<lt>fieldE<gt> ]>
18 S<[ B<-E> E<lt>field print optionE<gt> ]>
19 S<[ B<-f> E<lt>capture filterE<gt> ]>
20 S<[ B<-F> E<lt>file formatE<gt> ]>
21 S<[ B<-g> ]>
22 S<[ B<-h> ]>
23 S<[ B<-H> E<lt>input hosts fileE<gt> ]>
24 S<[ B<-i> E<lt>capture interfaceE<gt>|- ]>
25 S<[ B<-j> E<lt>protocol match filterE<gt> ]>
26 S<[ B<-I> ]>
27 S<[ B<-K> E<lt>keytabE<gt> ]>
28 S<[ B<-l> ]>
29 S<[ B<-L> ]>
30 S<[ B<-n> ]>
31 S<[ B<-N> E<lt>name resolving flagsE<gt> ]>
32 S<[ B<-o> E<lt>preference settingE<gt> ] ...>
33 S<[ B<-O> E<lt>protocolsE<gt> ]>
34 S<[ B<-p> ]>
35 S<[ B<-P> ]>
36 S<[ B<-q> ]>
37 S<[ B<-Q> ]>
38 S<[ B<-r> E<lt>infileE<gt> ]>
39 S<[ B<-R> E<lt>Read filterE<gt> ]>
40 S<[ B<-s> E<lt>capture snaplenE<gt> ]>
41 S<[ B<-S> E<lt>separatorE<gt> ]>
42 S<[ B<-t> a|ad|adoy|d|dd|e|r|u|ud|udoy ]>
43 S<[ B<-T> ek|fields|json|pdml|ps|psml|text ]>
44 S<[ B<-u> E<lt>seconds typeE<gt>]>
45 S<[ B<-U> E<lt>tap_nameE<gt>]>
46 S<[ B<-v> ]>
47 S<[ B<-V> ]>
48 S<[ B<-w> E<lt>outfileE<gt>|- ]>
49 S<[ B<-W> E<lt>file format optionE<gt>]>
50 S<[ B<-x> ]>
51 S<[ B<-X> E<lt>eXtension optionE<gt>]>
52 S<[ B<-y> E<lt>capture link typeE<gt> ]>
53 S<[ B<-Y> E<lt>displaY filterE<gt> ]>
54 S<[ B<-z> E<lt>statisticsE<gt> ]>
55 S<[ B<--capture-comment> E<lt>commentE<gt> ]>
56 S<[ E<lt>capture filterE<gt> ]>
57
58 B<tshark>
59 B<-G> [ E<lt>report typeE<gt> ]
60
61 =head1 DESCRIPTION
62
63 B<TShark> is a network protocol analyzer.  It lets you capture packet
64 data from a live network, or read packets from a previously saved
65 capture file, either printing a decoded form of those packets to the
66 standard output or writing the packets to a file.  B<TShark>'s native
67 capture file format is B<pcap> format, which is also the format used
68 by B<tcpdump> and various other tools.
69
70 Without any options set, B<TShark> will work much like B<tcpdump>.  It will
71 use the pcap library to capture traffic from the first available network
72 interface and displays a summary line on stdout for each received packet.
73
74 B<TShark> is able to detect, read and write the same capture files that
75 are supported by B<Wireshark>.
76 The input file doesn't need a specific filename extension; the file
77 format and an optional gzip compression will be automatically detected.
78 Near the beginning of the DESCRIPTION section of wireshark(1) or
79 L<https://www.wireshark.org/docs/man-pages/wireshark.html>
80 is a detailed description of the way B<Wireshark> handles this, which is
81 the same way B<Tshark> handles this.
82
83 Compressed file support uses (and therefore requires) the zlib library.
84 If the zlib library is not present, B<TShark> will compile, but will
85 be unable to read compressed files.
86
87 If the B<-w> option is not specified, B<TShark> writes to the standard
88 output the text of a decoded form of the packets it captures or reads.
89 If the B<-w> option is specified, B<TShark> writes to the file
90 specified by that option the raw data of the packets, along with the
91 packets' time stamps.
92
93 When writing a decoded form of packets, B<TShark> writes, by
94 default, a summary line containing the fields specified by the
95 preferences file (which are also the fields displayed in the packet list
96 pane in B<Wireshark>), although if it's writing packets as it captures
97 them, rather than writing packets from a saved capture file, it won't
98 show the "frame number" field.  If the B<-V> option is specified, it
99 writes instead a view of the details of the packet, showing all the
100 fields of all protocols in the packet.  If the B<-O> option is specified,
101 it will only show the full protocols specified.  Use the output of
102 "B<tshark -G protocols>" to find the abbreviations of the protocols you can
103 specify.
104
105 If you want to write the decoded form of packets to a file, run
106 B<TShark> without the B<-w> option, and redirect its standard output to
107 the file (do I<not> use the B<-w> option).
108
109 When writing packets to a file, B<TShark>, by default, writes the
110 file in B<pcap> format, and writes all of the packets it sees to the
111 output file.  The B<-F> option can be used to specify the format in which
112 to write the file.  This list of available file formats is displayed by
113 the B<-F> flag without a value.  However, you can't specify a file format
114 for a live capture.
115
116 Read filters in B<TShark>, which allow you to select which packets
117 are to be decoded or written to a file, are very powerful; more fields
118 are filterable in B<TShark> than in other protocol analyzers, and the
119 syntax you can use to create your filters is richer.  As B<TShark>
120 progresses, expect more and more protocol fields to be allowed in read
121 filters.
122
123 Packet capturing is performed with the pcap library.  The capture filter
124 syntax follows the rules of the pcap library.  This syntax is different
125 from the read filter syntax.  A read filter can also be specified when
126 capturing, and only packets that pass the read filter will be displayed
127 or saved to the output file; note, however, that capture filters are much
128 more efficient than read filters, and it may be more difficult for
129 B<TShark> to keep up with a busy network if a read filter is
130 specified for a live capture.
131
132 A capture or read filter can either be specified with the B<-f> or B<-R>
133 option, respectively, in which case the entire filter expression must be
134 specified as a single argument (which means that if it contains spaces,
135 it must be quoted), or can be specified with command-line arguments
136 after the option arguments, in which case all the arguments after the
137 filter arguments are treated as a filter expression.  Capture filters
138 are supported only when doing a live capture; read filters are supported
139 when doing a live capture and when reading a capture file, but require
140 TShark to do more work when filtering, so you might be more likely to
141 lose packets under heavy load if you're using a read filter.  If the
142 filter is specified with command-line arguments after the option
143 arguments, it's a capture filter if a capture is being done (i.e., if no
144 B<-r> option was specified) and a read filter if a capture file is being
145 read (i.e., if a B<-r> option was specified).
146
147 The B<-G> option is a special mode that simply causes B<Tshark>
148 to dump one of several types of internal glossaries and then exit.
149
150 =head1 OPTIONS
151
152 =over 4
153
154 =item -2
155
156 Perform a two-pass analysis. This causes tshark to buffer output until the
157 entire first pass is done, but allows it to fill in fields that require future
158 knowledge, such as 'response in frame #' fields. Also permits reassembly
159 frame dependencies to be calculated correctly.
160
161 =item -a  E<lt>capture autostop conditionE<gt>
162
163 Specify a criterion that specifies when B<TShark> is to stop writing
164 to a capture file.  The criterion is of the form I<test>B<:>I<value>,
165 where I<test> is one of:
166
167 B<duration>:I<value> Stop writing to a capture file after I<value> seconds
168 have elapsed.
169
170 B<filesize>:I<value> Stop writing to a capture file after it reaches a size of
171 I<value> kB.  If this option is used together with the -b option, B<TShark>
172 will stop writing to the current capture file and switch to the next one if
173 filesize is reached.  When reading a capture file, B<TShark> will stop reading
174 the file after the number of bytes read exceeds this number (the complete
175 packet  will be read, so more bytes than this number may be read).  Note that
176 the filesize is limited to a maximum value of 2 GiB.
177
178 B<files>:I<value> Stop writing to capture files after I<value> number of files
179 were written.
180
181 =item -b  E<lt>capture ring buffer optionE<gt>
182
183 Cause B<TShark> to run in "multiple files" mode.  In "multiple files" mode,
184 B<TShark> will write to several capture files.  When the first capture file
185 fills up, B<TShark> will switch writing to the next file and so on.
186
187 The created filenames are based on the filename given with the B<-w> option,
188 the number of the file and on the creation date and time,
189 e.g. outfile_00001_20050604120117.pcap, outfile_00002_20050604120523.pcap, ...
190
191 With the I<files> option it's also possible to form a "ring buffer".
192 This will fill up new files until the number of files specified,
193 at which point B<TShark> will discard the data in the first file and start
194 writing to that file and so on.  If the I<files> option is not set,
195 new files filled up until one of the capture stop conditions match (or
196 until the disk is full).
197
198 The criterion is of the form I<key>B<:>I<value>,
199 where I<key> is one of:
200
201 B<duration>:I<value> switch to the next file after I<value> seconds have
202 elapsed, even if the current file is not completely filled up.
203
204 B<filesize>:I<value> switch to the next file after it reaches a size of
205 I<value> kB.  Note that the filesize is limited to a maximum value of 2 GiB.
206
207 B<files>:I<value> begin again with the first file after I<value> number of
208 files were written (form a ring buffer).  This value must be less than 100000.
209 Caution should be used when using large numbers of files: some filesystems do
210 not handle many files in a single directory well.  The B<files> criterion
211 requires either B<duration> or B<filesize> to be specified to control when to
212 go to the next file.  It should be noted that each B<-b> parameter takes exactly
213 one criterion; to specify two criterion, each must be preceded by the B<-b>
214 option.
215
216 Example: B<-b filesize:1000 -b files:5> results in a ring buffer of five files
217 of size one megabyte each.
218
219 =item -B  E<lt>capture buffer sizeE<gt>
220
221 Set capture buffer size (in MiB, default is 2 MiB).  This is used by
222 the capture driver to buffer packet data until that data can be written
223 to disk.  If you encounter packet drops while capturing, try to increase
224 this size.  Note that, while B<Tshark> attempts to set the buffer size
225 to 2 MiB by default, and can be told to set it to a larger value, the
226 system or interface on which you're capturing might silently limit the
227 capture buffer size to a lower value or raise it to a higher value.
228
229 This is available on UNIX systems with libpcap 1.0.0 or later and on
230 Windows.  It is not available on UNIX systems with earlier versions of
231 libpcap.
232
233 This option can occur multiple times.  If used before the first
234 occurrence of the B<-i> option, it sets the default capture buffer size.
235 If used after an B<-i> option, it sets the capture buffer size for
236 the interface specified by the last B<-i> option occurring before
237 this option.  If the capture buffer size is not set specifically,
238 the default capture buffer size is used instead.
239
240 =item -c  E<lt>capture packet countE<gt>
241
242 Set the maximum number of packets to read when capturing live
243 data.  If reading a capture file, set the maximum number of packets to read.
244
245 =item -C  E<lt>configuration profileE<gt>
246
247 Run with the given configuration profile.
248
249 =item -d  E<lt>layer typeE<gt>==E<lt>selectorE<gt>,E<lt>decode-as protocolE<gt>
250
251 Like Wireshark's B<Decode As...> feature, this lets you specify how a
252 layer type should be dissected.  If the layer type in question (for example,
253 B<tcp.port> or B<udp.port> for a TCP or UDP port number) has the specified
254 selector value, packets should be dissected as the specified protocol.
255
256 Example: B<-d tcp.port==8888,http> will decode any traffic running over
257 TCP port 8888 as HTTP.
258
259 Example: B<-d tcp.port==8888:3,http> will decode any traffic running over
260 TCP ports 8888, 8889 or 8890 as HTTP.
261
262 Example: B<-d tcp.port==8888-8890,http> will decode any traffic running over
263 TCP ports 8888, 8889 or 8890 as HTTP.
264
265 Using an invalid selector or protocol will print out a list of valid selectors
266 and protocol names, respectively.
267
268 Example: B<-d .> is a quick way to get a list of valid selectors.
269
270 Example: B<-d ethertype==0x0800.> is a quick way to get a list of protocols that can be
271 selected with an ethertype.
272
273 =item -D
274
275 Print a list of the interfaces on which B<TShark> can capture, and
276 exit.  For each network interface, a number and an
277 interface name, possibly followed by a text description of the
278 interface, is printed.  The interface name or the number can be supplied
279 to the B<-i> option to specify an interface on which to capture.
280
281 This can be useful on systems that don't have a command to list them
282 (e.g., Windows systems, or UNIX systems lacking B<ifconfig -a>);
283 the number can be useful on Windows 2000 and later systems, where the
284 interface name is a somewhat complex string.
285
286 Note that "can capture" means that B<TShark> was able to open that
287 device to do a live capture.  Depending on your system you may need to
288 run tshark from an account with special privileges (for example, as
289 root) to be able to capture network traffic.  If B<TShark -D> is not run
290 from such an account, it will not list any interfaces.
291
292 =item -e  E<lt>fieldE<gt>
293
294 Add a field to the list of fields to display if B<-T ek|fields|json|pdml>
295 is selected.  This option can be used multiple times on the command line.
296 At least one field must be provided if the B<-T fields> option is
297 selected. Column names may be used prefixed with "_ws.col."
298
299 Example: B<-e frame.number -e ip.addr -e udp -e _ws.col.Info>
300
301 Giving a protocol rather than a single field will print multiple items
302 of data about the protocol as a single field.  Fields are separated by
303 tab characters by default.  B<-E> controls the format of the printed
304 fields.
305
306 =item -E  E<lt>field print optionE<gt>
307
308 Set an option controlling the printing of fields when B<-T fields> is
309 selected.
310
311 Options are:
312
313 B<bom=y|n> If B<y>, prepend output with the UTF-8 byte order mark
314 (hexadecimal ef, bb, bf). Defaults to B<n>.
315
316 B<header=y|n> If B<y>, print a list of the field names given using B<-e>
317 as the first line of the output; the field name will be separated using
318 the same character as the field values.  Defaults to B<n>.
319
320 B<separator=/t|/s|>E<lt>characterE<gt> Set the separator character to
321 use for fields.  If B</t> tab will be used (this is the default), if
322 B</s>, a single space will be used.  Otherwise any character that can be
323 accepted by the command line as part of the option may be used.
324
325 B<occurrence=f|l|a> Select which occurrence to use for fields that have
326 multiple occurrences.  If B<f> the first occurrence will be used, if B<l>
327 the last occurrence will be used and if B<a> all occurrences will be used
328 (this is the default).
329
330 B<aggregator=,|/s|>E<lt>characterE<gt> Set the aggregator character to
331 use for fields that have multiple occurrences.  If B<,> a comma will be used
332 (this is the default), if B</s>, a single space will be used.  Otherwise
333 any character that can be accepted by the command line as part of the
334 option may be used.
335
336 B<quote=d|s|n> Set the quote character to use to surround fields.  B<d>
337 uses double-quotes, B<s> single-quotes, B<n> no quotes (the default).
338
339 =item -f  E<lt>capture filterE<gt>
340
341 Set the capture filter expression.
342
343 This option can occur multiple times.  If used before the first
344 occurrence of the B<-i> option, it sets the default capture filter expression.
345 If used after an B<-i> option, it sets the capture filter expression for
346 the interface specified by the last B<-i> option occurring before
347 this option.  If the capture filter expression is not set specifically,
348 the default capture filter expression is used if provided.
349
350 Pre-defined capture filter names, as shown in the GUI menu item Capture->Capture Filters,
351 can be used by prefixing the argument with "predef:".
352 Example: B<-f "predef:MyPredefinedHostOnlyFilter">
353
354 =item -F  E<lt>file formatE<gt>
355
356 Set the file format of the output capture file written using the B<-w>
357 option.  The output written with the B<-w> option is raw packet data, not
358 text, so there is no B<-F> option to request text output.  The option B<-F>
359 without a value will list the available formats.
360
361 =item -g
362
363 This option causes the output file(s) to be created with group-read permission
364 (meaning that the output file(s) can be read by other members of the calling
365 user's group).
366
367 =item -G  [ E<lt>report typeE<gt> ]
368
369 The B<-G> option will cause B<Tshark> to dump one of several types of glossaries
370 and then exit.  If no specific glossary type is specified, then the B<fields> report will be generated by default.
371
372 The available report types include:
373
374 B<column-formats> Dumps the column formats understood by tshark.
375 There is one record per line.  The fields are tab-delimited.
376
377  * Field 1 = format string (e.g. "%rD")
378  * Field 2 = text description of format string (e.g. "Dest port (resolved)")
379
380 B<currentprefs>  Dumps a copy of the current preferences file to stdout.
381
382 B<decodes> Dumps the "layer type"/"decode as" associations to stdout.
383 There is one record per line.  The fields are tab-delimited.
384
385  * Field 1 = layer type, e.g. "tcp.port"
386  * Field 2 = selector in decimal
387  * Field 3 = "decode as" name, e.g. "http"
388
389 B<defaultprefs>  Dumps a default preferences file to stdout.
390
391 B<dissector-tables>  Dumps a list of dissector tables to stdout.  There
392 is one record per line.  The fields are tab-delimited.
393
394  * Field 1 = dissector table name, e.g. "tcp.port"
395  * Field 2 = name used for the dissector table in the GUI
396  * Field 3 = type (textual representation of the ftenum type)
397  * Field 4 = base for display (for integer types)
398
399 B<fieldcount>  Dumps the number of header fields to stdout.
400
401 B<fields>  Dumps the contents of the registration database to
402 stdout.  An independent program can take this output and format it into nice
403 tables or HTML or whatever.  There is one record per line.  Each record is
404 either a protocol or a header field, differentiated by the first field.
405 The fields are tab-delimited.
406
407  * Protocols
408  * ---------
409  * Field 1 = 'P'
410  * Field 2 = descriptive protocol name
411  * Field 3 = protocol abbreviation
412  *
413  * Header Fields
414  * -------------
415  * Field 1 = 'F'
416  * Field 2 = descriptive field name
417  * Field 3 = field abbreviation
418  * Field 4 = type (textual representation of the ftenum type)
419  * Field 5 = parent protocol abbreviation
420  * Field 6 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
421  * Field 7 = bitmask: format: hex: 0x....
422  * Field 8 = blurb describing field
423
424 B<ftypes> Dumps the "ftypes" (fundamental types) understood by tshark.
425 There is one record per line.  The fields are tab-delimited.
426
427  * Field 1 = FTYPE (e.g "FT_IPv6")
428  * Field 2 = text description of type (e.g. "IPv6 address")
429
430 B<heuristic-decodes> Dumps the heuristic decodes currently installed.
431 There is one record per line.  The fields are tab-delimited.
432
433  * Field 1 = underlying dissector (e.g. "tcp")
434  * Field 2 = name of heuristic decoder (e.g. ucp")
435  * Field 3 = heuristic enabled (e.g. "T" or "F")
436
437 B<plugins> Dumps the plugins currently installed.
438 There is one record per line.  The fields are tab-delimited.
439
440  * Field 1 = plugin library (e.g. "gryphon.so")
441  * Field 2 = plugin version (e.g. 0.0.4)
442  * Field 3 = plugin type (e.g. "dissector" or "tap")
443  * Field 4 = full path to plugin file
444
445 B<protocols> Dumps the protocols in the registration database to stdout.
446 An independent program can take this output and format it into nice tables
447 or HTML or whatever.  There is one record per line.  The fields are tab-delimited.
448
449  * Field 1 = protocol name
450  * Field 2 = protocol short name
451  * Field 3 = protocol filter name
452
453 B<values> Dumps the value_strings, range_strings or true/false strings
454 for fields that have them.  There is one record per line.  Fields are
455 tab-delimited.  There are three types of records: Value String, Range
456 String and True/False String.  The first field, 'V', 'R' or 'T', indicates
457 the type of record.
458
459  * Value Strings
460  * -------------
461  * Field 1 = 'V'
462  * Field 2 = field abbreviation to which this value string corresponds
463  * Field 3 = Integer value
464  * Field 4 = String
465  *
466  * Range Strings
467  * -------------
468  * Field 1 = 'R'
469  * Field 2 = field abbreviation to which this range string corresponds
470  * Field 3 = Integer value: lower bound
471  * Field 4 = Integer value: upper bound
472  * Field 5 = String
473  *
474  * True/False Strings
475  * ------------------
476  * Field 1 = 'T'
477  * Field 2 = field abbreviation to which this true/false string corresponds
478  * Field 3 = True String
479  * Field 4 = False String
480
481 =item -h
482
483 Print the version and options and exits.
484
485 =item -H  E<lt>input hosts fileE<gt>
486
487 Read a list of entries from a "hosts" file, which will then be written
488 to a capture file.  Implies B<-W n>. Can be called multiple times.
489
490 The "hosts" file format is documented at
491 L<http://en.wikipedia.org/wiki/Hosts_(file)>.
492
493 =item -i  E<lt>capture interfaceE<gt> | -
494
495 Set the name of the network interface or pipe to use for live packet
496 capture.
497
498 Network interface names should match one of the names listed in
499 "B<tshark -D>" (described above); a number, as reported by
500 "B<tshark -D>", can also be used.  If you're using UNIX, "B<netstat
501 -i>" or "B<ifconfig -a>" might also work to list interface names,
502 although not all versions of UNIX support the B<-a> option to B<ifconfig>.
503
504 If no interface is specified, B<TShark> searches the list of
505 interfaces, choosing the first non-loopback interface if there are any
506 non-loopback interfaces, and choosing the first loopback interface if
507 there are no non-loopback interfaces.  If there are no interfaces at all,
508 B<TShark> reports an error and doesn't start the capture.
509
510 Pipe names should be either the name of a FIFO (named pipe) or ``-'' to
511 read data from the standard input.  Data read from pipes must be in
512 standard pcap format.
513
514 This option can occur multiple times.  When capturing from multiple
515 interfaces, the capture file will be saved in pcap-ng format.
516
517 Note: the Win32 version of B<TShark> doesn't support capturing from
518 pipes!
519
520 =item -I
521
522 Put the interface in "monitor mode"; this is supported only on IEEE
523 802.11 Wi-Fi interfaces, and supported only on some operating systems.
524
525 Note that in monitor mode the adapter might disassociate from the
526 network with which it's associated, so that you will not be able to use
527 any wireless networks with that adapter.  This could prevent accessing
528 files on a network server, or resolving host names or network addresses,
529 if you are capturing in monitor mode and are not connected to another
530 network with another adapter.
531
532 This option can occur multiple times.  If used before the first
533 occurrence of the B<-i> option, it enables the monitor mode for all interfaces.
534 If used after an B<-i> option, it enables the monitor mode for
535 the interface specified by the last B<-i> option occurring before
536 this option.
537
538 =item -j  E<lt>protocol match filterE<gt>
539
540 Protocol match filter used for ek|json|pdml output file types.
541 Parent node containing multiple child nodes is only included,
542 if the name is found in the filter.
543
544 Example: B<-j "http tcp ip">
545
546 =item -K  E<lt>keytabE<gt>
547
548 Load kerberos crypto keys from the specified keytab file.
549 This option can be used multiple times to load keys from several files.
550
551 Example: B<-K krb5.keytab>
552
553 =item -l
554
555 Flush the standard output after the information for each packet is
556 printed.  (This is not, strictly speaking, line-buffered if B<-V>
557 was specified; however, it is the same as line-buffered if B<-V> wasn't
558 specified, as only one line is printed for each packet, and, as B<-l> is
559 normally used when piping a live capture to a program or script, so that
560 output for a packet shows up as soon as the packet is seen and
561 dissected, it should work just as well as true line-buffering.  We do
562 this as a workaround for a deficiency in the Microsoft Visual C++ C
563 library.)
564
565 This may be useful when piping the output of B<TShark> to another
566 program, as it means that the program to which the output is piped will
567 see the dissected data for a packet as soon as B<TShark> sees the
568 packet and generates that output, rather than seeing it only when the
569 standard output buffer containing that data fills up.
570
571 =item -L
572
573 List the data link types supported by the interface and exit.  The reported
574 link types can be used for the B<-y> option.
575
576 =item -n
577
578 Disable network object name resolution (such as hostname, TCP and UDP port
579 names); the B<-N> flag might override this one.
580
581 =item -N  E<lt>name resolving flagsE<gt>
582
583 Turn on name resolving only for particular types of addresses and port
584 numbers, with name resolving for other types of addresses and port
585 numbers turned off.  This flag overrides B<-n> if both B<-N> and B<-n> are
586 present.  If both B<-N> and B<-n> flags are not present, all name resolutions
587 are turned on.
588
589 The argument is a string that may contain the letters:
590
591 B<d> to enable resolution from captured DNS packets
592
593 B<m> to enable MAC address resolution
594
595 B<n> to enable network address resolution
596
597 B<N> to enable using external resolvers (e.g., DNS) for network address
598 resolution
599
600 B<t> to enable transport-layer port number resolution
601
602 =item -o  E<lt>preferenceE<gt>:E<lt>valueE<gt>
603
604 Set a preference value, overriding the default value and any value read
605 from a preference file.  The argument to the option is a string of the
606 form I<prefname>B<:>I<value>, where I<prefname> is the name of the
607 preference (which is the same name that would appear in the preference
608 file), and I<value> is the value to which it should be set.
609
610 =item -O  E<lt>protocolsE<gt>
611
612 Similar to the B<-V> option, but causes B<TShark> to only show a detailed view
613 of the comma-separated list of I<protocols> specified, rather than a detailed
614 view of all protocols.  Use the output of "B<tshark -G protocols>" to find the
615 abbreviations of the protocols you can specify.
616
617 =item -p
618
619 I<Don't> put the interface into promiscuous mode.  Note that the
620 interface might be in promiscuous mode for some other reason; hence,
621 B<-p> cannot be used to ensure that the only traffic that is captured is
622 traffic sent to or from the machine on which B<TShark> is running,
623 broadcast traffic, and multicast traffic to addresses received by that
624 machine.
625
626 This option can occur multiple times.  If used before the first
627 occurrence of the B<-i> option, no interface will be put into the
628 promiscuous mode.
629 If used after an B<-i> option, the interface specified by the last B<-i>
630 option occurring before this option will not be put into the
631 promiscuous mode.
632
633 =item -P
634
635 Decode and display the packet summary, even if writing raw packet data using
636 the B<-w> option.
637
638 =item -q
639
640 When capturing packets, don't display the continuous count of packets
641 captured that is normally shown when saving a capture to a file;
642 instead, just display, at the end of the capture, a count of packets
643 captured.  On systems that support the SIGINFO signal, such as various
644 BSDs, you can cause the current count to be displayed by typing your
645 "status" character (typically control-T, although it
646 might be set to "disabled" by default on at least some BSDs, so you'd
647 have to explicitly set it to use it).
648
649 When reading a capture file, or when capturing and not saving to a file,
650 don't print packet information; this is useful if you're using a B<-z>
651 option to calculate statistics and don't want the packet information
652 printed, just the statistics.
653
654 =item -Q
655
656 When capturing packets, only display true errors.  This outputs less
657 than the B<-q> option, so the interface name and total packet
658 count and the end of a capture are not sent to stderr.
659
660 =item -r  E<lt>infileE<gt>
661
662 Read packet data from I<infile>, can be any supported capture file format
663 (including gzipped files).  It is possible to use named pipes or stdin (-)
664 here but only with certain (not compressed) capture file formats (in
665 particular: those that can be read without seeking backwards).
666
667 =item -R  E<lt>Read filterE<gt>
668
669 Cause the specified filter (which uses the syntax of read/display filters,
670 rather than that of capture filters) to be applied during the first pass of
671 analysis. Packets not matching the filter are not considered for future
672 passes. Only makes sense with multiple passes, see -2. For regular filtering
673 on single-pass dissect see -Y instead.
674
675 Note that forward-looking fields such as 'response in frame #' cannot be used
676 with this filter, since they will not have been calculate when this filter is
677 applied.
678
679 =item -s  E<lt>capture snaplenE<gt>
680
681 Set the default snapshot length to use when capturing live data.
682 No more than I<snaplen> bytes of each network packet will be read into
683 memory, or saved to disk.  A value of 0 specifies a snapshot length of
684 65535, so that the full packet is captured; this is the default.
685
686 This option can occur multiple times.  If used before the first
687 occurrence of the B<-i> option, it sets the default snapshot length.
688 If used after an B<-i> option, it sets the snapshot length for
689 the interface specified by the last B<-i> option occurring before
690 this option.  If the snapshot length is not set specifically,
691 the default snapshot length is used if provided.
692
693 =item -S  E<lt>separatorE<gt>
694
695 Set the line separator to be printed between packets.
696
697 =item -t  a|ad|adoy|d|dd|e|r|u|ud|udoy
698
699 Set the format of the packet timestamp printed in summary lines.
700 The format can be one of:
701
702 B<a> absolute: The absolute time, as local time in your time zone,
703 is the actual time the packet was captured, with no date displayed
704
705 B<ad> absolute with date: The absolute date, displayed as YYYY-MM-DD,
706 and time, as local time in your time zone, is the actual time and date
707 the packet was captured
708
709 B<adoy> absolute with date using day of year: The absolute date,
710 displayed as YYYY/DOY, and time, as local time in your time zone,
711 is the actual time and date the packet was captured
712
713 B<d> delta: The delta time is the time since the previous packet was
714 captured
715
716 B<dd> delta_displayed: The delta_displayed time is the time since the
717 previous displayed packet was captured
718
719 B<e> epoch: The time in seconds since epoch (Jan 1, 1970 00:00:00)
720
721 B<r> relative: The relative time is the time elapsed between the first packet
722 and the current packet
723
724 B<u> UTC: The absolute time, as UTC, is the actual time the packet was
725 captured, with no date displayed
726
727 B<ud> UTC with date: The absolute date, displayed as YYYY-MM-DD,
728 and time, as UTC, is the actual time and date the packet was captured
729
730 B<udoy> UTC with date using day of year: The absolute date, displayed
731 as YYYY/DOY, and time, as UTC, is the actual time and date the packet
732 was captured
733
734 The default format is relative.
735
736 =item -T  ek|fields|json|pdml|ps|psml|text
737
738 Set the format of the output when viewing decoded packet data.  The
739 options are one of:
740
741 B<ek> Newline delimited JSON format for bulk import into Elasticsearch.
742 It can be used with B<-j> including the JSON filter or with B<-x> flag
743 to include raw packet data.
744 Example of usage to import data into Elasticsearch:
745
746   tshark -T ek -j "http tcp ip" -x -r file.pcap > file.json
747   curl -XPUT http://elasticsearch:9200/_bulk --data-binary @file.json
748
749 B<fields> The values of fields specified with the B<-e> option, in a
750 form specified by the B<-E> option.  For example,
751
752   -T fields -E separator=, -E quote=d
753
754 would generate comma-separated values (CSV) output suitable for importing
755 into your favorite spreadsheet program.
756
757 B<json> JSON file format. It can be used with B<-j> including
758 the JSON filter or with B<-x> flag to influde raw packet data.
759 Example of usage:
760
761   tshark -T json -r file.pcap
762   tshark -T json -j "http tcp ip" -x -r file.pcap
763
764 B<pdml> Packet Details Markup Language, an XML-based format for the details of
765 a decoded packet.  This information is equivalent to the packet details
766 printed with the B<-V> flag.
767
768 B<ps> PostScript for a human-readable one-line summary of each of the packets,
769 or a multi-line view of the details of each of the packets, depending on
770 whether the B<-V> flag was specified.
771
772 B<psml> Packet Summary Markup Language, an XML-based format for the summary
773 information of a decoded packet.  This information is equivalent to the
774 information shown in the one-line summary printed by default.
775
776 B<text> Text of a human-readable one-line summary of each of the packets, or a
777 multi-line view of the details of each of the packets, depending on
778 whether the B<-V> flag was specified.  This is the default.
779
780 =item -u E<lt>seconds typeE<gt>
781
782 Specifies the seconds type.  Valid choices are:
783
784 B<s> for seconds
785
786 B<hms> for hours, minutes and seconds
787
788 =item -U E<lt>tap nameE<gt>
789
790 PDUs export, exports PDUs from infile to outfile according to the tap name given. Use -Y to filter.
791
792 Enter an empty tap name "" to get a list of available names.
793
794 =item -v
795
796 Print the version and exit.
797
798 =item -V
799
800 Cause B<TShark> to print a view of the packet details.
801
802 =item -w  E<lt>outfileE<gt> | -
803
804 Write raw packet data to I<outfile> or to the standard output if
805 I<outfile> is '-'.
806
807 NOTE: -w provides raw packet data, not text.  If you want text output
808 you need to redirect stdout (e.g. using '>'), don't use the B<-w>
809 option for this.
810
811 =item -W  E<lt>file format optionE<gt>
812
813 Save extra information in the file if the format supports it.  For
814 example,
815
816   -F pcapng -W n
817
818 will save host name resolution records along with captured packets.
819
820 Future versions of Wireshark may automatically change the capture format to
821 B<pcapng> as needed.
822
823 The argument is a string that may contain the following letter:
824
825 B<n> write network address resolution information (pcapng only)
826
827 =item -x
828
829 Cause B<TShark> to print a hex and ASCII dump of the packet data
830 after printing the summary and/or details, if either are also being displayed.
831
832 =item -X E<lt>eXtension optionsE<gt>
833
834 Specify an option to be passed to a B<TShark> module.  The eXtension option
835 is in the form I<extension_key>B<:>I<value>, where I<extension_key> can be:
836
837 B<lua_script>:I<lua_script_filename> tells B<TShark> to load the given script in addition to the
838 default Lua scripts.
839
840 B<lua_script>I<num>:I<argument> tells B<TShark> to pass the given argument
841 to the lua script identified by 'num', which is the number indexed order of the 'lua_script' command.
842 For example, if only one script was loaded with '-X lua_script:my.lua', then '-X lua_script1:foo'
843 will pass the string 'foo' to the 'my.lua' script.  If two scripts were loaded, such as '-X lua_script:my.lua'
844 and '-X lua_script:other.lua' in that order, then a '-X lua_script2:bar' would pass the string 'bar' to the second lua
845 script, namely 'other.lua'.
846
847 B<read_format>:I<file_format> tells B<TShark> to use the given file format to read in the
848 file (the file given in the B<-r> command option). Providing no I<file_format> argument, or
849 an invalid one, will produce a file of available file formats to use.
850
851 =item -y  E<lt>capture link typeE<gt>
852
853 Set the data link type to use while capturing packets.  The values
854 reported by B<-L> are the values that can be used.
855
856 This option can occur multiple times.  If used before the first
857 occurrence of the B<-i> option, it sets the default capture link type.
858 If used after an B<-i> option, it sets the capture link type for
859 the interface specified by the last B<-i> option occurring before
860 this option.  If the capture link type is not set specifically,
861 the default capture link type is used if provided.
862
863 =item -Y  E<lt>displaY filterE<gt>
864
865 Cause the specified filter (which uses the syntax of read/display filters,
866 rather than that of capture filters) to be applied before printing a
867 decoded form of packets or writing packets to a file.  Packets matching the
868 filter are printed or written to file; packets that the matching packets
869 depend upon (e.g., fragments), are not printed but are written to file;
870 packets not matching the filter nor depended upon are discarded rather
871 than being printed or written.
872
873 Use this instead of -R for filtering using single-pass analysis. If doing
874 two-pass analysis (see -2) then only packets matching the read filter (if there
875 is one) will be checked against this filter.
876
877 =item -z  E<lt>statisticsE<gt>
878
879 Get B<TShark> to collect various types of statistics and display the result
880 after finishing reading the capture file.  Use the B<-q> flag if you're
881 reading a capture file and only want the statistics printed, not any
882 per-packet information.
883
884 Note that the B<-z proto> option is different - it doesn't cause
885 statistics to be gathered and printed when the capture is complete, it
886 modifies the regular packet summary output to include the values of
887 fields specified with the option.  Therefore you must not use the B<-q>
888 option, as that option would suppress the printing of the regular packet
889 summary output, and must also not use the B<-V> option, as that would
890 cause packet detail information rather than packet summary information
891 to be printed.
892
893 Currently implemented statistics are:
894
895 =over 4
896
897 =item B<-z help>
898
899 Display all possible values for B<-z>.
900
901 =item B<-z> afp,srt[,I<filter>]
902
903 Show Apple Filing Protocol service response time statistics.
904
905 =item B<-z> camel,srt
906
907 =item B<-z> compare,I<start>,I<stop>,I<ttl[0|1]>,I<order[0|1]>,I<variance>[,I<filter>]
908
909 If the optional I<filter> is specified, only those packets that match the
910 filter will be used in the calculations.
911
912 =item B<-z> conv,I<type>[,I<filter>]
913
914 Create a table that lists all conversations that could be seen in the
915 capture.  I<type> specifies the conversation endpoint types for which we
916 want to generate the statistics; currently the supported ones are:
917
918   "bluetooth"  Bluetooth addresses
919   "eth"   Ethernet addresses
920   "fc"    Fibre Channel addresses
921   "fddi"  FDDI addresses
922   "ip"    IPv4 addresses
923   "ipv6"  IPv6 addresses
924   "ipx"   IPX addresses
925   "jxta"  JXTA message addresses
926   "ncp"   NCP connections
927   "rsvp"  RSVP connections
928   "sctp"  SCTP addresses
929   "tcp"   TCP/IP socket pairs  Both IPv4 and IPv6 are supported
930   "tr"    Token Ring addresses
931   "usb"   USB addresses
932   "udp"   UDP/IP socket pairs  Both IPv4 and IPv6 are supported
933   "wlan"  IEEE 802.11 addresses
934
935 If the optional I<filter> is specified, only those packets that match the
936 filter will be used in the calculations.
937
938 The table is presented with one line for each conversation and displays
939 the number of packets/bytes in each direction as well as the total
940 number of packets/bytes.  The table is sorted according to the total
941 number of frames.
942
943 =item B<-z> dcerpc,srt,I<uuid>,I<major>.I<minor>[,I<filter>]
944
945 Collect call/reply SRT (Service Response Time) data for DCERPC interface I<uuid>,
946 version I<major>.I<minor>.
947 Data collected is the number of calls for each procedure, MinSRT, MaxSRT
948 and AvgSRT.
949
950 Example: S<B<-z dcerpc,srt,12345778-1234-abcd-ef00-0123456789ac,1.0>> will collect data for the CIFS SAMR Interface.
951
952 This option can be used multiple times on the command line.
953
954 If the optional I<filter> is provided, the stats will only be calculated
955 on those calls that match that filter.
956
957 Example: S<B<-z dcerpc,srt,12345778-1234-abcd-ef00-0123456789ac,1.0,ip.addr==1.2.3.4>> will collect SAMR
958 SRT statistics for a specific host.
959
960 =item B<-z> bootp,stat[,I<filter>]
961
962 Show DHCP (BOOTP) statistics.
963
964 =item B<-z> diameter,avp[,I<cmd.code>,I<field>,I<field>,I<...>]
965
966 This option enables extraction of most important diameter fields from large capture files.
967 Exactly one text line for each diameter message with matched B<diameter.cmd.code> will be printed.
968
969 Empty diameter command code or '*' can be specified to mach any B<diameter.cmd.code>
970
971 Example: B<-z diameter,avp>  extract default field set from diameter messages.
972
973 Example: B<-z diameter,avp,280>  extract default field set from diameter DWR messages.
974
975 Example: B<-z diameter,avp,272>  extract default field set from diameter CC messages.
976
977 Extract most important fields from diameter CC messages:
978
979 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>
980
981 Following fields will be printed out for each diameter message:
982
983   "frame"        Frame number.
984   "time"         Unix time of the frame arrival.
985   "src"          Source address.
986   "srcport"      Source port.
987   "dst"          Destination address.
988   "dstport"      Destination port.
989   "proto"        Constant string 'diameter', which can be used for post processing of tshark output.  E.g. grep/sed/awk.
990   "msgnr"        seq. number of diameter message within the frame.  E.g. '2' for the third diameter message in the same frame.
991   "is_request"   '0' if message is a request, '1' if message is an answer.
992   "cmd"          diameter.cmd_code, E.g. '272' for credit control messages.
993   "req_frame"    Number of frame where matched request was found or '0'.
994   "ans_frame"    Number of frame where matched answer was found or '0'.
995   "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.
996
997 B<-z diameter,avp> option is much faster than B<-V -T text> or B<-T pdml> options.
998
999 B<-z diameter,avp> option is more powerful than B<-T field> and B<-z proto,colinfo> options.
1000
1001 Multiple diameter messages in one frame are supported.
1002
1003 Several fields with same name within one diameter message are supported, e.g. I<diameter.Subscription-Id-Data> or I<diameter.Rating-Group>.
1004
1005 Note: B<tshark -q> option is recommended to suppress default B<tshark> output.
1006
1007 =item B<-z> dns,tree[,I<filter>]
1008
1009 Create a summary of the captured DNS packets. General information are collected such as qtype and qclass distribution.
1010 For some data (as qname length or DNS payload) max, min and average values are also displayed.
1011
1012 =item B<-z> endpoints,I<type>[,I<filter>]
1013
1014 Create a table that lists all endpoints that could be seen in the
1015 capture.  I<type> specifies the endpoint types for which we
1016 want to generate the statistics; currently the supported ones are:
1017
1018   "bluetooth"  Bluetooth addresses
1019   "eth"   Ethernet addresses
1020   "fc"    Fibre Channel addresses
1021   "fddi"  FDDI addresses
1022   "ip"    IPv4 addresses
1023   "ipv6"  IPv6 addresses
1024   "ipx"   IPX addresses
1025   "jxta"  JXTA message addresses
1026   "ncp"   NCP connections
1027   "rsvp"  RSVP connections
1028   "sctp"  SCTP addresses
1029   "tcp"   TCP/IP socket pairs  Both IPv4 and IPv6 are supported
1030   "tr"    Token Ring addresses
1031   "usb"   USB addresses
1032   "udp"   UDP/IP socket pairs  Both IPv4 and IPv6 are supported
1033   "wlan"  IEEE 802.11 addresses
1034
1035 If the optional I<filter> is specified, only those packets that match the
1036 filter will be used in the calculations.
1037
1038 The table is presented with one line for each conversation and displays
1039 the number of packets/bytes in each direction as well as the total
1040 number of packets/bytes.  The table is sorted according to the total
1041 number of frames.
1042
1043 =item B<-z> expert[I<,error|,warn|,note|,chat>][I<,filter>]
1044
1045 Collects information about all expert info, and will display them in order,
1046 grouped by severity.
1047
1048 Example: B<-z expert,sip> will show expert items of all severity for frames that
1049 match the sip protocol.
1050
1051 This option can be used multiple times on the command line.
1052
1053 If the optional I<filter> is provided, the stats will only be calculated
1054 on those calls that match that filter.
1055
1056 Example: B<-z "expert,note,tcp"> will only collect expert items for frames that
1057 include the tcp protocol, with a severity of note or higher.
1058
1059 =item B<-z> follow,I<prot>,I<mode>,I<filter>[I<,range>]
1060
1061 Displays the contents of a TCP or UDP stream between two nodes.  The data
1062 sent by the second node is prefixed with a tab to differentiate it from the
1063 data sent by the first node.
1064
1065 I<prot> specifies the transport protocol.  It can be one of:
1066
1067   tcp   TCP
1068   udp   UDP
1069   ssl   SSL
1070
1071 I<mode> specifies the output mode.  It can be one of:
1072
1073   ascii  ASCII output with dots for non-printable characters
1074   ebcdic EBCDIC output with dots for non-printable characters
1075   hex    Hexadecimal and ASCII data with offsets
1076   raw    Hexadecimal data
1077
1078 Since the output in B<ascii> or B<ebcdic> mode may contain newlines, the length
1079 of each section of output plus a newline precedes each section of output.
1080
1081 I<filter> specifies the stream to be displayed. UDP/TCP streams are selected
1082 with either the stream index or IP address plus port pairs. SSL streams are
1083 selected with the stream index. For example:
1084
1085   ip-addr0:port0,ip-addr1:port1
1086   stream-index
1087
1088 I<range> optionally specifies which "chunks" of the stream should be displayed.
1089
1090 Example: B<-z "follow,tcp,hex,1"> will display the contents of the second TCP
1091 stream (the first is stream 0) in "hex" format.
1092
1093   ===================================================================
1094   Follow: tcp,hex
1095   Filter: tcp.stream eq 1
1096   Node 0: 200.57.7.197:32891
1097   Node 1: 200.57.7.198:2906
1098   00000000  00 00 00 22 00 00 00 07  00 0a 85 02 07 e9 00 02  ...".... ........
1099   00000010  07 e9 06 0f 00 0d 00 04  00 00 00 01 00 03 00 06  ........ ........
1100   00000020  1f 00 06 04 00 00                                 ......
1101   00000000  00 01 00 00                                       ....
1102   00000026  00 02 00 00
1103
1104 Example: B<-z "follow,tcp,ascii,200.57.7.197:32891,200.57.7.198:2906"> will
1105 display the contents of a TCP stream between 200.57.7.197 port 32891 and
1106 200.57.7.98 port 2906.
1107
1108   ===================================================================
1109   Follow: tcp,ascii
1110   Filter: (omitted for readability)
1111   Node 0: 200.57.7.197:32891
1112   Node 1: 200.57.7.198:2906
1113   38
1114   ...".....
1115   ................
1116   4
1117   ....
1118
1119 =item B<-z> h225,counter[I<,filter>]
1120
1121 Count ITU-T H.225 messages and their reasons.  In the first column you get a
1122 list of H.225 messages and H.225 message reasons, which occur in the current
1123 capture file.  The number of occurrences of each message or reason is displayed
1124 in the second column.
1125
1126 Example: B<-z h225,counter>.
1127
1128 If the optional I<filter> is provided, the stats will only be calculated
1129 on those calls that match that filter.
1130 Example: use B<-z "h225,counter,ip.addr==1.2.3.4"> to only collect stats for
1131 H.225 packets exchanged by the host at IP address 1.2.3.4 .
1132
1133 This option can be used multiple times on the command line.
1134
1135 =item B<-z> h225,srt[I<,filter>]
1136
1137 Collect requests/response SRT (Service Response Time) data for ITU-T H.225 RAS.
1138 Data collected is number of calls of each ITU-T H.225 RAS Message Type,
1139 Minimum SRT, Maximum SRT, Average SRT, Minimum in Packet, and Maximum in Packet.
1140 You will also get the number of Open Requests (Unresponded Requests),
1141 Discarded Responses (Responses without matching request) and Duplicate Messages.
1142
1143 Example: B<-z h225,srt>
1144
1145 This option can be used multiple times on the command line.
1146
1147 If the optional I<filter> is provided, the stats will only be calculated
1148 on those calls that match that filter.
1149
1150 Example: B<-z "h225,srt,ip.addr==1.2.3.4"> will only collect stats for
1151 ITU-T H.225 RAS packets exchanged by the host at IP address 1.2.3.4 .
1152
1153 =item B<-z> hosts[,ipv4][,ipv6]
1154
1155 Dump any collected IPv4 and/or IPv6 addresses in "hosts" format.  Both IPv4
1156 and IPv6 addresses are dumped by default.
1157
1158 Addresses are collected from a number of sources, including standard "hosts"
1159 files and captured traffic.
1160
1161 =item B<-z> hpfeeds,tree[,I<filter>]
1162
1163 Calculate statistics for HPFEEDS traffic such as publish per channel, and opcode
1164 distribution.
1165
1166 =item B<-z> http,stat,
1167
1168 Calculate the HTTP statistics distribution. Displayed values are
1169 the HTTP status codes and the HTTP request methods.
1170
1171 =item B<-z> http,tree
1172
1173 Calculate the HTTP packet distribution. Displayed values are the
1174 HTTP request modes and the HTTP status codes.
1175
1176 =item B<-z> http_req,tree
1177
1178 Calculate the HTTP requests by server. Displayed values are the
1179 server name and the URI path.
1180
1181 =item B<-z> http_srv,tree
1182
1183 Calculate the HTTP requests and responses by server. For the HTTP
1184 requests, displayed values are the server IP address and server
1185 hostname. For the HTTP responses, displayed values are the server
1186 IP address and status.
1187
1188 =item B<-z> icmp,srt[,I<filter>]
1189
1190 Compute total ICMP echo requests, replies, loss, and percent loss, as well as
1191 minimum, maximum, mean, median and sample standard deviation SRT statistics
1192 typical of what ping provides.
1193
1194 Example: S<B<-z icmp,srt,ip.src==1.2.3.4>> will collect ICMP SRT statistics
1195 for ICMP echo request packets originating from a specific host.
1196
1197 This option can be used multiple times on the command line.
1198
1199 =item B<-z> icmpv6,srt[,I<filter>]
1200
1201 Compute total ICMPv6 echo requests, replies, loss, and percent loss, as well as
1202 minimum, maximum, mean, median and sample standard deviation SRT statistics
1203 typical of what ping provides.
1204
1205 Example: S<B<-z icmpv6,srt,ipv6.src==fe80::1>> will collect ICMPv6 SRT statistics
1206 for ICMPv6 echo request packets originating from a specific host.
1207
1208 This option can be used multiple times on the command line.
1209
1210 =item B<-z> io,phs[,I<filter>]
1211
1212 Create Protocol Hierarchy Statistics listing both number of packets and bytes.
1213 If no I<filter> is specified the statistics will be calculated for all packets.
1214 If a I<filter> is specified statistics will only be calculated for those
1215 packets that match the filter.
1216
1217 This option can be used multiple times on the command line.
1218
1219 =item B<-z> io,stat,I<interval>[,I<filter>][,I<filter>][,I<filter>]...
1220
1221 Collect packet/bytes statistics for the capture in intervals of
1222 I<interval> seconds.  I<Interval> can be specified either as a whole or
1223 fractional second and can be specified with microsecond (us) resolution.
1224 If I<interval> is 0, the statistics will be calculated over all packets.
1225
1226 If no I<filter> is specified the statistics will be calculated for all packets.
1227 If one or more I<filters> are specified statistics will be calculated for
1228 all filters and presented with one column of statistics for each filter.
1229
1230 This option can be used multiple times on the command line.
1231
1232 Example: B<-z io,stat,1,ip.addr==1.2.3.4> will generate 1 second
1233 statistics for all traffic to/from host 1.2.3.4.
1234
1235 Example: B<-z "io,stat,0.001,smb&&ip.addr==1.2.3.4"> will generate 1ms
1236 statistics for all SMB packets to/from host 1.2.3.4.
1237
1238 The examples above all use the standard syntax for generating statistics
1239 which only calculates the number of packets and bytes in each interval.
1240
1241 B<io,stat> can also do much more statistics and calculate COUNT(), SUM(),
1242 MIN(), MAX(), AVG() and LOAD() using a slightly different filter syntax:
1243
1244 =item -z io,stat,I<interval>,E<34>[COUNT|SUM|MIN|MAX|AVG|LOAD](I<field>)I<filter>E<34>
1245
1246 NOTE: One important thing to note here is that the filter is not optional
1247 and that the field that the calculation is based on MUST be part of the filter
1248 string or the calculation will fail.
1249
1250 So: B<-z io,stat,0.010,AVG(smb.time)> does not work.  Use B<-z
1251 io,stat,0.010,AVG(smb.time)smb.time> instead.  Also be aware that a field
1252 can exist multiple times inside the same packet and will then be counted
1253 multiple times in those packets.
1254
1255 NOTE: A second important thing to note is that the system setting for
1256 decimal separator must be set to "."! If it is set to "," the statistics
1257 will not be displayed per filter.
1258
1259 B<COUNT(I<field>)I<filter>> - Calculates the number of times that the
1260 field I<name> (not its value) appears per interval in the filtered packet list.
1261 ''I<field>'' can be any display filter name.
1262
1263 Example: B<-z io,stat,0.010,E<34>COUNT(smb.sid)smb.sidE<34>>
1264
1265 This will count the total number of SIDs seen in each 10ms interval.
1266
1267 B<SUM(I<field>)I<filter>> - Unlike COUNT, the I<values> of the
1268 specified field are summed per time interval.
1269 ''I<field>'' can only be a named integer, float, double or relative time field.
1270
1271 Example: B<-z io,stat,0.010,E<34>SUM(frame.len)frame.lenE<34>>
1272
1273 Reports the total number of bytes that were transmitted bidirectionally in
1274 all the packets within a 10 millisecond interval.
1275
1276 B<MIN/MAX/AVG(I<field>)I<filter>> - The minimum, maximum, or average field value
1277 in each interval is calculated.  The specified field must be a named integer,
1278 float, double or relative time field.  For relative time fields, the output is presented in
1279 seconds with six decimal digits of precision rounded to the nearest microsecond.
1280
1281 In the following example, the time of the first Read_AndX call, the last Read_AndX
1282 response values are displayed and the minimum, maximum, and average Read response times
1283 (SRTs) are calculated.  NOTE: If the DOS command shell line continuation character, ''^''
1284 is used, each line cannot end in a comma so it is placed at the beginning of each
1285 continuation line:
1286
1287   tshark -o tcp.desegment_tcp_streams:FALSE -n -q -r smb_reads.cap -z io,stat,0,
1288   "MIN(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==0",
1289   "MAX(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==1",
1290   "MIN(smb.time)smb.time and smb.cmd==0x2e",
1291   "MAX(smb.time)smb.time and smb.cmd==0x2e",
1292   "AVG(smb.time)smb.time and smb.cmd==0x2e"
1293
1294
1295   ======================================================================================================
1296   IO Statistics
1297   Column #0: MIN(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==0
1298   Column #1: MAX(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==1
1299   Column #2: MIN(smb.time)smb.time and smb.cmd==0x2e
1300   Column #3: MAX(smb.time)smb.time and smb.cmd==0x2e
1301   Column #4: AVG(smb.time)smb.time and smb.cmd==0x2e
1302                   |    Column #0   |    Column #1   |    Column #2   |    Column #3   |    Column #4   |
1303   Time            |       MIN      |       MAX      |       MIN      |       MAX      |       AVG      |
1304   000.000-                 0.000000         7.704054         0.000072         0.005539         0.000295
1305   ======================================================================================================
1306
1307 The following command displays the average SMB Read response PDU size, the
1308 total number of read PDU bytes, the average SMB Write request PDU size, and
1309 the total number of bytes transferred in SMB Write PDUs:
1310
1311   tshark -n -q -r smb_reads_writes.cap -z io,stat,0,
1312   "AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to",
1313   "SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to",
1314   "AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to",
1315   "SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to"
1316
1317   =====================================================================================
1318   IO Statistics
1319   Column #0: AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to
1320   Column #1: SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to
1321   Column #2: AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to
1322   Column #3: SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to
1323                   |    Column #0   |    Column #1   |    Column #2   |    Column #3   |
1324   Time            |       AVG      |       SUM      |       AVG      |       SUM      |
1325   000.000-                    30018         28067522               72             3240
1326   =====================================================================================
1327
1328 B<LOAD(I<field>)I<filter>> - The LOAD/Queue-Depth
1329 in each interval is calculated.  The specified field must be a relative time field that represents a response time.  For example smb.time.
1330 For each interval the Queue-Depth for the specified protocol is calculated.
1331
1332 The following command displays the average SMB LOAD.
1333 A value of 1.0 represents one I/O in flight.
1334
1335   tshark -n -q -r smb_reads_writes.cap
1336   -z "io,stat,0.001,LOAD(smb.time)smb.time"
1337
1338   ============================================================================
1339   IO Statistics
1340   Interval:   0.001000 secs
1341   Column #0: LOAD(smb.time)smb.time
1342                           |    Column #0   |
1343   Time                    |       LOAD     |
1344   0000.000000-0000.001000         1.000000
1345   0000.001000-0000.002000         0.741000
1346   0000.002000-0000.003000         0.000000
1347   0000.003000-0000.004000         1.000000
1348
1349
1350
1351 B<FRAMES | BYTES[()I<filter>]> - Displays the total number of frames or bytes.
1352 The filter field is optional but if included it must be prepended with ''()''.
1353
1354 The following command displays five columns: the total number of frames and bytes
1355 (transferred bidirectionally) using a single comma, the same two stats using the FRAMES and BYTES
1356 subcommands, the total number of frames containing at least one SMB Read response, and
1357 the total number of bytes transmitted to the client (unidirectionally) at IP address 10.1.0.64.
1358
1359   tshark -o tcp.desegment_tcp_streams:FALSE -n -q -r smb_reads.cap -z io,stat,0,,FRAMES,BYTES,
1360   "FRAMES()smb.cmd==0x2e and smb.response_to","BYTES()ip.dst==10.1.0.64"
1361
1362   =======================================================================================================================
1363   IO Statistics
1364   Column #0:
1365   Column #1: FRAMES
1366   Column #2: BYTES
1367   Column #3: FRAMES()smb.cmd==0x2e and smb.response_to
1368   Column #4: BYTES()ip.dst==10.1.0.64
1369                   |            Column #0            |    Column #1   |    Column #2   |    Column #3   |    Column #4   |
1370   Time            |     Frames     |      Bytes     |     FRAMES     |     BYTES      |     FRAMES     |     BYTES      |
1371   000.000-                    33576         29721685            33576         29721685              870         29004801
1372   =======================================================================================================================
1373
1374 =item B<-z> mac-lte,stat[I<,filter>]
1375
1376 This option will activate a counter for LTE MAC messages.  You will get
1377 information about the maximum number of UEs/TTI, common messages and
1378 various counters for each UE that appears in the log.
1379
1380 Example: B<-z mac-lte,stat>.
1381
1382 This option can be used multiple times on the command line.
1383
1384 If the optional I<filter> is provided, the stats will only be calculated
1385 for those frames that match that filter.
1386 Example: B<-z "mac-lte,stat,mac-lte.rnti>3000"> will only collect stats for
1387 UEs with an assigned RNTI whose value is more than 3000.
1388
1389 =item B<-z> megaco,rtd[I<,filter>]
1390
1391 Collect requests/response RTD (Response Time Delay) data for MEGACO.
1392 (This is similar to B<-z smb,srt>).  Data collected is the number of calls
1393 for each known MEGACO Type, MinRTD, MaxRTD and AvgRTD.
1394 Additionally you get the number of duplicate requests/responses,
1395 unresponded requests, responses, which don't match with any request.
1396 Example: B<-z megaco,rtd>.
1397
1398 If the optional I<filter> is provided, the stats will only be calculated
1399 on those calls that match that filter.
1400 Example: B<-z "megaco,rtd,ip.addr==1.2.3.4"> will only collect stats for
1401 MEGACO packets exchanged by the host at IP address 1.2.3.4 .
1402
1403 This option can be used multiple times on the command line.
1404
1405 =item B<-z> mgcp,rtd[I<,filter>]
1406
1407 Collect requests/response RTD (Response Time Delay) data for MGCP.
1408 (This is similar to B<-z smb,srt>).  Data collected is the number of calls
1409 for each known MGCP Type, MinRTD, MaxRTD and AvgRTD.
1410 Additionally you get the number of duplicate requests/responses,
1411 unresponded requests, responses, which don't match with any request.
1412 Example: B<-z mgcp,rtd>.
1413
1414 This option can be used multiple times on the command line.
1415
1416 If the optional I<filter> is provided, the stats will only be calculated
1417 on those calls that match that filter.
1418 Example: B<-z "mgcp,rtd,ip.addr==1.2.3.4"> will only collect stats for
1419 MGCP packets exchanged by the host at IP address 1.2.3.4 .
1420
1421 =item B<-z> proto,colinfo,I<filter>,I<field>
1422
1423 Append all I<field> values for the packet to the Info column of the
1424 one-line summary output.
1425 This feature can be used to append arbitrary fields to the Info column
1426 in addition to the normal content of that column.
1427 I<field> is the display-filter name of a field which value should be placed
1428 in the Info column.
1429 I<filter> is a filter string that controls for which packets the field value
1430 will be presented in the info column.  I<field> will only be presented in the
1431 Info column for the packets which match I<filter>.
1432
1433 NOTE: In order for B<TShark> to be able to extract the I<field> value
1434 from the packet, I<field> MUST be part of the I<filter> string.  If not,
1435 B<TShark> will not be able to extract its value.
1436
1437 For a simple example to add the "nfs.fh.hash" field to the Info column
1438 for all packets containing the "nfs.fh.hash" field, use
1439
1440 B<-z proto,colinfo,nfs.fh.hash,nfs.fh.hash>
1441
1442 To put "nfs.fh.hash" in the Info column but only for packets coming from
1443 host 1.2.3.4 use:
1444
1445 B<-z "proto,colinfo,nfs.fh.hash && ip.src==1.2.3.4,nfs.fh.hash">
1446
1447 This option can be used multiple times on the command line.
1448
1449 =item B<-z> rlc-lte,stat[I<,filter>]
1450
1451 This option will activate a counter for LTE RLC messages.  You will get
1452 information about common messages and various counters for each UE that appears
1453 in the log.
1454
1455 Example: B<-z rlc-lte,stat>.
1456
1457 This option can be used multiple times on the command line.
1458
1459 If the optional I<filter> is provided, the stats will only be calculated
1460 for those frames that match that filter.
1461 Example: B<-z "rlc-lte,stat,rlc-lte.ueid>3000"> will only collect stats for
1462 UEs with a UEId of more than 3000.
1463
1464 =item B<-z> rpc,programs
1465
1466 Collect call/reply SRT data for all known ONC-RPC programs/versions.
1467 Data collected is number of calls for each protocol/version, MinSRT,
1468 MaxSRT and AvgSRT.
1469 This option can only be used once on the command line.
1470
1471 =item B<-z> rpc,srt,I<program>,I<version>[,I<filter>]
1472
1473 Collect call/reply SRT (Service Response Time) data for I<program>/I<version>.
1474 Data collected is the number of calls for each procedure, MinSRT, MaxSRT,
1475 AvgSRT, and the total time taken for each procedure.
1476
1477
1478 Example: B<-z rpc,srt,100003,3> will collect data for NFS v3.
1479
1480 This option can be used multiple times on the command line.
1481
1482 If the optional I<filter> is provided, the stats will only be calculated
1483 on those calls that match that filter.
1484
1485 Example: B<-z rpc,srt,100003,3,nfs.fh.hash==0x12345678> will collect NFS v3
1486 SRT statistics for a specific file.
1487
1488 =item B<-z> rtp,streams
1489
1490 Collect statistics for all RTP streams and calculate max. delta, max. and
1491 mean jitter and packet loss percentages.
1492
1493 =item B<-z> scsi,srt,I<cmdset>[,I<filter>]
1494
1495 Collect call/reply SRT (Service Response Time) data for SCSI commandset I<cmdset>.
1496
1497 Commandsets are 0:SBC   1:SSC  5:MMC
1498
1499 Data collected
1500 is the number of calls for each procedure, MinSRT, MaxSRT and AvgSRT.
1501
1502 Example: B<-z scsi,srt,0> will collect data for SCSI BLOCK COMMANDS (SBC).
1503
1504 This option can be used multiple times on the command line.
1505
1506 If the optional I<filter> is provided, the stats will only be calculated
1507 on those calls that match that filter.
1508
1509 Example: B<-z scsi,srt,0,ip.addr==1.2.3.4> will collect SCSI SBC
1510 SRT statistics for a specific iscsi/ifcp/fcip host.
1511
1512 =item B<-z> sip,stat[I<,filter>]
1513
1514 This option will activate a counter for SIP messages.  You will get the number
1515 of occurrences of each SIP Method and of each SIP Status-Code.  Additionally
1516 you also get the number of resent SIP Messages (only for SIP over UDP).
1517
1518 Example: B<-z sip,stat>.
1519
1520 This option can be used multiple times on the command line.
1521
1522 If the optional I<filter> is provided, the stats will only be calculated
1523 on those calls that match that filter.
1524 Example: B<-z "sip,stat,ip.addr==1.2.3.4"> will only collect stats for
1525 SIP packets exchanged by the host at IP address 1.2.3.4 .
1526
1527 =item B<-z> smb,sids
1528
1529 When this feature is used B<TShark> will print a report with all the
1530 discovered SID and account name mappings.  Only those SIDs where the
1531 account name is known will be presented in the table.
1532
1533 For this feature to work you will need to either to enable
1534 "Edit/Preferences/Protocols/SMB/Snoop SID to name mappings" in the
1535 preferences or you can override the preferences by specifying
1536 S<B<-o "smb.sid_name_snooping:TRUE">> on the B<TShark> command line.
1537
1538 The current method used by B<TShark> to find the SID->name mapping
1539 is relatively restricted with a hope of future expansion.
1540
1541 =item B<-z> smb,srt[,I<filter>]
1542
1543 Collect call/reply SRT (Service Response Time) data for SMB.  Data collected
1544 is number of calls for each SMB command, MinSRT, MaxSRT and AvgSRT.
1545
1546 Example: B<-z smb,srt>
1547
1548 The data will be presented as separate tables for all normal SMB commands,
1549 all Transaction2 commands and all NT Transaction commands.
1550 Only those commands that are seen in the capture will have its stats
1551 displayed.
1552 Only the first command in a xAndX command chain will be used in the
1553 calculation.  So for common SessionSetupAndX + TreeConnectAndX chains,
1554 only the SessionSetupAndX call will be used in the statistics.
1555 This is a flaw that might be fixed in the future.
1556
1557 This option can be used multiple times on the command line.
1558
1559 If the optional I<filter> is provided, the stats will only be calculated
1560 on those calls that match that filter.
1561
1562 Example: B<-z "smb,srt,ip.addr==1.2.3.4"> will only collect stats for
1563 SMB packets exchanged by the host at IP address 1.2.3.4 .
1564
1565 =item --capture-comment E<lt>commentE<gt>
1566
1567 Add a capture comment to the output file.
1568
1569 This option is only available if a new output file in pcapng format is
1570 created. Only one capture comment may be set per output file.
1571
1572 =item --disable-protocol E<lt>proto_nameE<gt>
1573
1574 Disable dissection of proto_name.
1575
1576 =item --enable-heuristic E<lt>short_nameE<gt>
1577
1578 Enable dissection of heuristic protocol.
1579
1580 =item --disable-heuristic E<lt>short_nameE<gt>
1581
1582 Disable dissection of heuristic protocol.
1583
1584 =back
1585
1586 =back
1587
1588 =head1 CAPTURE FILTER SYNTAX
1589
1590 See the manual page of pcap-filter(7) or, if that doesn't exist, tcpdump(8),
1591 or, if that doesn't exist, L<https://wiki.wireshark.org/CaptureFilters>.
1592
1593 =head1 READ FILTER SYNTAX
1594
1595 For a complete table of protocol and protocol fields that are filterable
1596 in B<TShark> see the wireshark-filter(4) manual page.
1597
1598 =head1 FILES
1599
1600 These files contains various B<Wireshark> configuration values.
1601
1602 =over 4
1603
1604 =item Preferences
1605
1606 The F<preferences> files contain global (system-wide) and personal
1607 preference settings.  If the system-wide preference file exists, it is
1608 read first, overriding the default settings.  If the personal preferences
1609 file exists, it is read next, overriding any previous values.  Note: If
1610 the command line option B<-o> is used (possibly more than once), it will
1611 in turn override values from the preferences files.
1612
1613 The preferences settings are in the form I<prefname>B<:>I<value>,
1614 one per line,
1615 where I<prefname> is the name of the preference
1616 and I<value> is the value to
1617 which it should be set; white space is allowed between B<:> and
1618 I<value>.  A preference setting can be continued on subsequent lines by
1619 indenting the continuation lines with white space.  A B<#> character
1620 starts a comment that runs to the end of the line:
1621
1622   # Capture in promiscuous mode?
1623   # TRUE or FALSE (case-insensitive).
1624   capture.prom_mode: TRUE
1625
1626 The global preferences file is looked for in the F<wireshark> directory
1627 under the F<share> subdirectory of the main installation directory (for
1628 example, F</usr/local/share/wireshark/preferences>) on UNIX-compatible
1629 systems, and in the main installation directory (for example,
1630 F<C:\Program Files\Wireshark\preferences>) on Windows systems.
1631
1632 The personal preferences file is looked for in
1633 F<$HOME/.wireshark/preferences> on
1634 UNIX-compatible systems and F<%APPDATA%\Wireshark\preferences> (or, if
1635 %APPDATA% isn't defined, F<%USERPROFILE%\Application
1636 Data\Wireshark\preferences>) on Windows systems.
1637
1638 =item Disabled (Enabled) Protocols
1639
1640 The F<disabled_protos> files contain system-wide and personal lists of
1641 protocols that have been disabled, so that their dissectors are never
1642 called.  The files contain protocol names, one per line, where the
1643 protocol name is the same name that would be used in a display filter
1644 for the protocol:
1645
1646   http
1647   tcp     # a comment
1648
1649 The global F<disabled_protos> file uses the same directory as the global
1650 preferences file.
1651
1652 The personal F<disabled_protos> file uses the same directory as the
1653 personal preferences file.
1654
1655 =item Name Resolution (hosts)
1656
1657 If the personal F<hosts> file exists, it is
1658 used to resolve IPv4 and IPv6 addresses before any other
1659 attempts are made to resolve them.  The file has the standard F<hosts>
1660 file syntax; each line contains one IP address and name, separated by
1661 whitespace.  The same directory as for the personal preferences file is
1662 used.
1663
1664 Capture filter name resolution is handled by libpcap on UNIX-compatible
1665 systems and WinPcap on Windows.  As such the Wireshark personal F<hosts> file
1666 will not be consulted for capture filter name resolution.
1667
1668 =item Name Resolution (subnets)
1669
1670 If an IPv4 address cannot be translated via name resolution (no exact
1671 match is found) then a partial match is attempted via the F<subnets> file.
1672
1673 Each line of this file consists of an IPv4 address, a subnet mask length
1674 separated only by a / and a name separated by whitespace. While the address
1675 must be a full IPv4 address, any values beyond the mask length are subsequently
1676 ignored.
1677
1678 An example is:
1679
1680 # Comments must be prepended by the # sign!
1681 192.168.0.0/24 ws_test_network
1682
1683 A partially matched name will be printed as "subnet-name.remaining-address".
1684 For example, "192.168.0.1" under the subnet above would be printed as
1685 "ws_test_network.1"; if the mask length above had been 16 rather than 24, the
1686 printed address would be ``ws_test_network.0.1".
1687
1688 =item Name Resolution (ethers)
1689
1690 The F<ethers> files are consulted to correlate 6-byte hardware addresses to
1691 names.  First the personal F<ethers> file is tried and if an address is not
1692 found there the global F<ethers> file is tried next.
1693
1694 Each line contains one hardware address and name, separated by
1695 whitespace.  The digits of the hardware address are separated by colons
1696 (:), dashes (-) or periods (.).  The same separator character must be
1697 used consistently in an address.  The following three lines are valid
1698 lines of an F<ethers> file:
1699
1700   ff:ff:ff:ff:ff:ff          Broadcast
1701   c0-00-ff-ff-ff-ff          TR_broadcast
1702   00.00.00.00.00.00          Zero_broadcast
1703
1704 The global F<ethers> file is looked for in the F</etc> directory on
1705 UNIX-compatible systems, and in the main installation directory (for
1706 example, F<C:\Program Files\Wireshark>) on Windows systems.
1707
1708 The personal F<ethers> file is looked for in the same directory as the personal
1709 preferences file.
1710
1711 Capture filter name resolution is handled by libpcap on UNIX-compatible
1712 systems and WinPcap on Windows.  As such the Wireshark personal F<ethers> file
1713 will not be consulted for capture filter name resolution.
1714
1715 =item Name Resolution (manuf)
1716
1717 The F<manuf> file is used to match the 3-byte vendor portion of a 6-byte
1718 hardware address with the manufacturer's name; it can also contain well-known
1719 MAC addresses and address ranges specified with a netmask.  The format of the
1720 file is the same as the F<ethers> files, except that entries of the form:
1721
1722   00:00:0C      Cisco
1723
1724 can be provided, with the 3-byte OUI and the name for a vendor, and
1725 entries such as:
1726
1727   00-00-0C-07-AC/40     All-HSRP-routers
1728
1729 can be specified, with a MAC address and a mask indicating how many bits
1730 of the address must match.  The above entry, for example, has 40
1731 significant bits, or 5 bytes, and would match addresses from
1732 00-00-0C-07-AC-00 through 00-00-0C-07-AC-FF.  The mask need not be a
1733 multiple of 8.
1734
1735 The F<manuf> file is looked for in the same directory as the global
1736 preferences file.
1737
1738 =item Name Resolution (services)
1739
1740 The F<services> file is used to translate port numbers into names.
1741
1742 The file has the standard F<services> file syntax; each line contains one
1743 (service) name and one transport identifier separated by white space.  The
1744 transport identifier includes one port number and one transport protocol name
1745 (typically tcp, udp, or sctp) separated by a /.
1746
1747 An example is:
1748
1749 mydns       5045/udp     # My own Domain Name Server
1750 mydns       5045/tcp     # My own Domain Name Server
1751
1752 =item Name Resolution (ipxnets)
1753
1754 The F<ipxnets> files are used to correlate 4-byte IPX network numbers to
1755 names.  First the global F<ipxnets> file is tried and if that address is not
1756 found there the personal one is tried next.
1757
1758 The format is the same as the F<ethers>
1759 file, except that each address is four bytes instead of six.
1760 Additionally, the address can be represented as a single hexadecimal
1761 number, as is more common in the IPX world, rather than four hex octets.
1762 For example, these four lines are valid lines of an F<ipxnets> file:
1763
1764   C0.A8.2C.00              HR
1765   c0-a8-1c-00              CEO
1766   00:00:BE:EF              IT_Server1
1767   110f                     FileServer3
1768
1769 The global F<ipxnets> file is looked for in the F</etc> directory on
1770 UNIX-compatible systems, and in the main installation directory (for
1771 example, F<C:\Program Files\Wireshark>) on Windows systems.
1772
1773 The personal F<ipxnets> file is looked for in the same directory as the
1774 personal preferences file.
1775
1776 =back
1777
1778 =head1 OUTPUT
1779
1780 B<TShark> uses UTF-8 to represent strings internally. In some cases the
1781 output might not be valid. For example, a dissector might generate
1782 invalid UTF-8 character sequences. Programs reading B<TShark> output
1783 should expect UTF-8 and be prepared for invalid output.
1784
1785 If B<TShark> detects that it is writing to a TTY on UNIX or Linux and
1786 the locale does not support UTF-8, output will be re-encoded to match the
1787 current locale.
1788
1789 If B<TShark> detects that it is writing to a TTY on Windows, output will be
1790 encoded as UTF-16LE.
1791
1792 =head1 ENVIRONMENT VARIABLES
1793
1794 =over 4
1795
1796 =item WIRESHARK_APPDATA
1797
1798 On Windows, Wireshark normally stores all application data in %APPDATA% or
1799 %USERPROFILE%.  You can override the default location by exporting this
1800 environment variable to specify an alternate location.
1801
1802 =item WIRESHARK_DEBUG_WMEM_OVERRIDE
1803
1804 Setting this environment variable forces the wmem framework to use the
1805 specified allocator backend for *all* allocations, regardless of which
1806 backend is normally specified by the code. This is mainly useful to developers
1807 when testing or debugging. See I<README.wmem> in the source distribution for
1808 details.
1809
1810 =item WIRESHARK_RUN_FROM_BUILD_DIRECTORY
1811
1812 This environment variable causes the plugins and other data files to be loaded
1813 from the build directory (where the program was compiled) rather than from the
1814 standard locations.  It has no effect when the program in question is running
1815 with root (or setuid) permissions on *NIX.
1816
1817 =item WIRESHARK_DATA_DIR
1818
1819 This environment variable causes the various data files to be loaded from
1820 a directory other than the standard locations.  It has no effect when the
1821 program in question is running with root (or setuid) permissions on *NIX.
1822
1823 =item ERF_RECORDS_TO_CHECK
1824
1825 This environment variable controls the number of ERF records checked when
1826 deciding if a file really is in the ERF format.  Setting this environment
1827 variable a number higher than the default (20) would make false positives
1828 less likely.
1829
1830 =item IPFIX_RECORDS_TO_CHECK
1831
1832 This environment variable controls the number of IPFIX records checked when
1833 deciding if a file really is in the IPFIX format.  Setting this environment
1834 variable a number higher than the default (20) would make false positives
1835 less likely.
1836
1837 =item WIRESHARK_ABORT_ON_DISSECTOR_BUG
1838
1839 If this environment variable is set, B<TShark> will call abort(3)
1840 when a dissector bug is encountered.  abort(3) will cause the program to
1841 exit abnormally; if you are running B<TShark> in a debugger, it
1842 should halt in the debugger and allow inspection of the process, and, if
1843 you are not running it in a debugger, it will, on some OSes, assuming
1844 your environment is configured correctly, generate a core dump file.
1845 This can be useful to developers attempting to troubleshoot a problem
1846 with a protocol dissector.
1847
1848 =item WIRESHARK_ABORT_ON_TOO_MANY_ITEMS
1849
1850 If this environment variable is set, B<TShark> will call abort(3)
1851 if a dissector tries to add too many items to a tree (generally this
1852 is an indication of the dissector not breaking out of a loop soon enough).
1853 abort(3) will cause the program to exit abnormally; if you are running
1854 B<TShark> in a debugger, it should halt in the debugger and allow
1855 inspection of the process, and, if you are not running it in a debugger,
1856 it will, on some OSes, assuming your environment is configured correctly,
1857 generate a core dump file.  This can be useful to developers attempting to
1858 troubleshoot a problem with a protocol dissector.
1859
1860 =back
1861
1862 =head1 SEE ALSO
1863
1864 wireshark-filter(4), wireshark(1), editcap(1), pcap(3), dumpcap(1),
1865 text2pcap(1), mergecap(1), pcap-filter(7) or tcpdump(8)
1866
1867 =head1 NOTES
1868
1869 B<TShark> is part of the B<Wireshark> distribution.  The latest version
1870 of B<Wireshark> can be found at L<https://www.wireshark.org>.
1871
1872 HTML versions of the Wireshark project man pages are available at:
1873 L<https://www.wireshark.org/docs/man-pages>.
1874
1875 =head1 AUTHORS
1876
1877 B<TShark> uses the same packet dissection code that B<Wireshark> does,
1878 as well as using many other modules from B<Wireshark>; see the list of
1879 authors in the B<Wireshark> man page for a list of authors of that code.