123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- autogen definitions options;
- copyright = {
- date = "2000-2005";
- owner = "Aaron Turner";
- type = "bsd";
- author = <<- EOText
- Copyright 2000-2005 Aaron Turner
- For support please use the tcpreplay-users@lists.sourceforge.net mailing list.
- EOText;
- };
- package = "tcpreplay";
- prog-name = "tcpreplay";
- prog-title = "Replay network traffic stored in pcap files";
- long-opts;
- gnu-usage;
- help-value = "H";
- save-opts-value = "";
- load-opts-value = "";
- argument = "<pcap_file(s)>";
- config-header = "config.h";
- include = "#include \"defines.h\"\n"
- "#include \"tcpreplay.h\"\n"
- "#include \"common.h\"\n"
- "extern char pcap_version[];\n"
- "extern tcpreplay_opt_t options;\n";
- homerc = "$$/";
- explain = <<- EOExplain
- tcpreplay is a tool for replaying network traffic from files saved with
- tcpdump or other tools which write pcap(3) files.
- EOExplain;
- detail = <<- EODetail
- The basic operation of tcpreplay is to resend all packets from the
- input file(s) at the speed at which they were recorded, or a specified
- data rate, up to as fast as the hardware is capable.
- Optionally, the traffic can be split between two interfaces, written to
- files, filtered and edited in various ways, providing the means to test
- firewalls, NIDS and other network devices.
- EODetail;
- man-doc = <<- EOMan
- .SH "SIGNALS"
- tcpreplay understands the following signals:
- @enumerate
- @item @var{SIGUSR1}
- Suspend tcpreplay
- @item @var{SIGCONT}
- Restart tcpreplay
- @end enumerate
- .SH "SEE ALSO"
- tcpdump(1), tcpprep(1), tcprewrite(1), libnet(3)
- .SH "BUGS"
- tcpreplay can only send packets as fast as your computer's interface,
- processor, disk and system bus will allow.
- Replaying captured traffic may simulate odd or broken conditions on your
- network and cause problems.
- Some operating systems by default do not allow for forging source MAC
- addresses. Please consult your operating system's documentation and the
- tcpreplay FAQ if you experiance this issue.
- EOMan;
- flag = {
- name = dbug;
- value = d;
- arg-type = number;
- max = 1;
- immediate;
- arg-range = "0->5";
- arg-default = 0;
- descrip = "Enable debugging output";
- doc = <<- EOText
- If configured with --enable-debug, then you can specify a verbosity
- level for debugging output. Higher numbers increase verbosity.
- EOText;
- };
- /* Verbose decoding via tcpdump */
- flag = {
- ifdef = HAVE_TCPDUMP;
- name = verbose;
- value = v;
- max = 1;
- immediate;
- descrip = "Print decoded packets via tcpdump to STDOUT";
- settable;
- doc = "";
- };
- flag = {
- ifdef = HAVE_TCPDUMP;
- name = decode;
- flags-must = verbose;
- value = A;
- arg-type = string;
- max = 1;
- descrip = "Arguments passed to tcpdump decoder";
- doc = <<- EOText
- When enabling verbose mode (@var{-v}) you may also specify one or more
- additional arguments to pass to @code{tcpdump} to modify the way packets
- are decoded. By default, -n and -l are used. Be sure to
- quote the arguments like: -A "-axxx" so that they are not interpreted
- by tcpreplay. The following arguments are vaild:
- [ -aAeNqRStuvxX ]
- [ -E spi@ipaddr algo:secret,... ]
- [ -s snaplen ]
- EOText;
- };
- /*
- * Output modifiers: -c
- */
- flag = {
- name = cachefile;
- value = c;
- arg-type = string;
- max = 1;
- descrip = "Split traffic via a tcppep cache file";
- doc = "";
- };
- /*
- * Outputs: -i, -I
- */
- flag = {
- name = intf1;
- value = i;
- arg-type = string;
- max = 1;
- must-set;
- descrip = "Server/primary traffic output interface";
- doc = "";
- };
- flag = {
- name = intf2;
- value = I;
- arg-type = string;
- max = 1;
- flags-must = cachefile;
- descrip = "Client/secondary traffic output interface";
- doc = "";
- };
- /*
- * Limits and loops: -l
- */
- flag = {
- name = loop;
- value = l;
- arg-type = number;
- arg-range = "0->";
- max = 1;
- descrip = "Loop through the capture file X times";
- arg-default = 1;
- doc = "";
- };
- flag = {
- name = pktlen;
- value = L;
- max = 1;
- descrip = "Override the snaplen and use the actual packet len";
- doc = <<- EOText
- By default, tcpreplay will send packets based on the size of the "snaplen"
- stored in the pcap file which is usually the correct thing to do. However,
- occasionally, tools will store more bytes then told to. By specifying this
- option, tcpreplay will ignore the snaplen field and instead try to send
- packets based on the original packet length. Bad things (TM) may happen if
- you specify this option.
- EOText;
- };
- /*
- Do we really need to support this? Adding this support would
- have a slight but non-zero performance hit
-
- flag = {
- name = limit;
- value = L;
- arg-type = number;
- max = 1;
- arg-default = -1;
- arg-range = "0->";
- descrip = "Limit the number of packets to send";
- doc = <<- EOText
- By default, tcpreplay will send all the packets. Alternatively, you can
- specify a maximum number of packets to send.
- EOText;
- };
- */
- /*
- * Replay speed modifiers: -m, -p, -r, -R, -o
- */
- /* note that this is really a float, but autoopts does not support float */
- flag = {
- name = multiplier;
- flags-cant = pps;
- flags-cant = mbps;
- flags-cant = oneatatime;
- flags-cant = topspeed;
- value = m;
- arg-type = string;
- max = 1;
- descrip = "Modify replay speed to a given multiple";
- doc = <<- EOText
- Specify a floating point value to modify the packet replay speed.
- Examples:
- @example
- 2.0 will replay traffic at twice the speed captured
- 0.7 will replay traffic at 70% the speed captured
- @end example
- EOText;
- };
- flag = {
- name = pps;
- flags-cant = multiplier;
- flags-cant = mbps;
- flags-cant = oneatatime;
- flags-cant = topspeed;
- value = p;
- arg-type = number;
- max = 1;
- descrip = "Replay packets at a given packets/sec";
- doc = "";
- };
- flag = {
- name = mbps;
- flags-cant = multiplier;
- flags-cant = pps;
- flags-cant = oneatatime;
- flags-cant = topspeed;
- value = M;
- arg-type = string;
- max = 1;
- descrip = "Replay packets at a given Mbps";
- doc = <<- EOText
- Specify a floating point value for the Mbps rate that tcpreplay
- should send packets at.
- EOText;
- };
- flag = {
- name = topspeed;
- flags-cant = mbps;
- flags-cant = multiplier;
- flags-cant = pps;
- flags-cant = oneatatime;
- value = t;
- descrip = "Replay packets as fast as possible";
- doc = "";
- };
- flag = {
- name = oneatatime;
- flags-cant = mbps;
- flags-cant = pps;
- flags-cant = multiplier;
- flags-cant = topspeed;
- value = o;
- descrip = "Replay one packet at a time for each user input";
- doc = <<- EOText
- Allows you to step through one or more packets at a time.
- EOText;
- };
- flag = {
- name = pid;
- value = P;
- descrip = "Print the PID of tcpreplay at startup";
- flag-code = <<- EOPid
-
- fprintf(stderr, "PID: %hu\n", getpid());
-
- EOPid;
- doc = "";
- };
- flag = {
- name = version;
- value = V;
- descrip = "Print version information";
- flag-code = <<- EOVersion
-
- fprintf(stderr, "tcpreplay version: %s (build %s)", VERSION, svn_version());
- #ifdef DEBUG
- fprintf(stderr, " (debug)");
- #endif
- fprintf(stderr, "\n");
- fprintf(stderr, "Copyright 2001-2006 by Aaron Turner <aturner@synfin.net>\n");
- fprintf(stderr, "Cache file supported: %s\n", CACHEVERSION);
- fprintf(stderr, "Compiled against libnet: %s\n", LIBNET_VERSION);
- fprintf(stderr, "Compiled against libpcap: %s\n", pcap_version);
- #ifdef ENABLE_64BITS
- fprintf(stderr, "64 bit packet counters: enabled\n");
- #else
- fprintf(stderr, "64 bit packet counters: disabled\n");
- #endif
- #ifdef HAVE_TCPDUMP
- fprintf(stderr, "Verbose printing via tcpdump: enabled\n");
- #else
- fprintf(stderr, "Verbose printing via tcpdump: disabled\n");
- #endif
- exit(0);
-
- EOVersion;
- doc = "";
- };
- flag = {
- name = less-help;
- value = "h";
- immediate;
- descrip = "Display less usage information and exit";
- flag-code = <<- EOHelp
-
- USAGE(EXIT_FAILURE);
- EOHelp;
- doc = "";
- };
|