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