Lines Matching refs:netmask

25     """A Value Error related to the netmask."""
157 """Helper to split the netmask and raise AddressValueError if needed"""
433 """Turn the prefix length into a bitwise netmask
446 """Return prefix length from the bitwise netmask.
449 ip_int: An integer, the netmask in expanded bitwise format
471 msg = '%r is not a valid netmask' % netmask_str
485 NetmaskValueError: If the input is not a valid netmask
501 """Turn a netmask/hostmask string into a prefix length
504 ip_str: The netmask/hostmask to be converted
510 NetmaskValueError: If the input is not a valid netmask/hostmask
512 # Parse the netmask/hostmask like an IP address.
518 # Try matching a netmask (this would be /1*0*/ as a bitwise regexp).
724 if self.netmask != other.netmask:
725 return self.netmask < other.netmask
732 int(self.netmask) == int(other.netmask))
737 return hash(int(self.network_address) ^ int(self.netmask))
749 return other._ip & self.netmask._ip == self.network_address._ip
765 return self._address_class(int(self.netmask) ^ self._ALL_ONES)
773 return '%s/%s' % (self.network_address, self.netmask)
913 if self.netmask < other.netmask:
915 if self.netmask > other.netmask:
923 netmask. This function is a suitable "key" argument for sorted()
927 return (self._version, self.network_address, self.netmask)
989 /21 netmask is returned.
1019 int(self.network_address) & (int(self.netmask) << prefixlen_diff),
1159 """Make a (netmask, prefix_len) tuple from the given argument.
1164 - a string representing the prefix netmask (e.g. "255.255.255.0")
1173 # Check for a netmask in prefix length form
1176 # Check for a netmask or hostmask in dotted-quad form.
1179 netmask = IPv4Address(cls._ip_int_from_prefix(prefixlen))
1180 cls._netmask_cache[arg] = netmask, prefixlen
1400 self.netmask = self.network.netmask
1452 self.netmask)
1468 .netmask: IPv4Address('255.255.255.224')
1491 dotted quad form, it is treated as a netmask if it starts with a
1495 netmask == /0. If no mask is given, a default of /32 is used.
1505 NetmaskValueError: If the netmask isn't valid for
1513 self.netmask, self._prefixlen = self._make_netmask(mask)
1515 if packed & int(self.netmask) != packed:
1520 int(self.netmask))
1599 """Make a (netmask, prefix_len) tuple from the given argument.
1604 - a string representing the prefix netmask (e.g. "255.255.255.0")
1613 netmask = IPv6Address(cls._ip_int_from_prefix(prefixlen))
1614 cls._netmask_cache[arg] = netmask, prefixlen
2105 self.netmask = self.network.netmask
2157 self.netmask)
2181 .netmask: IPv6Address('ffff:ffff:ffff:ffff:ffff:ffff:ffff:fff0')
2194 IP and prefix/netmask.
2215 NetmaskValueError: If the netmask isn't valid for
2223 self.netmask, self._prefixlen = self._make_netmask(mask)
2225 if packed & int(self.netmask) != packed:
2230 int(self.netmask))