trafgen: l3: Add IPv4 header generation backend
commitbaf47305fabce02017642b0f43472ab5a4eaa533
authorVadim Kochan <vadim4j@gmail.com>
Thu, 28 Jan 2016 22:06:24 +0000 (29 00:06 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Fri, 29 Jan 2016 07:57:35 +0000 (29 08:57 +0100)
tree627bac0bfb69d207dd44aa952428c56551148819
parent6b845387e5bf5f2b7c584900c87ac41daa1acf36
trafgen: l3: Add IPv4 header generation backend

Add L3 module for implement L3 layer protocols generation.

Implemented setting of IPv4 header with all fields except options.
By default IPv4 address of output device is used as src ip address.
On finish (after packet is specified) - total len & checksum are calculated.

Meanwhile Ethernet protocol is initialized as default lower header.

If the lower protocol is IPv4 then IPv4 protocol id is set
to IP-in-IP in lower protocol header.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
trafgen/Makefile
trafgen_l3.c [new file with mode: 0644]
trafgen_l3.h [new file with mode: 0644]
trafgen_proto.c