'Turn the prefix length netmask into a int for comparison.
Args:
prefixlen: An integer, the prefix length.
Returns:
An integer.'

def _ip_int_from_prefix(self, prefixlen=None):

    if ((not prefixlen) and (prefixlen != 0)):
        prefixlen = self._prefixlen
    return (self._ALL_ONES ^ (self._ALL_ONES >> prefixlen))
