diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2016-04-22 16:38:51 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-04-22 16:38:51 +0200 |
commit | 0cf15c320f9211d59b055157c895537e4b682a07 (patch) | |
tree | b7ff6df8f735a110ec572c12e25ef0e3740ea26e | |
parent | 5f06441c06d46499743689468971ecea9e14f984 (diff) |
man: trafgen: Add example program, rewritten using the trafgen functions
Show how the trafgen header generation functions can make a trafgen
script much more concise by rewritting Jesper's example using these
functions.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | trafgen.8 | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -647,6 +647,19 @@ Another real-world example by Jesper Dangaard Brouer [1]: .PP [1] http://thread.gmane.org/gmane.linux.network/257155 .PP +The above example rewritten using the header generation functions: +.PP + { + # --- ethernet header --- + eth(da=00:1b:21:3c:9d:f8, da=90:e2:ba:0a:56:b4, proto=0x0800) + # --- ip header --- + ipv4(len=40, id=drnd(2), mf, ttl=64, proto=17, sa=192.168.51.1, da=192.168.51.2) + # --- udp header --- + udp(sport=48054, dport=43514, len=20, csum=0) + # payload + 'A', fill(0x41, 11), + } +.PP .SH USAGE EXAMPLE .PP .SS trafgen --dev eth0 --conf trafgen.cfg |