diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2015-11-07 16:55:16 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2015-11-09 13:41:24 +0100 |
commit | 66e558ed51ff7d3d7bebb5f5d56114df5eb77e96 (patch) | |
tree | 4740acd0e3e239e415008a93f572b15085e316fe /trafgen.8 | |
parent | c6aeff438d452be679cc3ba0a600db1d204b49a6 (diff) |
trafgen: Allow to build packet from command line
Craft packet directly from command line with same syntax as for conf file.
It might be as first step to extend current syntax with specific proto fields.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen.8')
-rw-r--r-- | trafgen.8 | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -7,7 +7,7 @@ trafgen \- a fast, multithreaded network packet generator .PP .SH SYNOPSIS .PP -\fBtrafgen\fR [\fIoptions\fR] +\fBtrafgen\fR [\fIoptions\fR] [\fIpacket\fR] .PP .SH DESCRIPTION .PP @@ -197,6 +197,9 @@ enclosed by opening '{' and closing '}' braces, for example: { /* packet 1 content goes here ... */ } { /* packet 2 content goes here ... */ } .PP +Alternatively, packets can also be specified directly on the command line, using +the same syntax as used in the configuration files. +.PP When trafgen is started using multiple CPUs (default), then each of those packets will be scheduled for transmission on all CPUs by default. However, it is possible to tell trafgen to schedule a packet only on a particular CPU: @@ -397,6 +400,9 @@ Send out packets generated from the configuration file ''tcp_syn.cfg'' via the ''eth0'' networking device. After setting up the ring for transmission, drop credentials to the non-root user/group bob/bob. .PP +.SS trafgen --dev eth0 '{ fill(0xff, 6), 0x00, 0x02, 0xb3, rnd(3), c16(0x0800), fill(0xca, 64) }' -n 1 +Send out 1 invaid IPv4 packet built from command line to all hosts. +.PP .SH NOTE .PP trafgen can saturate a Gigabit Ethernet link without problems. As always, |