Add 'vlan()' function for creating VLAN header 802.1q or 802.1ad. There is a tricky change which changes struct proto_field.offset uint16_t -> int16_t to allow negative values which is used in VLAN protocol header by using -2 offset for TPID field which overlaps with ether type field.
Additionally series has changes for simplify setting correct upper protocol id by lower layer by delegating this to the lower protocol. So upper protocol specifies it's proto_id to the lower protocol which decides which field & value to set. Vadim Kochan (7): trafgen: proto: Simplify getting lower protocol after init trafgen: proto: Add set_next_proto callback to struct proto_hdr trafgen: eth: Add setting next protocol id trafgen: ipv4: Add setting next protocol id trafgen: l2: Add VLAN header generation trafgen: parser: Add syntax for VLAN header creating trafgen: man: Add help for VLAN header function trafgen.8 | 43 ++++++++++++++++++++++++++++++++++ trafgen_l2.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- trafgen_l2.h | 9 +++++++ trafgen_l3.c | 33 +++++++++++++++++++------- trafgen_l4.c | 18 ++------------ trafgen_lexer.l | 9 +++++++ trafgen_parser.y | 42 +++++++++++++++++++++++++++++++-- trafgen_proto.c | 26 +++++++++++++++------ trafgen_proto.h | 10 +++++--- 9 files changed, 220 insertions(+), 41 deletions(-) -- 2.6.3 -- You received this message because you are subscribed to the Google Groups "netsniff-ng" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
