Lines Matching refs:network
61 address: A string or integer, the IP network. Either IPv4 or
70 address. Or if the network has host bits set.
83 raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 network')
121 """Represent an address as 4 packed bytes in network (big-endian) order.
127 The integer address packed as 4 bytes in network (big-endian) order.
141 """Represent an address as 16 packed bytes in network (big-endian) order.
147 The integer address packed as 16 bytes in network (big-endian) order.
201 """Summarize a network range given the first and last IP addresses.
215 An iterator of the summarized IPv(4|6) network objects.
673 """A generic IP network object.
686 """Generate Iterator over usable hosts in a network.
688 This is like __iter__ except it doesn't return the network
692 network = int(self.network_address)
694 for x in range(network + 1, broadcast):
698 network = int(self.network_address)
700 for x in range(network, broadcast + 1):
704 network = int(self.network_address)
707 if network + n > broadcast:
709 return self._address_class(network + n)
712 if broadcast + n < network:
743 # dealing with another network.
787 # more consistent behaviour across the network address, broadcast
828 versions, or if other is not a network object.
837 raise TypeError("%s is not a network object" % other)
844 # Make sure we're comparing the network of other.
875 representation of the network addresses. This means that the
922 Returns an object that identifies this address' network and
952 number means a larger network)
983 """The supernet containing the current network.
987 the network should be decreased by. For example, given a
988 /24 network and a prefixlen_diff of 3, a supernet with a
992 An IPv4 network object.
1000 smaller network)
1048 """Return True if this network is a subnet of other."""
1052 """Return True if this network is a supernet of other."""
1080 """Test if this network belongs to a private range.
1083 A boolean, True if the network is reserved per
1399 self.network = IPv4Network((addr, mask), strict=False)
1400 self.netmask = self.network.netmask
1401 self._prefixlen = self.network._prefixlen
1405 return self.network.hostmask
1416 return self.network == other.network
1418 # An interface with an associated network is NOT the
1428 return (self.network < other.network or
1429 self.network == other.network and address_less)
1436 return hash((self._ip, self._prefixlen, int(self.network.network_address)))
1462 """This class represents and manipulates 32-bit IPv4 network + addresses..
1476 """Instantiate a new IPv4 network object.
1479 address: A string or integer representing the IP [& network].
1507 ValueError: If strict is True and a network address is not
2104 self.network = IPv6Network((addr, mask), strict=False)
2105 self.netmask = self.network.netmask
2106 self._prefixlen = self.network._prefixlen
2110 return self.network.hostmask
2121 return self.network == other.network
2123 # An interface with an associated network is NOT the
2133 return (self.network < other.network or
2134 self.network == other.network and address_less)
2141 return hash((self._ip, self._prefixlen, int(self.network.network_address)))
2166 return self._ip == 0 and self.network.is_unspecified
2170 return self._ip == 1 and self.network.is_loopback
2193 address: A string or integer representing the IPv6 network or the
2210 A true network address, eg, 2001:db8::1000/124 and not an
2211 IP address on a network, eg, 2001:db8::1/124.
2217 ValueError: If strict was True and a network address was not
2238 """Generate Iterator over usable hosts in a network.
2244 network = int(self.network_address)
2246 for x in range(network + 1, broadcast + 1):