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|
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
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 @@
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