'Test whether /this/ match completely encompasses the other match.
if consider_other_wildcards, then the *other* match must also have
no more wildcards than we do (it must be no wider than we are)
Important for non-strict modify flow_mods etc.'

def matches_with_wildcards(self, other, consider_other_wildcards=True):

    assert assert_type('other', other, ofp_match, none_ok=False)
    if (self == other):
        return True
    if consider_other_wildcards:
        self_bits = (self.wildcards & (~ (OFPFW_NW_SRC_MASK | OFPFW_NW_DST_MASK)))
        other_bits = (other.wildcards & (~ (OFPFW_NW_SRC_MASK | OFPFW_NW_DST_MASK)))
        if ((self_bits | other_bits) != self_bits):
            return False
    def match_fail(mine, others):
        if (mine is None):
            return False
        return (mine != others)
    if match_fail(self.in_port, other.in_port):
        return False
    if match_fail(self.dl_vlan, other.dl_vlan):
        return False
    if match_fail(self.dl_src, other.dl_src):
        return False
    if match_fail(self.dl_dst, other.dl_dst):
        return False
    if match_fail(self.dl_type, other.dl_type):
        return False
    if match_fail(self.nw_proto, other.nw_proto):
        return False
    if match_fail(self.tp_src, other.tp_src):
        return False
    if match_fail(self.tp_dst, other.tp_dst):
        return False
    if match_fail(self.dl_vlan_pcp, other.dl_vlan_pcp):
        return False
    if match_fail(self.nw_tos, other.nw_tos):
        return False
    self_nw_src = self.get_nw_src()
    if (self_nw_src[0] is not None):
        other_nw_src = other.get_nw_src()
        if (self_nw_src[1] > other_nw_src[1]):
            return False
        if (not IPAddr(other_nw_src[0]).inNetwork((self_nw_src[0], self_nw_src[1]))):
            return False
    self_nw_dst = self.get_nw_dst()
    if (self_nw_dst[0] is not None):
        other_nw_dst = other.get_nw_dst()
        if (self_nw_dst[1] > other_nw_dst[1]):
            return False
        if (not IPAddr(other_nw_dst[0]).inNetwork((self_nw_dst[0], self_nw_dst[1]))):
            return False
    return True
