diff options
author | Vadim Kochan <vadim4j@gmail.com> | 2016-04-30 17:39:15 +0300 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2016-07-11 09:50:52 +0200 |
commit | 7304939f0249945c8d63043a80a94f80f13ecf2e (patch) | |
tree | acf2ec1692db5544d98b35daa63a53870abcf303 /trafgen_lexer.l | |
parent | 14c81587037b03554819972f9b3965712cacd0f1 (diff) |
trafgen: parser: Split [e]type to separate keywords
Split [e]type to separate 'type' & 'etype' keywords,
the reason is that 'type' might be used in other protocol
headers (e.g. ICMP).
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/trafgen_lexer.l b/trafgen_lexer.l index eb438a8..3eda22a 100644 --- a/trafgen_lexer.l +++ b/trafgen_lexer.l @@ -115,7 +115,8 @@ ip6_addr (({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?:)?({a_hex}?: /* Ethernet */ "daddr"|"da" { return K_DADDR; } "saddr"|"sa" { return K_SADDR; } -[e]?"type" { return K_ETYPE; } +"etype" { return K_ETYPE; } +"type" { return K_TYPE; } /* VLAN (802.1Q & 802.1ad) */ "tpid" { return K_TPID; } |