summaryrefslogtreecommitdiff
path: root/trafgen_l2.c
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-02-01 19:01:36 +0200
committerTobias Klauser <tklauser@distanz.ch>2016-02-02 16:54:47 +0100
commit826a16efdd760930eb2cb21ae80c49a9d7d096f4 (patch)
tree510678994d09274375dec50ac20818924aececcf /trafgen_l2.c
parent88b359d2aa7e3a2bcbe166ca39d93cfd7e04ef08 (diff)
trafgen: proto: Add set_next_proto callback to struct proto_hdr
Add set_next_proto callback to proto_hdr struct to allow lower protocol set next protocol id by enum proto_id. Extended proto_lower_default_add(...) function to take upper protocol to delegate it's id to lower protocol to set next protocol field. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_l2.c')
-rw-r--r--trafgen_l2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trafgen_l2.c b/trafgen_l2.c
index 5600c24..529dc36 100644
--- a/trafgen_l2.c
+++ b/trafgen_l2.c
@@ -45,7 +45,7 @@ static void arp_header_init(struct proto_hdr *hdr)
{
struct proto_hdr *lower;
- lower = proto_lower_default_add(PROTO_ETH);
+ lower = proto_lower_default_add(hdr, PROTO_ETH);
if (lower->id == PROTO_ETH) {
uint8_t bcast[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };