summaryrefslogtreecommitdiff
path: root/trafgen.8
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-11-07 16:55:16 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-11-09 13:41:24 +0100
commit66e558ed51ff7d3d7bebb5f5d56114df5eb77e96 (patch)
tree4740acd0e3e239e415008a93f572b15085e316fe /trafgen.8
parentc6aeff438d452be679cc3ba0a600db1d204b49a6 (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.88
1 files changed, 7 insertions, 1 deletions
diff --git a/trafgen.8 b/trafgen.8
index 84ef518..18b2b61 100644
--- a/trafgen.8
+++ b/trafgen.8
@@ -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,