diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2016-02-01 19:01:39 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-02-02 16:54:48 +0100 |
commit | a4e17af38e2e2545c32292b7b46102d49e738e1e (patch) | |
tree | 454c138b7d28c0d97c6e551fe479b70f112f408f /trafgen_l2.h | |
parent | 287e1d8899e2649395022b57230c1a93c125cc2c (diff) |
trafgen: l2: Add VLAN header generation
Add generation of VLAN header with supported fields:
TPID, DEI/CFI, PCP, VID
Changed struct proto_field.offset uint16_t -> int16_t to make
TPID offset -2 to point to ether type.
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_l2.h')
-rw-r--r-- | trafgen_l2.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/trafgen_l2.h b/trafgen_l2.h index 38727ec..9beb2aa 100644 --- a/trafgen_l2.h +++ b/trafgen_l2.h @@ -19,6 +19,15 @@ enum arp_field { ARP_TPA, }; +enum vlan_field { + VLAN_TPID, + VLAN_TCI, + VLAN_PCP, + VLAN_DEI, + VLAN_VID, + VLAN_ETYPE, +}; + extern void protos_l2_init(void); #endif /* TRAFGEN_L2_H */ |