From 59e69bf9106e6f085f90cb33ac7241e3ded41767 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 26 Jul 2016 22:35:07 +0300 Subject: trafgen: proto: Reference to packet from struct proto_hdr Using of current_packet() is not possible for dynamically updated fields so we need to keep the packet index in proto_hdr struct to reference the correct packet. Signed-off-by: Vadim Kochan Signed-off-by: Tobias Klauser --- trafgen_conf.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'trafgen_conf.h') diff --git a/trafgen_conf.h b/trafgen_conf.h index 50b437b..efce29c 100644 --- a/trafgen_conf.h +++ b/trafgen_conf.h @@ -63,5 +63,7 @@ extern void cleanup_packets(void); 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); #endif /* TRAFGEN_CONF */ -- cgit v1.2.3-54-g00ecf