trafgen: l2: Add ARP header generation logic
commitfac5a67eb5d4928f7efbf1f0d731a7e93f0f8193
authorVadim Kochan <vadim4j@gmail.com>
Tue, 26 Jan 2016 20:25:06 +0000 (26 22:25 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Thu, 28 Jan 2016 15:15:29 +0000 (28 16:15 +0100)
tree5c98747f50297c27f81f605715b0d9762d2ac167
parentd053535a66ff864d309dec2303927e410b27e5b6
trafgen: l2: Add ARP header generation logic

Add ARP protocol header fields generation. By default htype ethernet (1)
and ptype IPv4 (0x0800) and the corresponding hlen/plen values will be
initialized and the opcode is set to ARP Request (1).

Source MAC and IP address are set to the device's addresses if not
specified.

Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
[tk: rephrase and extend commit message]
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
trafgen_l2.c
trafgen_l2.h