diff options
Diffstat (limited to 'lib/match.c')
-rw-r--r-- | lib/match.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/match.c b/lib/match.c index 29b25a73b..a77554851 100644 --- a/lib/match.c +++ b/lib/match.c @@ -941,6 +941,14 @@ match_set_nw_proto(struct match *match, uint8_t nw_proto) } void +match_set_nw_proto_masked(struct match *match, + const uint8_t nw_proto, const uint8_t mask) +{ + match->flow.nw_proto = nw_proto; + match->wc.masks.nw_proto = mask; +} + +void match_set_nw_src(struct match *match, ovs_be32 nw_src) { match->flow.nw_src = nw_src; @@ -1034,6 +1042,30 @@ match_set_icmp_code(struct match *match, uint8_t icmp_code) } void +match_set_arp_opcode_masked(struct match *match, + const uint8_t opcode, + const uint8_t mask) +{ + match_set_nw_proto_masked(match, opcode, mask); +} + +void +match_set_arp_spa_masked(struct match *match, + const ovs_be32 arp_spa, + const ovs_be32 mask) +{ + match_set_nw_src_masked(match, arp_spa, mask); +} + +void +match_set_arp_tpa_masked(struct match *match, + const ovs_be32 arp_tpa, + const ovs_be32 mask) +{ + match_set_nw_dst_masked(match, arp_tpa, mask); +} + +void match_set_arp_sha(struct match *match, const struct eth_addr sha) { match->flow.arp_sha = sha; |