summaryrefslogtreecommitdiff
path: root/sock.c
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-01-26 22:25:04 +0200
committerTobias Klauser <tklauser@distanz.ch>2016-01-28 16:15:17 +0100
commitf3c3677c5dd67d7edda5bee5b316e014be231337 (patch)
treefba2a79fc32b2e753cc0ea1b46882c0cf6507960 /sock.c
parent5ad97d9ef3f77a246a588f4256d92f831e542f5d (diff)
trafgen: parser: Add syntax to generate Ethernet header fields
Add function 'eth()' to support generating Ethernet header fields from the trafgen configuration language. Supported fields: da|daddr destination address, default: 00:00:00:00:00:00 sa|saddr source address, default: device MAC prot|proto protocol number, default: 0x0000 Example usage: { eth(prot=0x0800, da=11:22:33:44:55:66), fill(0xff, 60) } { eth(prot=0x0800) } { eth() } It is important that proto_init is called before fields will be filled to initialize the specified proto with header fields. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> [tk: document supported keywords in commit message] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'sock.c')
0 files changed, 0 insertions, 0 deletions