bool flow_entry_matches(struct flow_entry *entry, struct ofl_msg_flow_mod *mod, bool strict) { if (strict) { return (entry->stats->priority == mod->priority) && match_std_strict((struct ofl_match_standard *)entry->stats->match, (struct ofl_match_standard *)mod->match); } else { return match_std_nonstrict((struct ofl_match_standard *)entry->stats->match, (struct ofl_match_standard *)mod->match); } }
bool flow_entry_matches(struct flow_entry *entry, struct ofl_msg_flow_mod *mod, bool strict, bool check_cookie) { if (check_cookie && ((entry->stats->cookie & mod->cookie_mask) != (mod->cookie & mod->cookie_mask))) { return false; } if (strict) { return ( (entry->stats->priority == mod->priority) && match_std_strict((struct ofl_match *)mod->match, (struct ofl_match *)entry->stats->match)); } else { return match_std_nonstrict((struct ofl_match *)mod->match, (struct ofl_match *)entry->stats->match); } }