summaryrefslogtreecommitdiff
path: root/trafgen_proto.h
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-08-13 02:11:16 +0300
committerTobias Klauser <tklauser@distanz.ch>2016-09-21 09:56:15 +0200
commit81ca1cd1c362ae536a6bee260827c395a78dc637 (patch)
tree6ff75b9b554f69e935c43fe721a1b7bc5338dffe /trafgen_proto.h
parent149e070148b14f34688e71a4c958ea844ff5c7c3 (diff)
trafgen: proto: Improve to find lower header by index
Extended struct proto_hdr with 'index' field which is used for faster lookup of lower header without doing a loop. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_proto.h')
-rw-r--r--trafgen_proto.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/trafgen_proto.h b/trafgen_proto.h
index 000938c..35a55d5 100644
--- a/trafgen_proto.h
+++ b/trafgen_proto.h
@@ -46,6 +46,7 @@ struct proto_hdr {
const struct proto_ops *ops;
uint16_t pkt_offset;
uint32_t pkt_id;
+ uint32_t index;
struct proto_field *fields;
size_t fields_count;
bool is_csum_valid;