diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2016-09-22 23:55:34 +0300 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-10-04 17:18:13 +0200 |
commit | 12ccf0c12dde24f9b759b1747c88b2f09439c7d8 (patch) | |
tree | 1241f30ec581af5b4bdf0788214a106eb8c8180d /trafgen_lexer.l | |
parent | f4c1856026c0edcc1e2285cf6ae773057bee51cd (diff) |
trafgen: parser: Add 'pause()' function for IEEE 802.3X PAUSE header
Add 'pause()' proto header function for IEEE 802.3X PAUSE header
generation with the fields:
code - MAC Control opcode (default 0x0001)
time - PAUSE time (default 0)
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_lexer.l')
-rw-r--r-- | trafgen_lexer.l | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/trafgen_lexer.l b/trafgen_lexer.l index 5873eec..324a171 100644 --- a/trafgen_lexer.l +++ b/trafgen_lexer.l @@ -118,6 +118,9 @@ ip6_addr (({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?: "etype" { return K_ETYPE; } "type" { return K_TYPE; } + /* IEEE 802.3X PAUSE */ +"time" { return K_TIME; } + /* VLAN (802.1Q & 802.1ad) */ "tpid" { return K_TPID; } "tci" { return K_TCI; } @@ -192,6 +195,7 @@ ip6_addr (({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?: "urgptr" { return K_URG_PTR; } "eth" { return K_ETH; } +"pause" { return K_PAUSE; } "vlan" { return K_VLAN; } "mpls" { return K_MPLS; } "arp" { return K_ARP; } |