Home | History | Annotate | Download | only in Lib

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('%r does not appear to be an IPv4 or IPv6 network' %
104 Network, so they're basically a combination of both the Address
105 and Network classes.
123 """Represent an address as 4 packed bytes in network (big-endian) order.
129 The integer address packed as 4 bytes in network (big-endian) order.
143 """Represent an address as 16 packed bytes in network (big-endian) order.
149 The integer address packed as 16 bytes in network (big-endian) order.
203 """Summarize a network range given the first and last IP addresses.
217 An iterator of the summarized IPv(4|6) network objects.
318 An iterator of the collapsed IPv(4|6)Network objects.
363 Address and Network objects are not sortable by default; they're
373 obj: either a Network or Address object.
601 """A generic IP network object.
617 """Generate Iterator over usable hosts in a network.
619 This is like __iter__ except it doesn't return the network
623 network = int(self.network_address)
625 for x in range(network + 1, broadcast):
629 network = int(self.network_address)
631 for x in range(network, broadcast + 1):
635 network = int(self.network_address)
638 if network + n > broadcast:
640 return self._address_class(network + n)
643 if broadcast + n < network:
674 # dealing with another network.
727 # more consistent behaviour across the network address, broadcast
763 An iterator of the IPv(4|6)Network objects which is self
768 versions, or if other is not a network object.
777 raise TypeError("%s is not a network object" % other)
785 # Make sure we're comparing the network of other.
818 representation of the network addresses. This means that the
863 """Network-only key function.
865 Returns an object that identifies this address' network and
895 number means a larger network)
926 """The supernet containing the current network.
930 the network should be decreased by. For example, given a
931 /24 network and a prefixlen_diff of 3, a supernet with a
935 An IPv4 network object.
943 smaller network)
984 reserved IPv6 Network ranges.
1297 reserved IPv4 Network range.
1367 self.network = IPv4Network(self._ip)
1378 self.network = IPv4Network(address, strict=False)
1379 self.netmask = self.network.netmask
1380 self.hostmask = self.network.hostmask
1386 self.network = IPv4Network(address, strict=False)
1387 self._prefixlen = self.network._prefixlen
1389 self.netmask = self.network.netmask
1390 self.hostmask = self.network.hostmask
1394 self.network.prefixlen)
1401 return self.network == other.network
1403 # An interface with an associated network is NOT the
1413 return self.network < other.network
1420 return self._ip ^ self._prefixlen ^ int(self.network.network_address)
1446 """This class represents and manipulates 32-bit IPv4 network + addresses..
1461 """Instantiate a new IPv4 network object.
1464 address: A string or integer representing the IP [& network].
1492 ValueError: If strict is True and a network address is not
1502 #fixme: address/network test here.
1940 reserved IPv6 Network ranges.
2061 self.network = IPv6Network(self._ip)
2070 self.network = IPv6Network(address, strict=False)
2071 self.netmask = self.network.netmask
2072 self.hostmask = self.network.hostmask
2077 self.network = IPv6Network(address, strict=False)
2078 self.netmask = self.network.netmask
2079 self._prefixlen = self.network._prefixlen
2080 self.hostmask = self.network.hostmask
2084 self.network.prefixlen)
2091 return self.network == other.network
2093 # An interface with an associated network is NOT the
2103 return self.network < other.network
2110 return self._ip ^ self._prefixlen ^ int(self.network.network_address)
2135 return self._ip == 0 and self.network.is_unspecified
2139 return self._ip == 1 and self.network.is_loopback
2159 """Instantiate a new IPv6 Network object.
2162 address: A string or integer representing the IPv6 network or the
2179 A true network address, eg, 2001:db8::1000/124 and not an
2180 IP address on a network, eg, 2001:db8::1/124.
2186 ValueError: If strict was True and a network address was not
2237 """Generate Iterator over usable hosts in a network.
2243 network = int(self.network_address)
2245 for x in range(network + 1, broadcast + 1):