[netsniff-ng] [PATCH v2 2/3] trafgen: Allow send packets from pcap file

2017-02-07 Thread Vadim Kochan
Add ability to send packets from pcap file if it has ".pcap" extension via "-i,--in" option. By default packet sending is delayed considering original packets timestamps if no rate or delay is specified via -b/-t options. Signed-off-by: Vadim Kochan --- trafgen.c|

[netsniff-ng] [PATCH v2 1/3] pcap_io: Add function to get packet timestamp

2017-02-07 Thread Vadim Kochan
Add pcap_get_tstamp(...) function to get packet's timestamp considering different packet types & bytes order. Signed-off-by: Vadim Kochan --- pcap_io.h | 53 + 1 file changed, 53 insertions(+) diff --git a/pcap_io.h

[netsniff-ng] [PATCH v2 3/3] trafgen: man: Add description with pcap file for -i, --in option

2017-02-07 Thread Vadim Kochan
Update -i, --in option with pcap file as input parameter. Signed-off-by: Vadim Kochan --- trafgen.8 | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trafgen.8 b/trafgen.8 index e09b7a0..fd9788a 100644 --- a/trafgen.8 +++ b/trafgen.8 @@ -66,10 +66,13 @@

[netsniff-ng] [PATCH v2 0/3] trafgen: Send packets from pcap file

2017-02-07 Thread Vadim Kochan
Allow to send packets at specified rate from ".pcap" file which might be speified via -i,--in options. By default packets will be send at original rate considering packet's timestamp. v2: 1) Use timespec in pcap_get_tstamp(...) 2) Use ctx.pcap_in char * member to check if input pcap