diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2016-04-22 16:55:31 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-04-25 17:56:34 +0200 |
commit | c09e06a6efaa94768660636a9c58ce9666e29d05 (patch) | |
tree | a41455899d30c7a8de30fdc9eb917702d9769975 /trafgen.8 | |
parent | 0cf15c320f9211d59b055157c895537e4b682a07 (diff) |
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 <tklauser@distanz.ch>
Diffstat (limited to 'trafgen.8')
-rw-r--r-- | trafgen.8 | 39 |
1 files changed, 38 insertions, 1 deletions
@@ -424,7 +424,7 @@ destination MAC address is set to the broadcast address (ff:ff:ff:ff:ff:ff). - Explicit Congestion Notification (ECN) field (default: 0) .sp .B len|length -- Total length of header and data (calculated by default) +- Total length of header and payload (calculated by default) .sp .B id - IPv4 datagram identification (default: 0) @@ -461,6 +461,43 @@ By default, if the lower level header is Ethernet, its EtherType field is set to 0x0800 (IPv4). If the lower level header is IPv4, its protocol field is set to 0x4 (IP-in-IP). +.I IPv6 +: +.B ip6|ipv6(ver=<number>, class=<number>, flow=<number> len=<number>, +.B nexthdr=<number>, hoplimit=<number>, +.in +16 +.B da=<ip6_addr>, sa=<ip6_addr>) +.in -16 +.sp +.in +4 +.B ver|version +- Version field (default: 6) +.sp +.B tc|tclass +- Traffic class (default: 0) +.sp +.B fl|flow +- Flow label (default: 0) +.sp +.B len|length +- Payload length (calculated by default) +.sp +.B nh|nexthdr +- Type of next header, i.e. transport layer protocol number (default: 0) +.sp +.B hl|hoplimit|ttl +- Hop limit, i.e. time to live (default: 0) +.sp +.B sa|saddr +- Source IPv6 address (default: device IPv6 address) +.sp +.B da|daddr +- Destination IPv6 address (default: 0:0:0:0:0:0:0:0) +.in -4 +.sp +By default, if the lower level header is Ethernet, its EtherType field is set to +0x86DD (IPv6). + .I UDP : .B udp(sp=<number>, dp=<number>, len=<number>, csum=<number>) |