From 82a3c204c6f11224b3f4da9246e96bed0c9bb8b8 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 7 Feb 2017 10:15:57 +0200 Subject: trafgen: Allow send packets from pcap file 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 Signed-off-by: Tobias Klauser --- trafgen_conf.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'trafgen_conf.h') diff --git a/trafgen_conf.h b/trafgen_conf.h index 61da012..2af830d 100644 --- a/trafgen_conf.h +++ b/trafgen_conf.h @@ -3,6 +3,7 @@ #include #include +#include #include #include "trafgen_proto.h" @@ -40,6 +41,7 @@ struct packet { size_t len; struct proto_hdr *headers[PROTO_MAX_LAYERS]; size_t headers_count; + struct timespec tstamp; }; struct packet_dyn { @@ -78,5 +80,6 @@ extern void set_fill(uint8_t val, size_t len); extern struct packet *current_packet(void); extern uint32_t current_packet_id(void); extern struct packet *packet_get(uint32_t id); +extern void realloc_packet(void); #endif /* TRAFGEN_CONF */ -- cgit v1.2.3-54-g00ecf