diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-01-11 10:14:32 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-01-11 10:14:32 +0000 |
commit | 7a0e7d12d20ebedb1a82dbededac9d73da3fd542 (patch) | |
tree | 533de1c3a1b0cc4ad59d441813e17d6d65b1e58e /text2pcap.c | |
parent | 6d3b121deb3a1d2e3e2fab2387f88f48d995e046 (diff) |
update usage text
svn path=/trunk/; revision=16999
Diffstat (limited to 'text2pcap.c')
-rw-r--r-- | text2pcap.c | 99 |
1 files changed, 55 insertions, 44 deletions
diff --git a/text2pcap.c b/text2pcap.c index 9c5bedbb57..5c282024b9 100644 --- a/text2pcap.c +++ b/text2pcap.c @@ -988,56 +988,67 @@ static void help (char *progname) { fprintf(stderr, + "Text2pcap %s" +#ifdef SVNVERSION + " (" SVNVERSION ")" +#endif + "\n" + "Generate a capture file from an ASCII hexdump of packets.\n" + "See http://www.ethereal.com for more information.\n" "\n" - "Usage: %s [-h] [-d] [-q] [-o h|o] [-l typenum] [-e l3pid] [-i proto] \n" - " [-m max-packet] [-u srcp,destp] [-T srcp,destp] [-s srcp,destp,tag]\n" - " [-S srcp,destp,ppi] [-t timefmt] <input-filename> <output-filename>\n" + "Usage: text2pcap [options] <input-filename> <output-filename>\n" "\n" - "where <input-filename> specifies input filename (use - for standard input)\n" + "where <input-filename> specifies input filename (use - for standard input)\n" " <output-filename> specifies output filename (use - for standard output)\n" "\n" - "[options] are one or more of the following \n" + "Input:\n" + " -o hex|oct parse offsets as (h)ex or (o)ctal, default is hex\n" + " -t <timefmt> treats the text before the packet as a date/time code;\n" + " the specified argument is a format string of the sort \n" + " supported by strptime.\n" + " Example: The time \"10:15:14.5476\" has the format code\n" + " \"%%H:%%M:%%S.\"\n" + " NOTE: The subsecond component delimiter must be given\n" + " (.) but no pattern is required; the remaining number\n" + " is assumed to be fractions of a second.\n" + "\n" + "Output:\n" + " -l <typenum> link-layer type number. Default is 1 (Ethernet). \n" + " See the file net/bpf.h for list of numbers.\n" + " -m <max-packet> max packet length in output, default is %d\n" + "\n" + "Prepend dummy header:\n" + " -e <l3pid> prepend dummy Ethernet II header with specified L3PID\n" + " (in HEX)\n" + " Example: -e 0x800\n" + " -i <proto> prepend dummy IP header with specified IP protocol\n" + " (in DECIMAL). \n" + " Automatically prepends Ethernet header as well.\n" + " Example: -i 46\n" + " -u <srcp>,<destp> prepend dummy UDP header with specified\n" + " dest and source ports (in DECIMAL).\n" + " Automatically prepends Ethernet & IP headers as well\n" + " Example: -u 30,40\n" + " -T <srcp>,<destp> prepend dummy TCP header with specified \n" + " dest and source ports (in DECIMAL).\n" + " Automatically prepends Ethernet & IP headers as well\n" + " Example: -T 50,60\n" + " -s <srcp>,<dstp>,<tag> prepend dummy SCTP header with specified \n" + " dest/source ports and verification tag (in DECIMAL).\n" + " Automatically prepends Ethernet & IP headers as well\n" + " Example: -s 30,40,34\n" + " -S <srcp>,<dstp>,<ppi> prepend dummy SCTP header with specified \n" + " dest/source ports and verification tag 0. \n" + " It also prepends a dummy SCTP DATA \n" + " chunk header with payload protocol identifier ppi.\n" + " Example: -S 30,40,34\n" "\n" - " -h : Display this help message \n" - " -d : Generate detailed debug of parser states \n" - " -o hex|oct : Parse offsets as (h)ex or (o)ctal. Default is hex\n" - " -l typenum : Specify link-layer type number. Default is 1 (Ethernet). \n" - " See net/bpf.h for list of numbers.\n" - " -q : Generate no output at all (automatically turns off -d)\n" - " -e l3pid : Prepend dummy Ethernet II header with specified L3PID (in\n" - " HEX)\n" - " Example: -e 0x800\n" - " -i proto : Prepend dummy IP header with specified IP protocol (in\n" - " DECIMAL). \n" - " Automatically prepends Ethernet header as well.\n" - " Example: -i 46\n" - " -m max-packet : Max packet length in output, default is %d\n" - " -u srcp,destp : Prepend dummy UDP header with specified dest and source ports\n" - " (in DECIMAL).\n" - " Automatically prepends Ethernet and IP headers as well\n" - " Example: -u 30,40\n" - " -T srcp,destp : Prepend dummy TCP header with specified dest and source ports\n" - " (in DECIMAL).\n" - " Automatically prepends Ethernet and IP headers as well\n" - " Example: -T 50,60\n" - " -s srcp,dstp,tag: Prepend dummy SCTP header with specified dest/source ports\n" - " and verification tag (in DECIMAL).\n" - " Automatically prepends Ethernet and IP headers as well\n" - " Example: -s 30,40,34\n" - " -S srcp,dstp,ppi: Prepend dummy SCTP header with specified dest/source ports\n" - " and verification tag 0. It also prepends a dummy SCTP DATA\n" - " chunk header with payload protocol identifier ppi.\n" - " Example: -S 30,40,34\n" - " -t timefmt : Treats the text before the packet as a date/time code; the\n" - " specified argument is a format string of the sort supported\n" - " by strptime.\n" - " Example: The time \"10:15:14.5476\" has the format code\n" - " \"%%H:%%M:%%S.\"\n" - " NOTE: The subsecond component delimiter must be specified\n" - " (.) but no pattern is required; the remaining number\n" - " is assumed to be fractions of a second.\n" + "Miscellaneous:\n" + " -h display this help and exit\n" + " -d detailed debug of parser states \n" + " -q generate no output at all (automatically turns off -d)\n" "", - progname, MAX_PACKET); + VERSION, MAX_PACKET); exit(-1); } |