borkmann/netsniff-ng — pull request #61 by jonschipp (2013-03-12 23:52:02+00:00)
Title: "trafgen: added more example types -e <tcp|udp|icmp>"

I had a rough time with this but it's all working. I had just as hard at time sending it to github.

Justification:
I think it would be very useful to have a few more standard config types to generate with -e. This is useful to me anyway. Being able to see multiple examples directly from the tool would aid users, I believe. I had to create my own, which took some time, so I think others can definitely benefit. They can simply copy/paste and modify single or few lines now.

Tested & Working (verified w/ tcpdump) :
./trafgen -e tcp | ./trafgen --in - --out lo --num 1 --cpp
./trafgen -e udp | ./trafgen --in - --out lo --num 1 --cpp
./trafgen -e icmp | ./trafgen --in - --out lo --num 1 --cpp
./trafgen --example tcp | ./trafgen --in - --out lo --num 1 --cpp
./trafgen --example udp | ./trafgen --in - --out lo --num 1 --cpp
./trafgen --example icmp | ./trafgen --in - --out lo --num 1 --cpp

If accepted, and desired, will create one for fuzzing/random e.g. { drnd(1472) }