home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Hacking / wireshark-win32-1.2.4.exe / mergecap.html < prev    next >
Encoding:
Extensible Markup Language  |  2009-11-16  |  7.8 KB  |  190 lines

  1. <?xml version="1.0" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <title>mergecap - The Wireshark Network Analyzer 1.2.4"</title>
  6. <link rel="stylesheet" href="ws.css" type="text/css" />
  7. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  8. <link rev="made" href="mailto:rurban@x-ray.at" />
  9. </head>
  10.  
  11. <body>
  12.  
  13.  
  14. <!-- INDEX BEGIN -->
  15. <div name="index">
  16. <p><a name="__index__"></a></p>
  17. <!--
  18.  
  19. <ul>
  20.  
  21.     <li><a href="#name">NAME</a></li>
  22.     <li><a href="#synopsis">SYNOPSIS</a></li>
  23.     <li><a href="#description">DESCRIPTION</a></li>
  24.     <li><a href="#options">OPTIONS</a></li>
  25.     <li><a href="#see_also">SEE ALSO</a></li>
  26.     <li><a href="#notes">NOTES</a></li>
  27.     <li><a href="#authors">AUTHORS</a></li>
  28. </ul>
  29.  
  30. -->
  31.  
  32.  
  33. </div>
  34. <!-- INDEX END -->
  35.  
  36. <p>
  37. </p>
  38. <h1><a name="name">NAME</a></h1>
  39. <p>mergecap - Merges two or more capture files into one</p>
  40. <p>
  41. </p>
  42. <hr />
  43. <h1><a name="synopsis">SYNOPSIS</a></h1>
  44. <p><strong>mergecap</strong>
  45. [ <strong>-a</strong> ]
  46. [ <strong>-F</strong> <<em>file format</em>> ]
  47. [ <strong>-h</strong> ]
  48. [ <strong>-s</strong> <<em>snaplen</em>> ]
  49. [ <strong>-T</strong> <<em>encapsulation type</em>> ]
  50. [ <strong>-v</strong> ]
  51. <strong>-w</strong> <<em>outfile</em>>|-
  52. <<em>infile</em>>
  53. <em>...</em></p>
  54. <p>
  55. </p>
  56. <hr />
  57. <h1><a name="description">DESCRIPTION</a></h1>
  58. <p><strong>Mergecap</strong> is a program that combines multiple saved capture files into
  59. a single output file specified by the <strong>-w</strong> argument.  <strong>Mergecap</strong> knows
  60. how to read <strong>libpcap</strong> capture files, including those of <strong>tcpdump</strong>,
  61. <strong>Wireshark</strong>, and other tools that write captures in that format.</p>
  62. <p>By default, <strong>Mergecap</strong> writes the capture file in <strong>libpcap</strong> format, and writes
  63. all of the packets from the input capture files to the output file.</p>
  64. <p><strong>Mergecap</strong> is able to detect, read and write the same capture files that 
  65. are supported by <strong>Wireshark</strong>.
  66. The input files don'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 <code>wireshark(1)</code> or
  69. <a href="http://www.wireshark.org/docs/man-pages/wireshark.html">http://www.wireshark.org/docs/man-pages/wireshark.html</a>
  70. is a detailed description of the way <strong>Wireshark</strong> handles this, which is
  71. the same way <strong>Mergecap</strong> handles this.</p>
  72. <p><strong>Mergecap</strong> can write the file in several output formats.
  73. The <strong>-F</strong> flag can be used to specify the format in which to write the
  74. capture file, <strong>mergecap -F</strong> provides a list of the available output 
  75. formats.</p>
  76. <p>Packets from the input files are merged in chronological order based on
  77. each frame's timestamp, unless the <strong>-a</strong> flag is specified.  <strong>Mergecap</strong>
  78. assumes that frames within a single capture file are already stored in
  79. chronological order.  When the <strong>-a</strong> flag is specified, packets are
  80. copied directly from each input file to the output file, independent of
  81. each frame's timestamp.</p>
  82. <p>The output file frame encapsulation type is set to the type of the input
  83. files if all input files have the same type.  If not all of the input
  84. files have the same frame encapsulation type, the output file type is
  85. set to WTAP_ENCAP_PER_PACKET.  Note that some capture file formats, most
  86. notably <strong>libpcap</strong>, do not currently support WTAP_ENCAP_PER_PACKET.
  87. This combination will cause the output file creation to fail.</p>
  88. <p>
  89. </p>
  90. <hr />
  91. <h1><a name="options">OPTIONS</a></h1>
  92. <dl>
  93. <dt><strong><a name="a" class="item">-a</a></strong></dt>
  94.  
  95. <dd>
  96. <p>Causes the frame timestamps to be ignored, writing all packets from the
  97. first input file followed by all packets from the second input file.  By
  98. default, when <strong>-a</strong> is not specified, the contents of the input files
  99. are merged in chronological order based on each frame's timestamp.</p>
  100. <p>Note: when merging, <strong>mergecap</strong> assumes that packets within a capture
  101. file are already in chronological order.</p>
  102. </dd>
  103. <dt><strong><a name="f_file_format" class="item">-F  <file format></a></strong></dt>
  104.  
  105. <dd>
  106. <p>Sets the file format of the output capture file. <strong>Mergecap</strong> can write 
  107. the file in several formats; <strong>mergecap -F</strong> provides a list of the 
  108. available output formats. The default is to use the file format of the 
  109. first input file.</p>
  110. </dd>
  111. <dt><strong><a name="h" class="item">-h</a></strong></dt>
  112.  
  113. <dd>
  114. <p>Prints the version and options and exits.</p>
  115. </dd>
  116. <dt><strong><a name="s_snaplen" class="item">-s  <snaplen></a></strong></dt>
  117.  
  118. <dd>
  119. <p>Sets the snapshot length to use when writing the data.
  120. If the <strong>-s</strong> flag is used to specify a snapshot length, frames in the
  121. input file with more captured data than the specified snapshot length
  122. will have only the amount of data specified by the snapshot length
  123. written to the output file.  This may be useful if the program that is
  124. to read the output file cannot handle packets larger than a certain size
  125. (for example, the versions of snoop in Solaris 2.5.1 and Solaris 2.6
  126. appear to reject Ethernet frames larger than the standard Ethernet MTU,
  127. making them incapable of handling gigabit Ethernet captures if jumbo
  128. frames were used).</p>
  129. </dd>
  130. <dt><strong><a name="v" class="item">-v</a></strong></dt>
  131.  
  132. <dd>
  133. <p>Causes <strong>mergecap</strong> to print a number of messages while it's working.</p>
  134. </dd>
  135. <dt><strong><a name="w_outfile" class="item">-w  <outfile>|-</a></strong></dt>
  136.  
  137. <dd>
  138. <p>Sets the output filename. If the name is '<strong>-</strong>', stdout will be used.
  139. This setting is mandatory.</p>
  140. </dd>
  141. <dt><strong><a name="t_encapsulation_type" class="item">-T  <encapsulation type></a></strong></dt>
  142.  
  143. <dd>
  144. <p>Sets the packet encapsulation type of the output capture file.
  145. If the <strong>-T</strong> flag is used to specify a frame encapsulation type, the
  146. encapsulation type of the output capture file will be forced to the
  147. specified type, rather than being the type appropriate to the
  148. encapsulation type of the input capture files.</p>
  149. <p>Note that this merely
  150. forces the encapsulation type of the output file to be the specified
  151. type; the packet headers of the packets will not be translated from the
  152. encapsulation type of the input capture file to the specified
  153. encapsulation type (for example, it will not translate an Ethernet
  154. capture to an FDDI capture if an Ethernet capture is read and '<strong>-T
  155. fddi</strong>' is specified).</p>
  156. </dd>
  157. </dl>
  158. <p>
  159. </p>
  160. <hr />
  161. <h1><a name="see_also">SEE ALSO</a></h1>
  162. <p><code>tcpdump(8)</code>, <code>pcap(3)</code>, <code>wireshark(1)</code>, <code>tshark(1)</code>, <code>dumpcap(1)</code>, <code>editcap(1)</code>,
  163. text2pcap(1)</p>
  164. <p>
  165. </p>
  166. <hr />
  167. <h1><a name="notes">NOTES</a></h1>
  168. <p><strong>Mergecap</strong> is based heavily upon <strong>editcap</strong> by Richard Sharpe
  169. <sharpe[AT]ns.aus.com> and Guy Harris <guy[AT]alum.mit.edu>.</p>
  170. <p><strong>Mergecap</strong> is part of the <strong>Wireshark</strong> distribution.  The latest version
  171. of <strong>Wireshark</strong> can be found at <a href="http://www.wireshark.org">http://www.wireshark.org</a>.</p>
  172. <p>HTML versions of the Wireshark project man pages are available at:
  173. <a href="http://www.wireshark.org/docs/man-pages">http://www.wireshark.org/docs/man-pages</a>.</p>
  174. <p>
  175. </p>
  176. <hr />
  177. <h1><a name="authors">AUTHORS</a></h1>
  178. <pre>
  179.   Original Author
  180.   -------- ------
  181.   Scott Renfro             <scott[AT]renfro.org></pre>
  182. <pre>
  183.   Contributors
  184.   ------------
  185.   Bill Guyton              <guyton[AT]bguyton.com></pre>
  186.  
  187. </body>
  188.  
  189. </html>
  190.