trafgen: Allow to generate packets to output pcap file
commit78c13b71e196a107eaa4ec00bb40b062929a6a88
authorVadim Kochan <vadim4j@gmail.com>
Wed, 7 Jun 2017 19:24:52 +0000 (7 22:24 +0300)
committerTobias Klauser <tklauser@distanz.ch>
Fri, 9 Jun 2017 13:50:06 +0000 (9 15:50 +0200)
tree39598c8a9bd49e1a3d13247c288c04ea0778d69d
parent322deaf9bae5dc87b174c4369e7d00b6bb0bf641
trafgen: Allow to generate packets to output pcap file

Add trafgen_dev.c module which provides generic way of
reading and writing packets to/from networking device or a pcap file.

Also allow to handle output pcap file via '-o, --out, --dev' option.

It might be useful in future for testing some link protocols which is
not easy to capture (e.g. wlan packets) w/o having some special setup.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
[tklauser: fix whitespace issues]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
trafgen.8
trafgen.c
trafgen/Makefile
trafgen_dev.c [new file with mode: 0644]
trafgen_dev.h [new file with mode: 0644]
trafgen_l2.c
trafgen_l3.c
trafgen_proto.c
trafgen_proto.h