summaryrefslogtreecommitdiff
path: root/proto_vlan.c
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-01-29 00:06:25 +0200
committerTobias Klauser <tklauser@distanz.ch>2016-01-29 08:58:54 +0100
commitbe21df123309c83cd47a1fa5f2c0ee1cf4657810 (patch)
tree5330fb556f0f2825a4a5d4a174dc31951ba8fb98 /proto_vlan.c
parentbaf47305fabce02017642b0f43472ab5a4eaa533 (diff)
trafgen: parser: Add syntax for IPv4 protocol generation
Add 'ip4(), ipv4()' function to build IPv4 header. Fields supported: ihl IPv4 header length (default 5 ) ver|version IPv4 version (default 4) ttl Time To Live (TTL) field (default 0) dscp DiffServ field (default 0) ecn ECN bits (default 0) tos TOS (DSCP + ECN) field (default 0) len|length IPv4 header + payload length (calculated by default) id Identifier (default 0) flags Flags field (default 0) frag Fragment offset (default 0) csum IPv4 header checksum (calculated by default) df Set DF (Dont Fragment) bit to 1 (default is 0) mf Set MF (More Fragments) bit to 1 (default is 0) sa|saddr IPv4 source address (default used from output device) da|daddr IPv4 destination address (default 0.0.0.0) proto IPv4 protocol id (default 0) Example: { ip4(df, mf, frag=100, prot=0x1, ecn=2, dscp=20) } { ip4(da=1.1.1.1), ip4(sa=3.3.3.3, da=3.3.3.4) } Last example generates IP-in-IP packet. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'proto_vlan.c')
0 files changed, 0 insertions, 0 deletions