- flow_to_ovs_match(flow, wildcards, match);
-
- /* The datapath supports matching on an ARP's opcode and IP addresses,
- * but OpenFlow does not. We wildcard and zero out the appropriate
- * fields so that OpenFlow is unaware of our trickery. */
- if (flow->dl_type == htons(ETH_TYPE_ARP)) {
- wildcards |= (OFPFW_NW_PROTO | OFPFW_NW_SRC_ALL | OFPFW_NW_DST_ALL);
- match->nw_src = 0;
- match->nw_dst = 0;
- match->nw_proto = 0;
- }
- match->wildcards = htonl(wildcards);
-}
-
-
-void
-flow_from_match(flow_t *flow, uint32_t *wildcards,
- const struct ofp_match *match)
-{
- if (wildcards) {
- *wildcards = ntohl(match->wildcards);
- }
- /* The datapath supports matching on an ARP's opcode and IP addresses,
- * but OpenFlow does not. In case the controller hasn't, we need to
- * set the appropriate wildcard bits so that we're externally
- * OpenFlow-compliant. */
- if (match->dl_type == htons(ETH_TYPE_ARP)) {
- *wildcards |= (OFPFW_NW_PROTO | OFPFW_NW_SRC_ALL | OFPFW_NW_DST_ALL);
- }