8813cc43ca532590206bfd5618f61487ebd4b75f
[obnox/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<-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> ]>
15 S<[ B<-D> ]>
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> ]>
20 S<[ B<-h> ]>
21 S<[ B<-H> E<lt>input hosts fileE<gt> ]>
22 S<[ B<-i> E<lt>capture interfaceE<gt>|- ]>
23 S<[ B<-I> ]>
24 S<[ B<-K> E<lt>keytabE<gt> ]>
25 S<[ B<-l> ]>
26 S<[ B<-L> ]>
27 S<[ B<-n> ]>
28 S<[ B<-N> E<lt>name resolving flagsE<gt> ]>
29 S<[ B<-o> E<lt>preference settingE<gt> ] ...>
30 S<[ B<-p> ]>
31 S<[ B<-q> ]>
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> ]>
35 S<[ B<-S> ]>
36 S<[ B<-t> ad|a|r|d|dd|e ]>
37 S<[ B<-T> pdml|psml|ps|text|fields ]>
38 S<[ B<-v> ]>
39 S<[ B<-V> ]>
40 S<[ B<-w> E<lt>outfileE<gt>|- ]>
41 S<[ B<-W> E<lt>file format optionE<gt>]>
42 S<[ B<-x> ]>
43 S<[ B<-X> E<lt>eXtension optionE<gt>]>
44 S<[ B<-y> E<lt>capture link typeE<gt> ]>
45 S<[ B<-z> E<lt>statisticsE<gt> ]>
46 S<[ E<lt>capture filterE<gt> ]>
47
48 B<tshark>
49 B<-G> [fields|fields2|fields3|protocols|values|decodes|defaultprefs|currentprefs]
50
51 =head1 DESCRIPTION
52
53 B<TShark> is a network protocol analyzer.  It lets you capture packet
54 data from a live network, or read packets from a previously saved
55 capture file, either printing a decoded form of those packets to the
56 standard output or writing the packets to a file.  B<TShark>'s native
57 capture file format is B<libpcap> format, which is also the format used
58 by B<tcpdump> and various other tools.
59
60 Without any options set, B<TShark> will work much like B<tcpdump>. It will
61 use the pcap library to capture traffic from the first available network
62 interface and displays a summary line on stdout for each received packet.
63
64 B<TShark> is able to detect, read and write the same capture files that
65 are supported by B<Wireshark>.
66 The input file doesn't need a specific filename extension; the file
67 format and an optional gzip compression will be automatically detected.
68 Near the beginning of the DESCRIPTION section of wireshark(1) or
69 L<http://www.wireshark.org/docs/man-pages/wireshark.html>
70 is a detailed description of the way B<Wireshark> handles this, which is
71 the same way B<Tshark> handles this.
72
73 Compressed file support uses (and therefore requires) the zlib library.
74 If the zlib library is not present, B<TShark> will compile, but will
75 be unable to read compressed files.
76
77 If the B<-w> option is not specified, B<TShark> writes to the standard
78 output the text of a decoded form of the packets it captures or reads.
79 If the B<-w> option is specified, B<TShark> writes to the file
80 specified by that option the raw data of the packets, along with the
81 packets' time stamps.
82
83 When writing a decoded form of packets, B<TShark> writes, by
84 default, a summary line containing the fields specified by the
85 preferences file (which are also the fields displayed in the packet list
86 pane in B<Wireshark>), although if it's writing packets as it captures
87 them, rather than writing packets from a saved capture file, it won't
88 show the "frame number" field.  If the B<-V> option is specified, it
89 writes instead a view of the details of the packet, showing all the
90 fields of all protocols in the packet.
91
92 If you want to write the decoded form of packets to a file, run
93 B<TShark> without the B<-w> option, and redirect its standard output to
94 the file (do I<not> use the B<-w> option).
95
96 When writing packets to a file, B<TShark>, by default, writes the
97 file in B<libpcap> format, and writes all of the packets it sees to the
98 output file.  The B<-F> option can be used to specify the format in which
99 to write the file. This list of available file formats is displayed by
100 the B<-F> flag without a value. However, you can't specify a file format
101 for a live capture.
102
103 Read filters in B<TShark>, which allow you to select which packets
104 are to be decoded or written to a file, are very powerful; more fields
105 are filterable in B<TShark> than in other protocol analyzers, and the
106 syntax you can use to create your filters is richer.  As B<TShark>
107 progresses, expect more and more protocol fields to be allowed in read
108 filters.
109
110 Packet capturing is performed with the pcap library.  The capture filter
111 syntax follows the rules of the pcap library.  This syntax is different
112 from the read filter syntax.  A read filter can also be specified when
113 capturing, and only packets that pass the read filter will be displayed
114 or saved to the output file; note, however, that capture filters are much
115 more efficient than read filters, and it may be more difficult for
116 B<TShark> to keep up with a busy network if a read filter is
117 specified for a live capture.
118
119 A capture or read filter can either be specified with the B<-f> or B<-R>
120 option, respectively, in which case the entire filter expression must be
121 specified as a single argument (which means that if it contains spaces,
122 it must be quoted), or can be specified with command-line arguments
123 after the option arguments, in which case all the arguments after the
124 filter arguments are treated as a filter expression.  Capture filters
125 are supported only when doing a live capture; read filters are supported
126 when doing a live capture and when reading a capture file, but require
127 TShark to do more work when filtering, so you might be more likely to
128 lose packets under heavy load if you're using a read filter.  If the
129 filter is specified with command-line arguments after the option
130 arguments, it's a capture filter if a capture is being done (i.e., if no
131 B<-r> option was specified) and a read filter if a capture file is being
132 read (i.e., if a B<-r> option was specified).
133
134 The B<-G> option is a special mode that simply causes B<Tshark>
135 to dump one of several types of internal glossaries and then exit.
136
137 =head1 OPTIONS
138
139 =over 4
140
141 =item -a  E<lt>capture autostop conditionE<gt>
142
143 Specify a criterion that specifies when B<TShark> is to stop writing
144 to a capture file.  The criterion is of the form I<test>B<:>I<value>,
145 where I<test> is one of:
146
147 B<duration>:I<value> Stop writing to a capture file after I<value> seconds
148 have elapsed.
149
150 B<filesize>:I<value> Stop writing to a capture file after it reaches a size of
151 I<value> kilobytes (where a kilobyte is 1024 bytes). If this option is used
152 together with the -b option, B<TShark> will stop writing to the current
153 capture file and switch to the next one if filesize is reached. When reading a
154 capture file, B<TShark> will stop reading the file after the number of bytes
155 read exceeds this number (the complete packet will be read, so more bytes than
156 this number may be read).
157
158 B<files>:I<value> Stop writing to capture files after I<value> number of files
159 were written.
160
161 =item -b  E<lt>capture ring buffer optionE<gt>
162
163 Cause B<TShark> to run in "multiple files" mode.  In "multiple files" mode,
164 B<TShark> will write to several capture files. When the first capture file
165 fills up, B<TShark> will switch writing to the next file and so on.
166
167 The created filenames are based on the filename given with the B<-w> option,
168 the number of the file and on the creation date and time,
169 e.g. outfile_00001_20050604120117.pcap, outfile_00002_20050604120523.pcap, ...
170
171 With the I<files> option it's also possible to form a "ring buffer".
172 This will fill up new files until the number of files specified,
173 at which point B<TShark> will discard the data in the first file and start
174 writing to that file and so on. If the I<files> option is not set,
175 new files filled up until one of the capture stop conditions match (or
176 until the disk is full).
177
178 The criterion is of the form I<key>B<:>I<value>,
179 where I<key> is one of:
180
181 B<duration>:I<value> switch to the next file after I<value> seconds have
182 elapsed, even if the current file is not completely filled up.
183
184 B<filesize>:I<value> switch to the next file after it reaches a size of
185 I<value> kilobytes (where a kilobyte is 1024 bytes).
186
187 B<files>:I<value> begin again with the first file after I<value> number of
188 files were written (form a ring buffer).  This value must be less than 100000.
189 Caution should be used when using large numbers of files: some filesystems do
190 not handle many files in a single directory well.  The B<files> criterion
191 requires either B<duration> or B<filesize> to be specified to control when to
192 go to the next file.  It should be noted that each B<-b> parameter takes exactly
193 one criterion; to specify two criterion, each must be preceded by the B<-b>
194 option.
195
196 Example: B<-b filesize:1024 -b files:5> results in a ring buffer of five files
197 of size one megabyte.
198
199 =item -B  E<lt>capture buffer sizeE<gt>
200
201 Set capture buffer size (in MB, default is 1MB).  This is used by the
202 the capture driver to buffer packet data until that data can be written
203 to disk.  If you encounter packet drops while capturing, try to increase
204 this size.  Note that, while B<Tshark> attempts to set the buffer size
205 to 1MB by default, and can be told to set it to a larger value, the
206 system or interface on which you're capturing might silently limit the
207 capture buffer size to a lower value or raise it to a higher value.
208
209 This is available on UNIX systems with libpcap 1.0.0 or later and on
210 Windows.  It is not available on UNIX systems with earlier versions of
211 libpcap.
212
213 =item -c  E<lt>capture packet countE<gt>
214
215 Set the maximum number of packets to read when capturing live
216 data. If reading a capture file, set the maximum number of packets to read.
217
218 =item -C  E<lt>configuration profileE<gt>
219
220 Run with the given configuration profile.
221
222 =item -d  E<lt>layer typeE<gt>==E<lt>selectorE<gt>,E<lt>decode-as protocolE<gt>
223
224 Like Wireshark's B<Decode As...> feature, this lets you specify how a
225 layer type should be dissected. If the layer type in question (for example,
226 B<tcp.port> or B<udp.port> for a TCP or UDP port number) has the specified
227 selector value, packets should be dissected as the specified protocol.
228
229 Example: B<-d tcp.port==8888,http> will decode any traffic running over
230 TCP port 8888 as HTTP.
231
232 Using an invalid selector or protocol will print out a list of valid selectors
233 and protocol names, respectively.
234
235 Example: B<-d .> is a quick way to get a list of valid selectors.
236
237 Example: B<-d ethertype==0x0800.> is a quick way to get a list of protocols that can be
238 selected with an ethertype.
239
240 =item -D
241
242 Print a list of the interfaces on which B<TShark> can capture, and
243 exit.  For each network interface, a number and an
244 interface name, possibly followed by a text description of the
245 interface, is printed.  The interface name or the number can be supplied
246 to the B<-i> option to specify an interface on which to capture.
247
248 This can be useful on systems that don't have a command to list them
249 (e.g., Windows systems, or UNIX systems lacking B<ifconfig -a>);
250 the number can be useful on Windows 2000 and later systems, where the
251 interface name is a somewhat complex string.
252
253 Note that "can capture" means that B<TShark> was able to open that
254 device to do a live capture.  Depending on your system you may need to
255 run tshark from an account with special privileges (for example, as
256 root) to be able to capture network traffic.  If B<TShark -D> is not run
257 from such an account, it will not list any interfaces.
258
259 =item -e  E<lt>fieldE<gt>
260
261 Add a field to the list of fields to display if B<-T fields> is
262 selected.  This option can be used multiple times on the command line.
263 At least one field must be provided if the B<-T fields> option is
264 selected.
265
266 Example: B<-e frame.number -e ip.addr -e udp>
267
268 Giving a protocol rather than a single field will print multiple items
269 of data about the protocol as a single field.  Fields are separated by
270 tab characters by default.  B<-E> controls the format of the printed
271 fields.
272
273 =item -E  E<lt>field print optionE<gt>
274
275 Set an option controlling the printing of fields when B<-T fields> is
276 selected.
277
278 Options are:
279
280 B<header=y|n> If B<y>, print a list of the field names given using B<-e>
281 as the first line of the output; the field name will be separated using
282 the same character as the field values.  Defaults to B<n>.
283
284 B<separator=/t|/s|>E<lt>characterE<gt> Set the separator character to
285 use for fields.  If B</t> tab will be used (this is the default), if
286 B</s>, a single space will be used.  Otherwise any character that can be
287 accepted by the command line as part of the option may be used.
288
289 B<occurrence=f|l|a> Select which occurrence to use for fields that have
290 multiple occurrences.  If B<f> the first occurrence will be used, if B<l>
291 the last occurrence will be used and if B<a> all occurrences will be used
292 (this is the default).
293
294 B<aggregator=,|/s|>E<lt>characterE<gt> Set the aggregator character to
295 use for fields that have multiple occurrences.  If B<,> a comma will be used
296 (this is the default), if B</s>, a single space will be used.  Otherwise
297 any character that can be accepted by the command line as part of the
298 option may be used.
299
300 B<quote=d|s|n> Set the quote character to use to surround fields.  B<d>
301 uses double-quotes, B<s> single-quotes, B<n> no quotes (the default).
302
303 =item -f  E<lt>capture filterE<gt>
304
305 Set the capture filter expression.
306
307 =item -F  E<lt>file formatE<gt>
308
309 Set the file format of the output capture file written using the B<-w>
310 option.  The output written with the B<-w> option is raw packet data, not
311 text, so there is no B<-F> option to request text output.  The option B<-F>
312 without a value will list the available formats.
313
314 =item -G  [fields|fields2|fields3|protocols|values|decodes|defaultprefs|currentprefs]
315
316 The B<-G> option will cause B<Tshark> to dump one of several types of glossaries
317 and then exit.  If no specific glossary type is specified, then the B<fields> report will be generated by default.
318
319 The available report types include:
320
321 B<fields>  Dumps the contents of the registration database to
322 stdout. An independent program can take this output and format it into nice
323 tables or HTML or whatever.  There is one record per line. Each record is
324 either a protocol or a header field, differentiated by the first field.
325 The fields are tab-delimited.
326
327  * Protocols
328  * ---------
329  * Field 1 = 'P'
330  * Field 2 = descriptive protocol name
331  * Field 3 = protocol abbreviation
332  *
333  * Header Fields
334  * -------------
335  * Field 1 = 'F'
336  * Field 2 = descriptive field name
337  * Field 3 = field abbreviation
338  * Field 4 = type ( textual representation of the ftenum type )
339  * Field 5 = parent protocol abbreviation
340  * Field 6 = blurb describing field
341
342 B<fields2>  Same as the B<fields> report but includes two additional columns.
343
344  * Field 7 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
345  * Field 8 = blurb describing field (yes, apparently we repeated this accidentally)
346
347 B<fields3>  Same as the B<fields> report but includes two additional columns.
348
349  * Field 7 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
350  * Field 8 = bitmask: format: hex: 0x....
351
352 B<protocols> Dumps the protocols in the registration database to stdout.
353 An independent program can take this output and format it into nice tables
354 or HTML or whatever. There is one record per line. The fields are tab-delimited.
355
356  * Field 1 = protocol name
357  * Field 2 = protocol short name
358  * Field 3 = protocol filter name
359
360 B<values> Dumps the value_strings, range_strings or true/false strings
361 for fields that have them. There is one record per line. Fields are
362 tab-delimited.  There are three types of records: Value String, Range
363 String and True/False String. The first field, 'V', 'R' or 'T', indicates
364 the type of record.
365
366  * Value Strings
367  * -------------
368  * Field 1 = 'V'
369  * Field 2 = field abbreviation to which this value string corresponds
370  * Field 3 = Integer value
371  * Field 4 = String
372  *
373  * Range Strings
374  * -------------
375  * Field 1 = 'R'
376  * Field 2 = field abbreviation to which this range string corresponds
377  * Field 3 = Integer value: lower bound
378  * Field 4 = Integer value: upper bound
379  * Field 5 = String
380  *
381  * True/False Strings
382  * ------------------
383  * Field 1 = 'T'
384  * Field 2 = field abbreviation to which this true/false string corresponds
385  * Field 3 = True String
386  * Field 4 = False String
387
388 B<decodes> Dumps the "layer type"/"decode as" associations to stdout.
389 There is one record per line. The fields are tab-delimited.
390
391  * Field 1 = layer type, e.g. "tcp.port"
392  * Field 2 = selector in decimal
393  * Field 3 = "decode as" name, e.g. "http"
394
395 B<defaultprefs>  Dumps a default preferences file to stdout.
396
397 B<currentprefs>  Dumps a copy of the current preferences file to stdout.
398
399 =item -h
400
401 Print the version and options and exits.
402
403 =item -H  E<lt>input hosts fileE<gt>
404
405 Read a list of entries from a "hosts" file, which will then be written
406 to a capture file. Implies B<-W n>.
407
408 The "hosts" file format is documented at
409 L<http://en.wikipedia.org/wiki/Hosts_(file)>.
410
411 =item -i  E<lt>capture interfaceE<gt> | -
412
413 Set the name of the network interface or pipe to use for live packet
414 capture.
415
416 Network interface names should match one of the names listed in
417 "B<tshark -D>" (described above); a number, as reported by
418 "B<tshark -D>", can also be used.  If you're using UNIX, "B<netstat
419 -i>" or "B<ifconfig -a>" might also work to list interface names,
420 although not all versions of UNIX support the B<-a> option to B<ifconfig>.
421
422 If no interface is specified, B<TShark> searches the list of
423 interfaces, choosing the first non-loopback interface if there are any
424 non-loopback interfaces, and choosing the first loopback interface if
425 there are no non-loopback interfaces. If there are no interfaces at all,
426 B<TShark> reports an error and doesn't start the capture.
427
428 Pipe names should be either the name of a FIFO (named pipe) or ``-'' to
429 read data from the standard input.  Data read from pipes must be in
430 standard libpcap format.
431
432 Note: the Win32 version of B<TShark> doesn't support capturing from
433 pipes!
434
435 =item -I
436
437 Put the interface in "monitor mode"; this is supported only on IEEE
438 802.11 Wi-Fi interfaces, and supported only on some operating systems.
439
440 Note that in monitor mode the adapter might disassociate from the
441 network with which it's associated, so that you will not be able to use
442 any wireless networks with that adapter.  This could prevent accessing
443 files on a network server, or resolving host names or network addresses,
444 if you are capturing in monitor mode and are not connected to another
445 network with another adapter.
446
447 =item -K  E<lt>keytabE<gt>
448
449 Load kerberos crypto keys from the specified keytab file.
450 This option can be used multiple times to load keys from several files.
451
452 Example: B<-K krb5.keytab>
453
454 =item -l
455
456 Flush the standard output after the information for each packet is
457 printed.  (This is not, strictly speaking, line-buffered if B<-V>
458 was specified; however, it is the same as line-buffered if B<-V> wasn't
459 specified, as only one line is printed for each packet, and, as B<-l> is
460 normally used when piping a live capture to a program or script, so that
461 output for a packet shows up as soon as the packet is seen and
462 dissected, it should work just as well as true line-buffering.  We do
463 this as a workaround for a deficiency in the Microsoft Visual C++ C
464 library.)
465
466 This may be useful when piping the output of B<TShark> to another
467 program, as it means that the program to which the output is piped will
468 see the dissected data for a packet as soon as B<TShark> sees the
469 packet and generates that output, rather than seeing it only when the
470 standard output buffer containing that data fills up.
471
472 =item -L
473
474 List the data link types supported by the interface and exit. The reported
475 link types can be used for the B<-y> option.
476
477 =item -n
478
479 Disable network object name resolution (such as hostname, TCP and UDP port
480 names); the B<-N> flag might override this one.
481
482 =item -N  E<lt>name resolving flagsE<gt>
483
484 Turn on name resolving only for particular types of addresses and port
485 numbers, with name resolving for other types of addresses and port
486 numbers turned off. This flag overrides B<-n> if both B<-N> and B<-n> are
487 present. If both B<-N> and B<-n> flags are not present, all name resolutions are
488 turned on.
489
490 The argument is a string that may contain the letters:
491
492 B<m> to enable MAC address resolution
493
494 B<n> to enable network address resolution
495
496 B<t> to enable transport-layer port number resolution
497
498 B<C> to enable concurrent (asynchronous) DNS lookups
499
500 =item -o  E<lt>preferenceE<gt>:E<lt>valueE<gt>
501
502 Set a preference value, overriding the default value and any value read
503 from a preference file.  The argument to the option is a string of the
504 form I<prefname>B<:>I<value>, where I<prefname> is the name of the
505 preference (which is the same name that would appear in the preference
506 file), and I<value> is the value to which it should be set.
507
508 =item -p
509
510 I<Don't> put the interface into promiscuous mode.  Note that the
511 interface might be in promiscuous mode for some other reason; hence,
512 B<-p> cannot be used to ensure that the only traffic that is captured is
513 traffic sent to or from the machine on which B<TShark> is running,
514 broadcast traffic, and multicast traffic to addresses received by that
515 machine.
516
517 =item -q
518
519 When capturing packets, don't display the continuous count of packets
520 captured that is normally shown when saving a capture to a file;
521 instead, just display, at the end of the capture, a count of packets
522 captured.  On systems that support the SIGINFO signal, such as various
523 BSDs, you can cause the current count to be displayed by typing your
524 "status" character (typically control-T, although it
525 might be set to "disabled" by default on at least some BSDs, so you'd
526 have to explicitly set it to use it).
527
528 When reading a capture file, or when capturing and not saving to a file,
529 don't print packet information; this is useful if you're using a B<-z>
530 option to calculate statistics and don't want the packet information
531 printed, just the statistics.
532
533 =item -r  E<lt>infileE<gt>
534
535 Read packet data from I<infile>, can be any supported capture file format
536 (including gzipped files). It's B<not> possible to use named pipes
537 or stdin here!
538
539 =item -R  E<lt>read (display) filterE<gt>
540
541 Cause the specified filter (which uses the syntax of read/display filters,
542 rather than that of capture filters) to be applied before printing a
543 decoded form of packets or writing packets to a file; packets not
544 matching the filter are discarded rather than being printed or written.
545
546 =item -s  E<lt>capture snaplenE<gt>
547
548 Set the default snapshot length to use when capturing live data.
549 No more than I<snaplen> bytes of each network packet will be read into
550 memory, or saved to disk.  A value of 0 specifies a snapshot length of
551 65535, so that the full packet is captured; this is the default.
552
553 =item -S
554
555 Decode and display packets even while writing raw packet data using the
556 B<-w> option.
557
558 =item -t  ad|a|r|d|dd|e
559
560 Set the format of the packet timestamp printed in summary lines.
561 The format can be one of:
562
563 B<ad> absolute with date: The absolute date and time is the actual time and
564 date the packet was captured
565
566 B<a> absolute: The absolute time is the actual time the packet was captured,
567 with no date displayed
568
569 B<r> relative: The relative time is the time elapsed between the first packet
570 and the current packet
571
572 B<d> delta: The delta time is the time since the previous packet was
573 captured
574
575 B<dd> delta_displayed: The delta_displayed time is the time since the
576 previous displayed packet was captured
577
578 B<e> epoch: The time in seconds since epoch (Jan 1, 1970 00:00:00)
579
580 The default format is relative.
581
582 =item -T  pdml|psml|ps|text|fields
583
584 Set the format of the output when viewing decoded packet data.  The
585 options are one of:
586
587 B<pdml> Packet Details Markup Language, an XML-based format for the details of
588 a decoded packet.  This information is equivalent to the packet details
589 printed with the B<-V> flag.
590
591 B<psml> Packet Summary Markup Language, an XML-based format for the summary
592 information of a decoded packet.  This information is equivalent to the
593 information shown in the one-line summary printed by default.
594
595 B<ps> PostScript for a human-readable one-line summary of each of the packets,
596 or a multi-line view of the details of each of the packets, depending on
597 whether the B<-V> flag was specified.
598
599 B<text> Text of a human-readable one-line summary of each of the packets, or a
600 multi-line view of the details of each of the packets, depending on
601 whether the B<-V> flag was specified.  This is the default.
602
603 B<fields> The values of fields specified with the B<-e> option, in a
604 form specified by the B<-E> option. For example,
605
606   -T fields -E separator=, -E quote=d
607
608 would generate comma-separated values (CSV) output suitable for importing
609 into your favorite spreadsheet program.
610
611
612 =item -v
613
614 Print the version and exit.
615
616 =item -V
617
618 Cause B<TShark> to print a view of the packet details rather
619 than a one-line summary of the packet.
620
621 =item -w  E<lt>outfileE<gt> | -
622
623 Write raw packet data to I<outfile> or to the standard output if
624 I<outfile> is '-'.
625
626 NOTE: -w provides raw packet data, not text. If you want text output
627 you need to redirect stdout (e.g. using '>'), don't use the B<-w>
628 option for this.
629
630 =item -W  E<lt>file format optionE<gt>
631
632 Save extra information in the file if the format supports it. For
633 example,
634
635   -F pcapng -W n
636
637 will save host name resolution records along with captured packets.
638
639 Future versions of Wireshark may automatically change the capture format to
640 B<pcapng> as needed.
641
642 The argument is a string that may contain the following letter:
643
644 B<n> write network address resolution information (pcapng only)
645
646 =item -x
647
648 Cause B<TShark> to print a hex and ASCII dump of the packet data
649 after printing the summary or details.
650
651 =item -X E<lt>eXtension optionsE<gt>
652
653 Specify an option to be passed to a B<TShark> module. The eXtension option
654 is in the form I<extension_key>B<:>I<value>, where I<extension_key> can be:
655
656 B<lua_script>:I<lua_script_filename> tells B<Wireshark> to load the given script in addition to the
657 default Lua scripts.
658
659 =item -y  E<lt>capture link typeE<gt>
660
661 Set the data link type to use while capturing packets.  The values
662 reported by B<-L> are the values that can be used.
663
664 =item -z  E<lt>statisticsE<gt>
665
666 Get B<TShark> to collect various types of statistics and display the result
667 after finishing reading the capture file.  Use the B<-q> flag if you're
668 reading a capture file and only want the statistics printed, not any
669 per-packet information.
670
671 Note that the B<-z proto> option is different - it doesn't cause
672 statistics to be gathered and printed when the capture is complete, it
673 modifies the regular packet summary output to include the values of
674 fields specified with the option.  Therefore you must not use the B<-q>
675 option, as that option would suppress the printing of the regular packet
676 summary output, and must also not use the B<-V> option, as that would
677 cause packet detail information rather than packet summary information
678 to be printed.
679
680 Currently implemented statistics are:
681
682 =over 4
683
684 =item B<-z> afp,srt[,I<filter>]
685
686 =item B<-z> camel,srt
687
688 =item B<-z> dcerpc,srt,I<uuid>,I<major>.I<minor>[,I<filter>]
689
690 Collect call/reply SRT (Service Response Time) data for DCERPC interface I<uuid>,
691 version I<major>.I<minor>.
692 Data collected is the number of calls for each procedure, MinSRT, MaxSRT
693 and AvgSRT.
694
695 Example: S<B<-z dcerpc,srt,12345778-1234-abcd-ef00-0123456789ac,1.0>> will collect data for the CIFS SAMR Interface.
696
697 This option can be used multiple times on the command line.
698
699 If the optional I<filter> is provided, the stats will only be calculated
700 on those calls that match that filter.
701
702 Example: S<B<-z dcerpc,srt,12345778-1234-abcd-ef00-0123456789ac,1.0,ip.addr==1.2.3.4>> will collect SAMR
703 SRT statistics for a specific host.
704
705 =item B<-z> io,phs[,I<filter>]
706
707 Create Protocol Hierarchy Statistics listing both number of packets and bytes.
708 If no I<filter> is specified the statistics will be calculated for all packets.
709 If a I<filter> is specified statistics will be only calculated for those
710 packets that match the filter.
711
712 This option can be used multiple times on the command line.
713
714 =item B<-z> io,stat,I<interval>[,I<filter>][,I<filter>][,I<filter>]...
715
716 Collect packet/bytes statistics for the capture in intervals of
717 I<interval> seconds.  I<Interval> can be specified either as a whole or
718 fractional second and can be specified with ms resolution.
719 If I<interval> is 0, the statistics will be calculated over all packets.
720
721 If no I<filter> is specified the statistics will be calculated for all packets.
722 If one or more I<filters> are specified statistics will be calculated for
723 all filters and presented with one column of statistics for each filter.
724
725 This option can be used multiple times on the command line.
726
727 Example: B<-z io,stat,1,ip.addr==1.2.3.4> will generate 1 second
728 statistics for all traffic to/from host 1.2.3.4.
729
730 Example: B<-z "io,stat,0.001,smb&&ip.addr==1.2.3.4"> will generate 1ms
731 statistics for all SMB packets to/from host 1.2.3.4.
732
733 The examples above all use the standard syntax for generating statistics
734 which only calculates the number of packets and bytes in each interval.
735
736 B<io,stat> can also do much more statistics and calculate COUNT(), SUM(),
737 MIN(), MAX(), and AVG() using a slightly different filter syntax:
738
739   [COUNT|SUM|MIN|MAX|AVG](<field>)<filter>
740
741 NOTE: One important thing to note here is that the field that the
742 calculation is based on MUST also be part of the filter string or
743 else the calculation will fail.
744
745 So: B<-z io,stat,0.010,AVG(smb.time)> does not work.  Use B<-z
746 io,stat,0.010,AVG(smb.time)smb.time> instead.  Also be aware that a field
747 can exist multiple times inside the same packet and will then be counted
748 multiple times in those packets.
749
750 NOTE: A second important thing to note is that the system setting for
751 decimal separator is set to "."! If it is set to "," the statistics
752 will not be displayed per filter.
753
754 COUNT(<field>) can be used on any type which has a display filter name.
755 It will count how many times this particular field is encountered in the
756 filtered packet list.
757
758 Example: B<-z io,stat,0.010,COUNT(smb.sid)smb.sid>
759
760 This will count the total number of SIDs seen in each 10ms interval.
761
762 SUM(<field>) can only be used on named fields of integer type.
763 This will sum together every occurrence of this field's value for each interval.
764
765 Example: B<-z io,stat,0.010,SUM(frame.pkt_len)frame.pkt_len>
766
767 This will report the total number of bytes seen in all the packets within
768 an interval.
769
770 MIN/MAX/AVG(<field>) can only be used on named fields that are either
771 integers or relative time fields.  This will calculate maximum/minimum
772 or average seen in each interval.  If the field is a relative time field
773 the output will be presented in seconds and three digits after the
774 decimal point.  The resolution for time calculations is 1ms and anything
775 smaller will be truncated.
776
777 Example:  B<-z "io,stat,0.010,smb.time&&ip.addr==1.1.1.1,MIN(smb.time)smb.time&&ip.addr==1.1.1.1,MAX(smb.time)smb.time&&ip.addr==1.1.1.1,MAX(smb.time)smb.time&&ip.addr==1.1.1.1">
778
779 This will calculate statistics for all smb response times we see to/from
780 host 1.1.1.1 in 10ms intervals.  The output will be displayed in 4
781 columns; number of packets/bytes, minimum response time, maximum response
782 time and average response time.
783
784 =item B<-z> conv,I<type>[,I<filter>]
785
786 Create a table that lists all conversations that could be seen in the
787 capture.  I<type> specifies the conversation endpoint types for which we
788 want to generate the statistics; currently the supported ones are:
789
790   "eth"   Ethernet addresses
791   "fc"    Fibre Channel addresses
792   "fddi"  FDDI addresses
793   "ip"    IPv4 addresses
794   "ipv6"  IPv6 addresses
795   "ipx"   IPX addresses
796   "tcp"   TCP/IP socket pairs  Both IPv4 and IPv6 are supported
797   "tr"    Token Ring addresses
798   "udp"   UDP/IP socket pairs  Both IPv4 and IPv6 are supported
799
800 If the optional I<filter> is specified, only those packets that match the
801 filter will be used in the calculations.
802
803 The table is presented with one line for each conversation and displays
804 the number of packets/bytes in each direction as well as the total
805 number of packets/bytes.  The table is sorted according to the total
806 number of bytes.
807
808 =item B<-z> proto,colinfo,I<filter>,I<field>
809
810 Append all I<field> values for the packet to the Info column of the
811 one-line summary output.
812 This feature can be used to append arbitrary fields to the Info column
813 in addition to the normal content of that column.
814 I<field> is the display-filter name of a field which value should be placed
815 in the Info column.
816 I<filter> is a filter string that controls for which packets the field value
817 will be presented in the info column. I<field> will only be presented in the
818 Info column for the packets which match I<filter>.
819
820 NOTE: In order for B<TShark> to be able to extract the I<field> value
821 from the packet, I<field> MUST be part of the I<filter> string.  If not,
822 B<TShark> will not be able to extract its value.
823
824 For a simple example to add the "nfs.fh.hash" field to the Info column
825 for all packets containing the "nfs.fh.hash" field, use
826
827 B<-z proto,colinfo,nfs.fh.hash,nfs.fh.hash>
828
829 To put "nfs.fh.hash" in the Info column but only for packets coming from
830 host 1.2.3.4 use:
831
832 B<-z "proto,colinfo,nfs.fh.hash && ip.src==1.2.3.4,nfs.fh.hash">
833
834 This option can be used multiple times on the command line.
835
836 =item B<-z> diameter,avp[,I<cmd.code>,I<field>,I<field>,I<...>]
837
838 This option enables extraction of most important diameter fields from large capture files.
839 Exactly one text line for each diameter message with matched B<diameter.cmd.code> will be printed.
840
841 Empty diameter command code or '*' can be specified to mach any B<diameter.cmd.code>
842
843 Example: B<-z diameter,avp>  extract default field set from diameter messages.
844
845 Example: B<-z diameter,avp,280>  extract default field set from diameter DWR messages.
846
847 Example: B<-z diameter,avp,272>  extract default field set from diameter CC messages.
848
849 Extract most important fields from diameter CC messages:
850
851 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>
852
853 Following fields will be printed out for each diameter message:
854
855   "frame"        Frame number.
856   "time"         Unix time of the frame arrival.
857   "src"          Source address.
858   "srcport"      Source port.
859   "dst"          Destination address.
860   "dstport"      Destination port.
861   "proto"        Constant string 'diameter', which can be used for post processing of tshark output. e.g. grep/sed/awk.
862   "msgnr"        seq. number of diameter message within the frame. E.g. '2' for the third diameter message in the same frame.
863   "is_request"   '0' if message is a request, '1' if message is an answer.
864   "cmd"          diameter.cmd_code, E.g. '272' for credit control messages.
865   "req_frame"    Number of frame where matched request was found or '0'.
866   "ans_frame"    Number of frame where matched answer was found or '0'.
867   "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.
868
869 B<-z diameter,avp> option is much faster than B<-V -T text> or B<-T pdml> options.
870
871 B<-z diameter,avp> option is more powerful than B<-T field> and B<-z proto,colinfo> options.
872
873 Multiple diameter messages in one frame are supported.
874
875 Several fields with same name within one diameter message are supported, e.g. I<diameter.Subscription-Id-Data> or I<diameter.Rating-Group>.
876
877 Note: B<tshark -q> option is recommended to suppress default B<tshark> output.
878
879 =item B<-z> rpc,srt,I<program>,I<version>[,I<filter>]
880
881 Collect call/reply SRT (Service Response Time) data for I<program>/I<version>.  Data collected
882 is number of calls for each procedure, MinSRT, MaxSRT and AvgSRT.
883
884 Example: B<-z rpc,srt,100003,3> will collect data for NFS v3.
885
886 This option can be used multiple times on the command line.
887
888 If the optional I<filter> is provided, the stats will only be calculated
889 on those calls that match that filter.
890
891 Example: B<-z rpc,srt,100003,3,nfs.fh.hash==0x12345678> will collect NFS v3
892 SRT statistics for a specific file.
893
894 =item B<-z> rpc,programs
895
896 Collect call/reply SRT data for all known ONC-RPC programs/versions.
897 Data collected is number of calls for each protocol/version, MinSRT,
898 MaxSRT and AvgSRT.
899 This option can only be used once on the command line.
900
901 =item B<-z> rtp,streams
902
903 Collect statistics for all RTP streams and calculate max. delta, max. and
904 mean jitter and packet loss percentages.
905
906 =item B<-z> scsi,srt,I<cmdset>[,<filter>]
907
908 Collect call/reply SRT (Service Response Time) data for SCSI commandset <cmdset>.
909
910 Commandsets are 0:SBC   1:SSC  5:MMC
911
912 Data collected
913 is the number of calls for each procedure, MinSRT, MaxSRT and AvgSRT.
914
915 Example: B<-z scsi,srt,0> will collect data for SCSI BLOCK COMMANDS (SBC).
916
917 This option can be used multiple times on the command line.
918
919 If the optional I<filter> is provided, the stats will only be calculated
920 on those calls that match that filter.
921
922 Example: B<-z scsi,srt,0,ip.addr==1.2.3.4> will collect SCSI SBC
923 SRT statistics for a specific iscsi/ifcp/fcip host.
924
925 =item B<-z> smb,srt[,I<filter>]
926
927 Collect call/reply SRT (Service Response Time) data for SMB.  Data collected
928 is number of calls for each SMB command, MinSRT, MaxSRT and AvgSRT.
929
930 Example: B<-z smb,srt>
931
932 The data will be presented as separate tables for all normal SMB commands,
933 all Transaction2 commands and all NT Transaction commands.
934 Only those commands that are seen in the capture will have its stats
935 displayed.
936 Only the first command in a xAndX command chain will be used in the
937 calculation.  So for common SessionSetupAndX + TreeConnectAndX chains,
938 only the SessionSetupAndX call will be used in the statistics.
939 This is a flaw that might be fixed in the future.
940
941 This option can be used multiple times on the command line.
942
943 If the optional I<filter> is provided, the stats will only be calculated
944 on those calls that match that filter.
945
946 Example: B<-z "smb,srt,ip.addr==1.2.3.4"> will only collect stats for
947 SMB packets exchanged by the host at IP address 1.2.3.4 .
948
949 =item B<-z> smb,sids
950
951 When this feature is used B<TShark> will print a report with all the
952 discovered SID and account name mappings.  Only those SIDs where the
953 account name is known will be presented in the table.
954
955 For this feature to work you will need to either to enable
956 "Edit/Preferences/Protocols/SMB/Snoop SID to name mappings" in the
957 preferences or you can override the preferences by specifying
958 S<B<-o "smb.sid_name_snooping:TRUE">> on the B<TShark> command line.
959
960 The current method used by B<TShark> to find the SID->name mapping
961 is relatively restricted with a hope of future expansion.
962
963 =item B<-z> mgcp,rtd[I<,filter>]
964
965 Collect requests/response RTD (Response Time Delay) data for MGCP.
966 (This is similar to B<-z smb,srt>). Data collected is the number of calls
967 for each known MGCP Type, MinRTD, MaxRTD and AvgRTD.
968 Additionally you get the number of duplicate requests/responses,
969 unresponded requests, responses, which don't match with any request.
970 Example: B<-z mgcp,rtd>.
971
972 This option can be used multiple times on the command line.
973
974 If the optional I<filter> is provided, the stats will only be calculated
975 on those calls that match that filter.
976 Example: B<-z "mgcp,rtd,ip.addr==1.2.3.4"> will only collect stats for
977 MGCP packets exchanged by the host at IP address 1.2.3.4 .
978
979 =item B<-z> megaco,rtd[I<,filter>]
980
981 Collect requests/response RTD (Response Time Delay) data for MEGACO.
982 (This is similar to B<-z smb,srt>). Data collected is the number of calls
983 for each known MEGACO Type, MinRTD, MaxRTD and AvgRTD.
984 Additionally you get the number of duplicate requests/responses,
985 unresponded requests, responses, which don't match with any request.
986 Example: B<-z megaco,rtd>.
987
988 If the optional I<filter> is provided, the stats will only be calculated
989 on those calls that match that filter.
990 Example: B<-z "megaco,rtd,ip.addr==1.2.3.4"> will only collect stats for
991 MEGACO packets exchanged by the host at IP address 1.2.3.4 .
992
993 This option can be used multiple times on the command line.
994
995 =item B<-z> h225,counter[I<,filter>]
996
997 Count ITU-T H.225 messages and their reasons. In the first column you get a
998 list of H.225 messages and H.225 message reasons, which occur in the current
999 capture file. The number of occurrences of each message or reason is displayed
1000 in the second column.
1001
1002 Example: B<-z h225,counter>.
1003
1004 If the optional I<filter> is provided, the stats will only be calculated
1005 on those calls that match that filter.
1006 Example: use B<-z "h225,counter,ip.addr==1.2.3.4"> to only collect stats for
1007 H.225 packets exchanged by the host at IP address 1.2.3.4 .
1008
1009 This option can be used multiple times on the command line.
1010
1011 =item B<-z> h225,srt[I<,filter>]
1012
1013 Collect requests/response SRT (Service Response Time) data for ITU-T H.225 RAS.
1014 Data collected is number of calls of each ITU-T H.225 RAS Message Type,
1015 Minimum SRT, Maximum SRT, Average SRT, Minimum in Packet, and Maximum in Packet.
1016 You will also get the number of Open Requests (Unresponded Requests),
1017 Discarded Responses (Responses without matching request) and Duplicate Messages.
1018
1019 Example: B<-z h225,srt>
1020
1021 This option can be used multiple times on the command line.
1022
1023 If the optional I<filter> is provided, the stats will only be calculated
1024 on those calls that match that filter.
1025
1026 Example: B<-z "h225,srt,ip.addr==1.2.3.4"> will only collect stats for
1027 ITU-T H.225 RAS packets exchanged by the host at IP address 1.2.3.4 .
1028
1029 =item B<-z> sip,stat[I<,filter>]
1030
1031 This option will activate a counter for SIP messages. You will get the number
1032 of occurrences of each SIP Method and of each SIP Status-Code. Additionally you
1033 also get the number of resent SIP Messages (only for SIP over UDP).
1034
1035 Example: B<-z sip,stat>.
1036
1037 This option can be used multiple times on the command line.
1038
1039 If the optional I<filter> is provided, the stats will only be calculated
1040 on those calls that match that filter.
1041 Example: B<-z "sip,stat,ip.addr==1.2.3.4"> will only collect stats for
1042 SIP packets exchanged by the host at IP address 1.2.3.4 .
1043
1044 =back
1045
1046 =back
1047
1048 =head1 CAPTURE FILTER SYNTAX
1049
1050 See the manual page of pcap-filter(4) or, if that doesn't exist, tcpdump(8),
1051 or, if that doesn't exist, L<http://wiki.wireshark.org/CaptureFilters>.
1052
1053 =head1 READ FILTER SYNTAX
1054
1055 For a complete table of protocol and protocol fields that are filterable
1056 in B<TShark> see the wireshark-filter(4) manual page.
1057
1058 =head1 FILES
1059
1060 These files contains various B<Wireshark> configuration values.
1061
1062 =over 4
1063
1064 =item Preferences
1065
1066 The F<preferences> files contain global (system-wide) and personal
1067 preference settings. If the system-wide preference file exists, it is
1068 read first, overriding the default settings. If the personal preferences
1069 file exists, it is read next, overriding any previous values. Note: If
1070 the command line option B<-o> is used (possibly more than once), it will
1071 in turn override values from the preferences files.
1072
1073 The preferences settings are in the form I<prefname>B<:>I<value>,
1074 one per line,
1075 where I<prefname> is the name of the preference
1076 and I<value> is the value to
1077 which it should be set; white space is allowed between B<:> and
1078 I<value>.  A preference setting can be continued on subsequent lines by
1079 indenting the continuation lines with white space.  A B<#> character
1080 starts a comment that runs to the end of the line:
1081
1082   # Capture in promiscuous mode?
1083   # TRUE or FALSE (case-insensitive).
1084   capture.prom_mode: TRUE
1085
1086 The global preferences file is looked for in the F<wireshark> directory
1087 under the F<share> subdirectory of the main installation directory (for
1088 example, F</usr/local/share/wireshark/preferences>) on UNIX-compatible
1089 systems, and in the main installation directory (for example,
1090 F<C:\Program Files\Wireshark\preferences>) on Windows systems.
1091
1092 The personal preferences file is looked for in
1093 F<$HOME/.wireshark/preferences> on
1094 UNIX-compatible systems and F<%APPDATA%\Wireshark\preferences> (or, if
1095 %APPDATA% isn't defined, F<%USERPROFILE%\Application
1096 Data\Wireshark\preferences>) on Windows systems.
1097
1098 =item Disabled (Enabled) Protocols
1099
1100 The F<disabled_protos> files contain system-wide and personal lists of
1101 protocols that have been disabled, so that their dissectors are never
1102 called.  The files contain protocol names, one per line, where the
1103 protocol name is the same name that would be used in a display filter
1104 for the protocol:
1105
1106   http
1107   tcp     # a comment
1108
1109 The global F<disabled_protos> file uses the same directory as the global
1110 preferences file.
1111
1112 The personal F<disabled_protos> file uses the same directory as the
1113 personal preferences file.
1114
1115 =item Name Resolution (hosts)
1116
1117 If the personal F<hosts> file exists, it is
1118 used to resolve IPv4 and IPv6 addresses before any other
1119 attempts are made to resolve them.  The file has the standard F<hosts>
1120 file syntax; each line contains one IP address and name, separated by
1121 whitespace. The same directory as for the personal preferences file is
1122 used.
1123
1124 Capture filter name resolution is handled by libpcap on UNIX-compatible
1125 systems and WinPCAP on Windows.  As such the Wireshark personal F<hosts> file
1126 will not be consulted for capture filter name resolution.
1127
1128 =item Name Resolution (ethers)
1129
1130 The F<ethers> files are consulted to correlate 6-byte hardware addresses to
1131 names. First the personal F<ethers> file is tried and if an address is not
1132 found there the global F<ethers> file is tried next.
1133
1134 Each line contains one hardware address and name, separated by
1135 whitespace.  The digits of the hardware address are separated by colons
1136 (:), dashes (-) or periods (.).  The same separator character must be
1137 used consistently in an address. The following three lines are valid
1138 lines of an F<ethers> file:
1139
1140   ff:ff:ff:ff:ff:ff          Broadcast
1141   c0-00-ff-ff-ff-ff          TR_broadcast
1142   00.00.00.00.00.00          Zero_broadcast
1143
1144 The global F<ethers> file is looked for in the F</etc> directory on
1145 UNIX-compatible systems, and in the main installation directory (for
1146 example, F<C:\Program Files\Wireshark>) on Windows systems.
1147
1148 The personal F<ethers> file is looked for in the same directory as the personal
1149 preferences file.
1150
1151 Capture filter name resolution is handled by libpcap on UNIX-compatible
1152 systems and WinPCAP on Windows.  As such the Wireshark personal F<ethers> file
1153 will not be consulted for capture filter name resolution.
1154
1155 =item Name Resolution (manuf)
1156
1157 The F<manuf> file is used to match the 3-byte vendor portion of a 6-byte
1158 hardware address with the manufacturer's name; it can also contain well-known
1159 MAC addresses and address ranges specified with a netmask.  The format of the
1160 file is the same as the F<ethers> files, except that entries of the form:
1161
1162   00:00:0C      Cisco
1163
1164 can be provided, with the 3-byte OUI and the name for a vendor, and
1165 entries such as:
1166
1167   00-00-0C-07-AC/40     All-HSRP-routers
1168
1169 can be specified, with a MAC address and a mask indicating how many bits
1170 of the address must match. The above entry, for example, has 40
1171 significant bits, or 5 bytes, and would match addresses from
1172 00-00-0C-07-AC-00 through 00-00-0C-07-AC-FF. The mask need not be a
1173 multiple of 8.
1174
1175 The F<manuf> file is looked for in the same directory as the global
1176 preferences file.
1177
1178 =item Name Resolution (ipxnets)
1179
1180 The F<ipxnets> files are used to correlate 4-byte IPX network numbers to
1181 names. First the global F<ipxnets> file is tried and if that address is not
1182 found there the personal one is tried next.
1183
1184 The format is the same as the F<ethers>
1185 file, except that each address is four bytes instead of six.
1186 Additionally, the address can be represented as a single hexadecimal
1187 number, as is more common in the IPX world, rather than four hex octets.
1188 For example, these four lines are valid lines of an F<ipxnets> file:
1189
1190   C0.A8.2C.00              HR
1191   c0-a8-1c-00              CEO
1192   00:00:BE:EF              IT_Server1
1193   110f                     FileServer3
1194
1195 The global F<ipxnets> file is looked for in the F</etc> directory on
1196 UNIX-compatible systems, and in the main installation directory (for
1197 example, F<C:\Program Files\Wireshark>) on Windows systems.
1198
1199 The personal F<ipxnets> file is looked for in the same directory as the
1200 personal preferences file.
1201
1202 =back
1203
1204 =head1 ENVIRONMENT VARIABLES
1205
1206 =over 4
1207
1208 =item WIRESHARK_DEBUG_EP_NO_CHUNKS
1209
1210 Normally per-packet memory is allocated in large "chunks."  This behavior
1211 doesn't work well with debugging tools such as Valgrind or ElectricFence.
1212 Export this environment variable to force individual allocations.
1213 Note: disabling chunks also disables canaries (see below).
1214
1215 =item WIRESHARK_DEBUG_SE_NO_CHUNKS
1216
1217 Normally per-file memory is allocated in large "chunks."  This behavior
1218 doesn't work well with debugging tools such as Valgrind or ElectricFence.
1219 Export this environment variable to force individual allocations.
1220 Note: disabling chunks also disables canaries (see below).
1221
1222 =item WIRESHARK_DEBUG_EP_NO_CANARY
1223
1224 Normally per-packet memory allocations are separated by "canaries" which
1225 allow detection of memory overruns.  This comes at the expense of some extra
1226 memory usage.  Exporting this environment variable disables these canaries.
1227
1228 =item WIRESHARK_DEBUG_SE_USE_CANARY
1229
1230 Exporting this environment variable causes per-file memory allocations to be
1231 protected with "canaries" which allow for detection of memory overruns.
1232 This comes at the expense of significant extra memory usage.
1233
1234 =item WIRESHARK_DEBUG_SCRUB_MEMORY
1235
1236 If this environment variable is exported, the contents of per-packet and
1237 per-file memory is initialized to 0xBADDCAFE when the memory is allocated
1238 and is reset to 0xDEADBEEF when the memory is freed.  This functionality is
1239 useful mainly to developers looking for bugs in the way memory is handled.
1240
1241 =item WIRESHARK_RUN_FROM_BUILD_DIRECTORY
1242
1243 This environment variable causes the plugins and other data files to be loaded
1244 from the build directory (where the program was compiled) rather than from the
1245 standard locations.  It has no effect when the program in question is running
1246 with root (or setuid) permissions on *NIX.
1247
1248 =item WIRESHARK_DATA_DIR
1249
1250 This environment variable causes the various data files to be loaded from
1251 a directory other than the standard locations.  It has no effect when the
1252 program in question is running with root (or setuid) permissions on *NIX.
1253
1254 =item WIRESHARK_PYTHON_DIR
1255
1256 This environment variable points to an alternate location for Python.
1257 It has no effect when the program in question is running with root (or setuid)
1258 permissions on *NIX.
1259
1260 =item ERF_RECORDS_TO_CHECK
1261
1262 This environment variable controls the number of ERF records checked when
1263 deciding if a file really is in the ERF format.  Setting this environment
1264 variable a number higher than the default (20) would make false positives
1265 less likely.
1266
1267 =item IPFIX_RECORDS_TO_CHECK
1268
1269 This environment variable controls the number of IPFIX records checked when
1270 deciding if a file really is in the IPFIX format.  Setting this environment
1271 variable a number higher than the default (20) would make false positives
1272 less likely.
1273
1274 =item WIRESHARK_ABORT_ON_DISSECTOR_BUG
1275
1276 If this environment variable is set, B<TShark> will call abort(3)
1277 when a dissector bug is encountered.  abort(3) will cause the program to
1278 exit abnormally; if you are running B<TShark> in a debugger, it
1279 should halt in the debugger and allow inspection of the process, and, if
1280 you are not running it in a debugger, it will, on some OSes, assuming
1281 your environment is configured correctly, generate a core dump file.
1282 This can be useful to developers attempting to troubleshoot a problem
1283 with a protocol dissector.
1284
1285 =item WIRESHARK_EP_VERIFY_POINTERS
1286
1287 This environment variable, if exported, causes certain uses of pointers to be
1288 audited to ensure they do not point to memory that is deallocated after each
1289 packet has been fully dissected.  This can be useful to developers writing or
1290 auditing code.
1291
1292 =item WIRESHARK_SE_VERIFY_POINTERS
1293
1294 This environment variable, if exported, causes certain uses of pointers to be
1295 audited to ensure they do not point to memory that is deallocated after when
1296 a capture file is closed.  This can be useful to developers writing or
1297 auditing code.
1298
1299 =back
1300
1301 =head1 SEE ALSO
1302
1303 wireshark-filter(4), wireshark(1), editcap(1), pcap-filter(4), tcpdump(8),
1304 pcap(3), dumpcap(1), text2pcap(1), mergecap(1)
1305
1306 =head1 NOTES
1307
1308 B<TShark> is part of the B<Wireshark> distribution.  The latest version
1309 of B<Wireshark> can be found at L<http://www.wireshark.org>.
1310
1311 HTML versions of the Wireshark project man pages are available at:
1312 L<http://www.wireshark.org/docs/man-pages>.
1313
1314 =head1 AUTHORS
1315
1316 B<TShark> uses the same packet dissection code that B<Wireshark> does,
1317 as well as using many other modules from B<Wireshark>; see the list of
1318 authors in the B<Wireshark> man page for a list of authors of that code.