summaryrefslogtreecommitdiff
path: root/trafgen_proto.h
diff options
context:
space:
mode:
Diffstat (limited to 'trafgen_proto.h')
-rw-r--r--trafgen_proto.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/trafgen_proto.h b/trafgen_proto.h
index 491e079..996c24e 100644
--- a/trafgen_proto.h
+++ b/trafgen_proto.h
@@ -12,6 +12,7 @@ struct proto_ctx {
enum proto_id {
PROTO_NONE,
PROTO_ETH,
+ PROTO_VLAN,
PROTO_ARP,
PROTO_IP4,
PROTO_IP6,
@@ -31,7 +32,8 @@ struct proto_field {
size_t len;
uint32_t shift;
uint32_t mask;
- uint16_t offset;
+ /* might be negative (e.g. VLAN TPID field) */
+ int16_t offset;
bool is_set;
uint16_t pkt_offset;