Include EyeSDN USB S0 trace files in the list of file formats we read.
[obnox/wireshark/wip.git] / doc / mergecap.pod
1
2 =head1 NAME
3
4 mergecap - Merges two capture files into one
5
6 =head1 SYNOPSYS
7
8 B<mergecap>
9 S<[ B<-hva> ]>
10 S<[ B<-s> I<snaplen> ]>
11 S<[ B<-F> I<file format> ]>
12 S<[ B<-T> I<encapsulation type> ]>
13 S<B<-w> I<outfile>>
14 I<infile>
15 I<...>
16
17 =head1 DESCRIPTION
18
19 B<Mergecap> is a program that combines multiple saved capture files into
20 a single output file specified by the B<-w> argument.  B<Mergecap> knows
21 how to read B<libpcap> capture files, including those of B<tcpdump>,
22 B<Ethereal>, and other tools that write captures in that format.  In
23 addition, B<Mergecap> can read capture files from B<snoop> and
24 B<atmsnoop>, Shomiti/Finisar B<Surveyor> captures, Novell B<LANalyzer>
25 captures, Network General/Network Associates DOS-based B<Sniffer>
26 (compressed or uncompressed) captures, Microsoft B<Network Monitor>
27 captures, files from AIX's B<iptrace>, Cinco Networks B<NetXRay>
28 captures, captures from Network Associates Windows-based B<Sniffer>, AG
29 Group/WildPackets B<EtherPeek>/B<TokenPeek>/B<AiroPeek>/B<EtherHelp>
30 captures, captures from B<RADCOM>'s WAN/LAN analyzer, B<Lucent/Ascend>
31 router debug output, files from HP-UX's B<nettl>, the dump output from
32 B<Toshiba's> ISDN routers, the output from B<i4btrace> from the ISDN4BSD
33 project, the output in B<IPLog> format from the Cisco Secure Intrusion
34 Detection System, B<pppd logs> (pppdump format), the output from VMS's
35 B<TCPIPtrace>/B<TCPtrace>/B<UCX$TRACE> utilities, the text output from
36 the B<DBS Etherwatch> VMS utility, traffic capture files from Visual
37 Networks' Visual UpTime, the output from B<CoSine> L2 debug, the output
38 from Accellent's 5Views LAN agents, captures in Endace Measurement
39 Systems' ERF format, Linux Bluez Bluetooth stack B<hcidump -w> traces,
40 captures from Network Instruments Observer version 9, and traces from
41 the EyeSDN USB S0.  There is no need to tell B<Mergecap> what type of
42 file you are reading; it will determine the file type by itself. 
43 B<Mergecap> is also capable of reading any of these file formats if they
44 are compressed using gzip.  B<Mergecap> recognizes this directly from
45 the file; the '.gz' extension is not required for this purpose.
46
47 By default, it writes the capture file in B<libpcap> format, and writes
48 all of the packets in both input capture files to the output file.  The
49 B<-F> flag can be used to specify the format in which to write the
50 capture file; it can write the file in B<libpcap> format (standard
51 B<libpcap> format, a modified format used by some patched versions of
52 B<libpcap>, the format used by Red Hat Linux 6.1, or the format used by
53 SuSE Linux 6.3), B<snoop> format, uncompressed B<Sniffer> format,
54 Microsoft B<Network Monitor> 1.x format, the format used by
55 Windows-based versions of the B<Sniffer> software, and the format used
56 by Visual Networks' software.
57
58 Packets from the input files are merged in chronological order based on
59 each frame's timestamp, unless the B<-a> flag is specified.  B<Mergecap>
60 assumes that frames within a single capture file are already stored in
61 chronological order.  When the B<-a> flag is specified, packets are
62 copied directly from each input file to the output file, independent of
63 each frame's timestamp.
64
65 If the B<-s> flag is used to specify a snapshot length, frames in the
66 input file with more captured data than the specified snapshot length
67 will have only the amount of data specified by the snapshot length
68 written to the output file.  This may be useful if the program that is
69 to read the output file cannot handle packets larger than a certain size
70 (for example, the versions of snoop in Solaris 2.5.1 and Solaris 2.6
71 appear to reject Ethernet frames larger than the standard Ethernet MTU,
72 making them incapable of handling gigabit Ethernet captures if jumbo
73 frames were used).
74
75 The output file frame encapsulation type is set to the type of the input
76 files, if all input files have the same type.  If not all of the input
77 files have the same frame encapsulation type, the output file type is
78 set to WTAP_ENCAP_PER_PACKET.  Note that some capture file formats, most
79 notably B<libpcap>, do not currently support WTAP_ENCAP_PER_PACKET.
80 This combination will cause the output file creation to fail.
81
82 If the B<-T> flag is used to specify a frame encapsulation type, the
83 encapsulation type of the output capture file will be forced to the
84 specified type, rather than being the type appropriate to the
85 encapsulation type of the input capture files.  Note that this merely
86 forces the encapsulation type of the output file to be the specified
87 type; the packet headers of the packets will not be translated from the
88 encapsulation type of the input capture file to the specified
89 encapsulation type (for example, it will not translate an Ethernet
90 capture to an FDDI capture if an Ethernet capture is read and 'B<-T
91 fddi>' is specified).
92
93 =head1 OPTIONS
94
95 =over 4
96
97 =item -w
98
99 Sets the output filename.
100
101 =item -F
102
103 Sets the file format of the output capture file.
104
105 =item -T
106
107 Sets the packet encapsulation type of the output capture file.
108
109 =item -a
110
111 Causes the frame timestamps to be ignored, writing all packets from the
112 first input file followed by all packets from the second input file.  By
113 default, when B<-a> is not specified, the contents of the input files
114 are merged in chronological order based on each frame's timestamp.
115 Note: when merging, B<mergecap> assumes that packets within a capture
116 file are already in chronological order.
117
118 =item -v
119
120 Causes B<mergecap> to print a number of messages while it's working.
121
122 =item -s
123
124 Sets the snapshot length to use when writing the data.
125
126 =item -h
127
128 Prints the version and options and exits.
129
130 =head1 SEE ALSO
131
132 I<tcpdump(8)>, I<pcap(3)>, I<ethereal(1)>, I<editcap(1)>
133
134 =head1 NOTES
135
136 B<Mergecap> is based heavily upon B<editcap> by Richard Sharpe
137 <sharpe[AT]ns.aus.com> and Guy Harris <guy[AT]alum.mit.edu>.
138
139 B<Mergecap> is part of the B<Ethereal> distribution.  The latest version
140 of B<Ethereal> can be found at B<http://www.ethereal.com>.
141
142 =head1 AUTHORS
143
144   Original Author
145   -------- ------
146   Scott Renfro             <scott[AT]renfro.org>
147
148
149   Contributors
150   ------------