summaryrefslogtreecommitdiff
path: root/trafgen_conf.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2017-02-07 10:15:57 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-02-09 10:48:56 +0100
commit82a3c204c6f11224b3f4da9246e96bed0c9bb8b8 (patch)
tree1ff925ecd468821bfd832167c63f2c5f5d422232 /trafgen_conf.h
parent71c9b1f9539f3f918269da47233dba9c07d8ec39 (diff)
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 <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_conf.h')
-rw-r--r--trafgen_conf.h3
1 files changed, 3 insertions, 0 deletions
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 <stdint.h>
#include <stdio.h>
+#include <sys/time.h>
#include <sys/types.h>
#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 */