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 ]>
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.
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.
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
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