From 6df423d0be45e8943eb0194ee3565f0bd2638aeb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 27 Apr 2003 00:41:52 +0000 Subject: From Matthijs Melchior: - added option -m to set maximum packet length - added option -T to generate TCP headers - UDP headers now have a correct checksum - default capture timestamp is current time, usec field counts packets - UDP and TCP headers are mutually exclusive - changed etherenet addresses, now sends from 1 -> 2 .... svn path=/trunk/; revision=7571 --- doc/text2pcap.pod | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'doc/text2pcap.pod') diff --git a/doc/text2pcap.pod b/doc/text2pcap.pod index ec93bfa771..0947b20f99 100644 --- a/doc/text2pcap.pod +++ b/doc/text2pcap.pod @@ -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 is a program that reads in an ASCII hex dump and writes the data described into a B-style capture file. B can read hexdumps with multiple packets in them, and build a capture file of multiple packets. B 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 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 -- cgit v1.2.3