From Matthijs Melchior:
[obnox/wireshark/wip.git] / doc / text2pcap.pod
index ec93bfa77180b1b5fa2ad067eb6145e212b803b5..0947b20f99a4c0e3bf0b75233a4d8db17532e7bf 100644 (file)
@@ -13,7 +13,9 @@ S<[ B<-o> hex|oct ]>
 S<[ B<-l> typenum ]>
 S<[ B<-e> l3pid ]>
 S<[ B<-i> proto ]>
+S<[ B<-m> max-packet ]>
 S<[ B<-u> srcport,destport ]>
+S<[ B<-T> srcport,destport ]>
 S<[ B<-s> srcport,destport,tag ]>
 S<[ B<-S> srcport,destport,ppi ]>
 S<[ B<-t> timefmt ]>
@@ -26,7 +28,7 @@ B<Text2pcap> is a program that reads in an ASCII hex dump and writes
 the data described into a B<libpcap>-style capture file. B<text2pcap>
 can read hexdumps with multiple packets in them, and build a capture
 file of multiple packets. B<text2pcap> is also capable of generating
-dummy Ethernet, IP and UDP headers, in order to build fully
+dummy Ethernet, IP and UDP or TCP headers, in order to build fully
 processable packet dumps from hexdumps of application-level data
 only. 
 
@@ -75,7 +77,7 @@ type etc.
 B<Text2pcap> also allows the user to read in dumps of
 application-level data, by inserting dummy L2, L3 and L4 headers
 before each packet. The user can elect to insert Ethernet headers,
-Ethernet and IP, or Ethernet, IP and UDP headers before each
+Ethernet and IP, or Ethernet, IP and UDP/TCP headers before each
 packet. This allows Ethereal or any other full-packet decoder to
 handle these dumps.
 
@@ -131,6 +133,15 @@ an IP header. Note that this automatically includes an appropriate
 Ethernet header as well. Example: I<-i 46> to specify an RSVP packet
 (IP protocol 46).
 
+=item -m max-packet
+
+Set the maximum packet length, default is 64000.
+Useful for testing various packet boundaries when only an application
+level datastream is available.  Example:
+ od -Ax -tx1 stream | text2pcap -m1460 -T1234,1234 - stream.pcap
+will convert from plain datastream format to a sequence of Ethernet
+TCP packets.
+
 =item -u srcport,destport
 
 Include dummy UDP headers before each packet. Specify the source and
@@ -140,6 +151,15 @@ IP or Ethernet headers. Note that this automatically includes
 appropriate Ethernet and IP headers with each packet. Example: I<-u
 1000,69> to make the packets look like TFTP/UDP packets.
 
+=item -T srcport,destport
+
+Include dummy TCP headers before each packet. Specify the source and
+destination TCP ports for the packet in decimal. Use this option if
+your dump is the TCP payload of a packet but does not include any TCP,
+IP or Ethernet headers. Note that this automatically includes
+appropriate Ethernet and IP headers with each packet.
+Sequence numbers will start a 0.
+
 =item -s srcport,destport,tag
 
 Include dummy SCTP headers before each packet.  Specify, in decimal, the