From f8665d43b8e1e33a92b7529d49e3e8c8b1c3c586 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 17 May 2018 17:02:31 +0200 Subject: man: reformat all man pages - use .TP for option and example labels - use .BR for references to other manpages, also in description texts - highlight options using .B in description texts - misc. cleanups Signed-off-by: Tobias Klauser --- trafgen.8 | 227 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 123 insertions(+), 104 deletions(-) (limited to 'trafgen.8') diff --git a/trafgen.8 b/trafgen.8 index f720043..ead5dd0 100644 --- a/trafgen.8 +++ b/trafgen.8 @@ -7,12 +7,13 @@ trafgen \- a fast, multithreaded network packet generator .PP .SH SYNOPSIS .PP -\fBtrafgen\fR [\fIoptions\fR] [\fIpacket\fR] +\fBtrafgen\fP [\fIoptions\fP] [\fIpacket\fP] .PP .SH DESCRIPTION .PP trafgen is a fast, zero-copy network traffic generator for debugging, -performance evaluation, and fuzz-testing. trafgen utilizes the packet(7) +performance evaluation, and fuzz-testing. trafgen utilizes the +.BR packet (7) socket interface of Linux which postpones complete control over packet data and packet headers into the user space. It has a powerful packet configuration language, which is rather low-level and not limited to particular protocols. @@ -22,10 +23,14 @@ various kinds of load testing in order to analyze and subsequently improve systems behaviour under DoS attack scenarios, for instance. .PP trafgen is Linux specific, meaning there is no support for other operating -systems, same as netsniff-ng(8), thus we can keep the code footprint quite -minimal and to the point. trafgen makes use of packet(7) socket's TX_RING -interface of the Linux kernel, which is a mmap(2)'ed ring buffer shared between -user and kernel space. +systems, same as +.BR netsniff-ng (8), +thus we can keep the code footprint quite minimal and to the point. trafgen +makes use of +.BR packet (7) +socket's TX_RING interface of the Linux kernel, which is a +.BR mmap (2)'ed +ring buffer shared between user and kernel space. .PP By default, trafgen starts as many processes as available CPUs, pins each of them to their respective CPU and sets up the ring buffer each in their own @@ -60,48 +65,49 @@ where arithmetic (basic operations, bit operations, bit shifting, ...) on consta expressions is being reduced to a single constant on compile time. Other features are ''fill'' macros, where a packet can be filled with n bytes by a constant, a compile-time random number or run-time random number (as mentioned with fuzz -testing). Also, netsniff-ng(8) is able to convert a pcap file into a trafgen -configuration file, thus such a configuration can then be further tweaked for a -given scenario. +testing). Also, +.BR netsniff-ng (8) +is able to convert a pcap file into a trafgen configuration file, thus such a +configuration can be further tweaked for a given scenario. .PP .SH OPTIONS -.PP -.SS -i , -c , --in , --conf +.TP +.B -i , -c , --in , --conf Defines the input configuration file that can either be passed as a normal plain text file or via stdin (''-''). Note that currently, if a configuration is passed through stdin, only 1 CPU will be used. -It is also possible to specify PCAP file with .pcap extension via -i,--in option, -by default packets will be sent at rate considering timestamp from PCAP file which -might be reset via -b/-t options. -.PP -.SS -o , -d , --out , --dev +It is also possible to specify PCAP file with .pcap extension via +\fB-i\fP/\fB--in\fP option, by default packets will be sent at rate considering +timestamp from PCAP file which might be reset via the \fB-b\fP or \fB-t\fP option. +.TP +.B -o , -d , --out , --dev Defines the outgoing networking device such as eth0, wlan0 and others or a *.pcap or *.cfg file. Pcap and configuration files are identified by extension. -.PP -.SS -p, --cpp +.TP +.B -p, --cpp Pass the packet configuration to the C preprocessor before reading it into trafgen. This allows #define and #include directives (e.g. to include definitions from system headers) to be used in the trafgen configuration file. -.PP -.SS -D =, --define = +.TP +.B -D =, --define = Add macro definition for the C preprocessor to use it within trafgen file. This -option is used in combination with the -p,--cpp option. -.PP -.SS -J, --jumbo-support +option is used in combination with the \fB-p\fP/\fB--cpp\fP option. +.TP +.B -J, --jumbo-support By default trafgen's ring buffer frames are of a fixed size of 2048 bytes. This means that if you're expecting jumbo frames or even super jumbo frames to pass your line, then you will need to enable support for that with the help of this option. However, this has the disadvantage of a performance regression and a bigger memory footprint for the ring buffer. -.PP -.SS -R, --rfraw +.TP +.B -R, --rfraw In case the output networking device is a wireless device, it is possible with trafgen to turn this into monitor mode and create a mon device that trafgen will be transmitting on instead of wlan, for instance. This enables trafgen to inject raw 802.11 frames. In case if the output is a pcap file the link type is set to 127 (ieee80211 radio tap). -.PP -.SS -s , --smoke-test +.TP +.B -s , --smoke-test In case this option is enabled, trafgen will perform a smoke test. In other words, it will probe the remote end, specified by an address, that is being ''attacked'' with trafgen network traffic, if it is still alive and @@ -113,91 +119,99 @@ packet configuration and the random seed that has been used in order to reproduce a possible bug. This might be useful when testing proprietary embedded devices. It is recommended to have a direct link between the host running trafgen and the host being attacked by trafgen. -.PP -.SS -n <0|uint>, --num <0|uint> +.TP +.B -n <0|uint>, --num <0|uint> Process a number of packets and then exit. If the number of packets is 0, then this is equivalent to infinite packets resp. processing until interrupted. Otherwise, a number given as an unsigned integer will limit processing. -.PP -.SS -r, --rand +.TP +.B -r, --rand Randomize the packet selection of the configuration file. By default, if more than one packet is defined in a packet configuration, packets are scheduled for transmission in a round robin fashion. With this option, they are selected randomly instread. -.PP -.SS -P , --cpus -Specify the number of processes trafgen shall fork(2) off. By default trafgen -will start as many processes as CPUs that are online and pin them to each, -respectively. Allowed value must be within interval [1,CPUs]. -.PP -.SS -t