diff options
author | Radoslav Bodo <bodik@cesnet.cz> | 2018-06-19 21:57:37 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2018-06-20 13:23:07 +0200 |
commit | 76bd307a8ce82d839037c7437c0d181890adde02 (patch) | |
tree | 86aac927b81d8a034f4ed535f5c4059282c2c77b /trafgen_parser.y | |
parent | 50f8f250563c4f9e740f63b324e40a051230c68f (diff) |
trafgen: support ICMPv6 checksums
Usage: csumicmp6(14, 54)
Signed-off-by: Radoslav Bodo <bodik@cesnet.cz>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'trafgen_parser.y')
-rw-r--r-- | trafgen_parser.y | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/trafgen_parser.y b/trafgen_parser.y index 40aa230..7fffdd9 100644 --- a/trafgen_parser.y +++ b/trafgen_parser.y @@ -276,6 +276,7 @@ static inline bool is_dynamic_csum(enum csum which) case CSUM_TCP: case CSUM_UDP6: case CSUM_TCP6: + case CSUM_ICMP6: return true; default: return false; @@ -515,7 +516,7 @@ static void proto_pop_sub_hdr(void) } %token K_COMMENT K_FILL K_RND K_SEQINC K_SEQDEC K_DRND K_DINC K_DDEC K_WHITE -%token K_CPU K_CSUMIP K_CSUMUDP K_CSUMTCP K_CSUMUDP6 K_CSUMTCP6 K_CONST8 K_CONST16 K_CONST32 K_CONST64 +%token K_CPU K_CSUMIP K_CSUMUDP K_CSUMTCP K_CSUMUDP6 K_CSUMTCP6 K_CSUMICMP6 K_CONST8 K_CONST16 K_CONST32 K_CONST64 %token K_DADDR K_SADDR K_ETYPE K_TYPE %token K_TIME K_PRIO @@ -721,6 +722,8 @@ csum { set_csum16($3, $5, CSUM_TCP6); } | K_CSUMUDP6 '(' number delimiter number ')' { set_csum16($3, $5, CSUM_UDP6); } + | K_CSUMICMP6 '(' number delimiter number ')' + { set_csum16($3, $5, CSUM_ICMP6); } ; seqinc |