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

def _ip_int_from_prefix(self, prefixlen):

    return (self._ALL_ONES ^ (self._ALL_ONES >> prefixlen))
