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