diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2016-01-26 22:25:04 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-01-28 16:15:17 +0100 |
commit | f3c3677c5dd67d7edda5bee5b316e014be231337 (patch) | |
tree | fba2a79fc32b2e753cc0ea1b46882c0cf6507960 /bpf_ext.h | |
parent | 5ad97d9ef3f77a246a588f4256d92f831e542f5d (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 'bpf_ext.h')
0 files changed, 0 insertions, 0 deletions