- cls_rule_init_catchall(&rule, IBR_FROM_LOCAL_DHCP);
- cls_rule_set_in_port(&rule, OFPP_LOCAL);
- cls_rule_set_dl_type(&rule, htons(ETH_TYPE_IP));
- cls_rule_set_dl_src(&rule, ib->local_mac);
- cls_rule_set_nw_proto(&rule, IPPROTO_UDP);
- cls_rule_set_tp_src(&rule, htons(DHCP_CLIENT_PORT));
- cls_rule_set_tp_dst(&rule, htons(DHCP_SERVER_PORT));
- add_rule(ib, &rule);
+ match_init_catchall(&match);
+ match_set_in_port(&match, OFPP_LOCAL);
+ match_set_dl_type(&match, htons(ETH_TYPE_IP));
+ match_set_dl_src(&match, ib->local_mac);
+ match_set_nw_proto(&match, IPPROTO_UDP);
+ match_set_tp_src(&match, htons(DHCP_CLIENT_PORT));
+ match_set_tp_dst(&match, htons(DHCP_SERVER_PORT));
+ add_rule(ib, &match, IBR_FROM_LOCAL_DHCP);