Qt: Support search without a selected packet
[metze/wireshark/wip.git] / doc / capinfos.pod
1
2 =head1 NAME
3
4 capinfos - Prints information about capture files
5
6 =head1 SYNOPSIS
7
8 B<capinfos>
9 S<[ B<-a> ]>
10 S<[ B<-A> ]>
11 S<[ B<-b> ]>
12 S<[ B<-B> ]>
13 S<[ B<-c> ]>
14 S<[ B<-C> ]>
15 S<[ B<-d> ]>
16 S<[ B<-e> ]>
17 S<[ B<-E> ]>
18 S<[ B<-F> ]>
19 S<[ B<-h> ]>
20 S<[ B<-H> ]>
21 S<[ B<-i> ]>
22 S<[ B<-I> ]>
23 S<[ B<-k> ]>
24 S<[ B<-K> ]>
25 S<[ B<-l> ]>
26 S<[ B<-L> ]>
27 S<[ B<-m> ]>
28 S<[ B<-M> ]>
29 S<[ B<-N> ]>
30 S<[ B<-o> ]>
31 S<[ B<-q> ]>
32 S<[ B<-Q> ]>
33 S<[ B<-r> ]>
34 S<[ B<-R> ]>
35 S<[ B<-s> ]>
36 S<[ B<-S> ]>
37 S<[ B<-t> ]>
38 S<[ B<-T> ]>
39 S<[ B<-u> ]>
40 S<[ B<-v> ]>
41 S<[ B<-x> ]>
42 S<[ B<-y> ]>
43 S<[ B<-z> ]>
44 E<lt>I<infile>E<gt>
45 I<...>
46
47 =head1 DESCRIPTION
48
49 B<Capinfos> is a program that reads one or more capture files and
50 returns some or all available statistics (infos) of each E<lt>I<infile>E<gt>
51 in one of two types of output formats: long or table.
52
53 The long output is suitable for a human to read.  The table output
54 is useful for generating a report that can be easily imported into
55 a spreadsheet or database.
56
57 The user specifies what type of output (long or table) and which
58 statistics to display by specifying flags (options) that corresponding
59 to the report type and desired infos.  If no options are specified,
60 B<Capinfos> will report all statistics available in "long" format.
61
62 Options are processed from left to right order with later options
63 superseding or adding to earlier options.
64
65 B<Capinfos> is able to detect and read the same capture files that are
66 supported by B<Wireshark>.
67 The input files don't need a specific filename extension; the file
68 format and an optional gzip compression will be automatically detected.
69 Near the beginning of the DESCRIPTION section of wireshark(1) or
70 L<https://www.wireshark.org/docs/man-pages/wireshark.html>
71 is a detailed description of the way B<Wireshark> handles this, which is
72 the same way B<Capinfos> handles this.
73
74 =head1 OPTIONS
75
76 =over 4
77
78 =item -a
79
80 Displays the start time of the capture.  B<Capinfos> considers
81 the earliest timestamp seen to be the start time, so the
82 first packet in the capture is not necessarily the earliest -
83 if packets exist "out-of-order", time-wise, in the capture,
84 B<Capinfos> detects this.
85
86 =item -A
87
88 Generate all infos. By default capinfos will display
89 all infos values for each input file, but enabling
90 any of the individual display infos options will
91 disable the generate all option.
92
93 =item -b
94
95 Separate infos with ASCII SPACE (0x20) characters.
96 This option is only useful when generating a table
97 style report (-T).  The various info values will be
98 separated (delimited) from one another with a single
99 ASCII SPACE character.
100
101 NOTE: Since some of the header labels as well as some
102 of the value fields contain SPACE characters.  This
103 option is of limited value unless one of the quoting
104 options (-q or -Q) is also specified.
105
106 =item -B
107
108 Separate the infos with ASCII TAB characters.
109 This option is only useful when generating a table
110 style report (-T).  The various info values will be
111 separated (delimited) from one another with a single
112 ASCII TAB character.  The TAB character is the default
113 delimiter when -T style report is enabled.
114
115 =item -c
116
117 Displays the number of packets in the capture file.
118
119 =item -C
120
121 Cancel processing any additional files if and
122 when capinfos should fail to open an input file.
123 By default capinfos will attempt to open each and
124 every file name argument.
125
126 Note: An error message will be written to stderr
127 whenever capinfos fails to open a file regardless
128 of whether the -C option is specified or not.
129 Upon exit, capinfos will return an error status
130 if any errors occurred during processing.
131
132 =item -d
133
134 Displays the total length of all packets in the file, in
135 bytes.  This counts the size of the packets as they appeared
136 in their original form, not as they appear in this file.
137 For example, if a packet was originally 1514 bytes and only
138 256 of those bytes were saved to the capture file (if packets
139 were captured with a snaplen or other slicing option),
140 B<Capinfos> will consider the packet to have been 1514 bytes.
141
142 =item -e
143
144 Displays the end time of the capture.  B<Capinfos> considers
145 the latest timestamp seen to be the end time, so the
146 last packet in the capture is not necessarily the latest -
147 if packets exist "out-of-order", time-wise, in the capture,
148 B<Capinfos> detects this.
149
150 =item -E
151
152 Displays the per-file encapsulation of the capture file.
153
154 =item -F
155
156 Displays additional capture file information.
157
158 =item -h
159
160 Prints the help listing and exits.
161
162 =item -H
163
164 Displays the SHA256, RIPEMD160, and SHA1 hashes for the file.
165 SHA1 output may be removed in the future.
166
167 =item -i
168
169 Displays the average data rate, in bits/sec
170
171 =item -I
172
173 Displays detailed capture file interface information. This information
174 is not available in table format.
175
176 =item -k
177
178 Displays the capture comment. For pcapng files, this is the comment from the
179 section header block.
180
181 =item -K
182
183 Use this option to suppress printing capture comments.  By default capture
184 comments are enabled.  Capture comments are relatively freeform and might
185 contain embedded new-line characters and/or other delimiting characters
186 making it harder for a human or machine to easily parse the capinfos output.
187 Excluding capture comments can aid in post-processing of output.
188
189 =item -l
190
191 Display the snaplen (if any) for a file.
192 snaplen (if available) is determined from the capture file header
193 and by looking for truncated records in the capture file.
194
195 =item -L
196
197 Generate long report.  Capinfos can generate two
198 different styles of reports.  The "long" report is
199 the default style of output and is suitable for a
200 human to use.
201
202 =item -m
203
204 Separate the infos with comma (,) characters.  This option
205 is only useful when generating a table style report (-T).
206 The various info values will be separated (delimited)
207 from one another with a single comma "," character.
208
209 =item -M
210
211 Print raw (machine readable) numeric values in long reports.
212 By default capinfos prints human-readable values with SI
213 suffixes. Table reports (-T) always print raw values.
214
215 =item -N
216
217 Do not quote the infos.  This option is only useful
218 when generating a table style report (-T).  Excluding
219 any quoting characters around the various values and
220 using a TAB delimiter produces a very "clean" table
221 report that is easily parsed with CLI tools.  By
222 default infos are B<NOT> quoted.
223
224 =item -o
225
226 Displays "True" if packets exist in strict chronological order
227 or "False" if one or more packets in the capture exists
228 "out-of-order" time-wise.
229
230 =item -q
231
232 Quote infos with single quotes ('). This option is
233 only useful when generating a table style report (-T).
234 When this option is enabled, each value will be
235 encapsulated within a pair of single quote (')
236 characters.  This option (when used  with the -m
237 option) is useful for generating one type of CSV
238 style file report.
239
240 =item -Q
241
242 Quote infos with double quotes (").  This option is
243 only useful when generating a table style report (-T).
244 When this option is enabled, each value will be
245 encapsulated within a pair of double quote (")
246 characters.  This option (when used with the -m
247 option) is useful for generating the most common
248 type of CSV style file report.
249
250 =item -r
251
252 Do not generate header record.  This option is only
253 useful when generating a table style report (-T).
254 If this option is specified then B<no> header record will be
255 generated within the table report.
256
257 =item -R
258
259 Generate header record.  This option is only useful
260 when generating a table style report (-T).  A header
261 is generated by default.  A header record (if generated)
262 is the first line of data reported and includes labels
263 for all the columns included within the table report.
264
265 =item -s
266
267 Displays the size of the file, in bytes.  This reports
268 the size of the capture file itself.
269
270 =item -S
271
272 Display the start and end times as seconds since January
273 1, 1970. Handy for synchronizing dumps using B<editcap -t>.
274
275 =item -t
276
277 Displays the capture type of the capture file.
278
279 =item -T
280
281 Generate a table report. A table report is a text file
282 that is suitable for importing into a spreadsheet or
283 database.  Capinfos can build a tab delimited text file
284 (the default) or several variations on Comma-separated
285 values (CSV) files.
286
287 =item -u
288
289 Displays the capture duration, in seconds.  This is the
290 difference in time between the earliest packet seen and
291 latest packet seen.
292
293 =item -v
294
295 Displays the tool's version and exits.
296
297 =item -x
298
299 Displays the average packet rate, in packets/sec
300
301 =item -y
302
303 Displays the average data rate, in bytes/sec
304
305 =item -z
306
307 Displays the average packet size, in bytes
308
309 =back
310
311 =head1 EXAMPLES
312
313 To see a description of the capinfos options use:
314
315     capinfos -h
316
317 To generate a long form report for the capture file
318 mycapture.pcap use:
319
320     capinfos mycapture.pcap
321
322 To generate a TAB delimited table form report for the capture
323 file mycapture.pcap use:
324
325     capinfos -T mycapture.pcap
326
327 To generate a CSV style table form report for the capture
328 file mycapture.pcap use:
329
330     capinfos -T -m -Q mycapture.pcap
331
332 or
333
334     capinfos -TmQ mycapture.pcap
335
336
337 To generate a TAB delimited table style report with just the
338 filenames, capture type, capture encapsulation type and packet
339 count for all the pcap files in the current directory use:
340
341     capinfos -T -t -E -c *.pcap
342
343 or
344
345     capinfos -TtEs *.pcap
346
347 Note: The ability to use of filename globbing characters are
348 a feature of *nix style command shells.
349
350 To generate a CSV delimited table style report of all infos
351 for all pcap files in the current directory and write it to
352 a text file called mycaptures.csv use:
353
354     capinfos -TmQ *.pcap >mycaptures.csv
355
356 The resulting mycaptures.csv file can be easily imported
357 into spreadsheet applications.
358
359 =head1 SEE ALSO
360
361 pcap(3), wireshark(1), mergecap(1), editcap(1), tshark(1),
362 dumpcap(1), pcap-filter(7) or tcpdump(8)
363
364 =head1 NOTES
365
366 B<Capinfos> is part of the B<Wireshark> distribution.  The latest version
367 of B<Wireshark> can be found at L<https://www.wireshark.org>.
368
369 HTML versions of the Wireshark project man pages are available at:
370 L<https://www.wireshark.org/docs/man-pages>.
371
372 =head1 AUTHORS
373
374   Original Author
375   -------- ------
376   Ian Schorr           <ian[AT]ianschorr.com>
377
378
379   Contributors
380   ------------
381   Gerald Combs         <gerald[AT]wireshark.org>
382   Jim Young            <jyoung[AT]gsu.edu>