From c09e06a6efaa94768660636a9c58ce9666e29d05 Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Fri, 22 Apr 2016 16:55:31 +0200 Subject: trafgen: proto: Add IPv6 header generation Support for generating simple IPv6 headers using the 'ip6()/ipv6()' trafgen generation function. Fields supported: ver|version Version (default: 6) tc|tclass Traffic class (default: 0) fl|flow Flow Label (default: 0) len|length Payload length (calculated by default) nh|nexthdr Type of next header (default: 0) hl|hoplimit|ttl Hop Limit, TTL (default: 0) sa|saddr Source IPv6 address (default: device address) da|daddr Destination IPv6 address (default: 0:0:0:0:0:0:0:0) Examples: { eth(), ipv6(daddr=1:2:3:4:5:6:7:8) } { ipv6(tc=2, hl=3, daddr=::1) } { eth(), ipv6(nh=58, sa=2001:db8::, da=::1), 128, 0, 0x52, 0x03, 0, 0, 0, 0 } If not explicitely specified, the lower header is initialized as Ethernet. Signed-off-by: Tobias Klauser --- trafgen_proto.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'trafgen_proto.h') diff --git a/trafgen_proto.h b/trafgen_proto.h index 31ac1c8..cdcffdc 100644 --- a/trafgen_proto.h +++ b/trafgen_proto.h @@ -105,4 +105,7 @@ extern void proto_field_set_default_dev_mac(struct proto_hdr *hdr, uint32_t fid) extern void proto_field_set_dev_ipv4(struct proto_hdr *hdr, uint32_t fid); extern void proto_field_set_default_dev_ipv4(struct proto_hdr *hdr, uint32_t fid); +extern void proto_field_set_dev_ipv6(struct proto_hdr *hdr, uint32_t fid); +extern void proto_field_set_default_dev_ipv6(struct proto_hdr *hdr, uint32_t fid); + #endif /* TRAFGEN_PROTO_H */ -- cgit v1.2.3-54-g00ecf