diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2016-08-13 02:11:16 +0300 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-09-21 09:56:15 +0200 |
commit | 81ca1cd1c362ae536a6bee260827c395a78dc637 (patch) | |
tree | 6ff75b9b554f69e935c43fe721a1b7bc5338dffe /trafgen_proto.h | |
parent | 149e070148b14f34688e71a4c958ea844ff5c7c3 (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.h | 1 |
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; |