'Return either the IP object is in the provided network'

def isInNet(self, net):

    if ((not net.isValid) and (net.raw != '')):
        return (self in DNSUtils.dnsToIp(net.raw))
    if (self.family != net.family):
        return False
    if self.isIPv4:
        mask = (~ (4294967295L >> net.plen))
    elif self.isIPv6:
        mask = (~ (340282366920938463463374607431768211455L >> net.plen))
    else:
        return False
    return ((self.addr & mask) == net.addr)
