$search
Public Member Functions | |
def | __init__ |
Public Attributes | |
ip | |
netmask | |
Private Member Functions | |
def | _is_valid_netmask |
Private Attributes | |
_ip | |
_prefixlen |
This class represents and manipulates 128-bit IPv6 networks. Attributes: [examples for IPv6('2001:658:22A:CAFE:200::1/64')] .ip: IPv6Address('2001:658:22a:cafe:200::1') .network: IPv6Address('2001:658:22a:cafe::') .hostmask: IPv6Address('::ffff:ffff:ffff:ffff') .broadcast: IPv6Address('2001:658:22a:cafe:ffff:ffff:ffff:ffff') .netmask: IPv6Address('ffff:ffff:ffff:ffff::') .prefixlen: 64
Definition at line 1740 of file ipaddr.py.
def multi_interface_roam::ipaddr::IPv6Network::__init__ | ( | self, | ||
address, | ||||
strict = False | ||||
) |
Instantiate a new IPv6 Network object. Args: address: A string or integer representing the IPv6 network or the IP and prefix/netmask. '2001:4860::/128' '2001:4860:0000:0000:0000:0000:0000:0000/128' '2001:4860::' are all functionally the same in IPv6. That is to say, failing to provide a subnetmask will create an object with a mask of /128. Additionally, an integer can be passed, so IPv6Network('2001:4860::') == IPv6Network(42541956101370907050197289607612071936L). or, more generally IPv6Network(IPv6Network('2001:4860::')._ip) == IPv6Network('2001:4860::') strict: A boolean. If true, ensure that we have been passed A true network address, eg, 192.168.1.0/24 and not an IP address on a network, eg, 192.168.1.1/24. Raises: AddressValueError: If address isn't a valid IPv6 address. NetmaskValueError: If the netmask isn't valid for an IPv6 address. ValueError: If strict was True and a network address was not supplied.
def multi_interface_roam::ipaddr::IPv6Network::_is_valid_netmask | ( | self, | ||
prefixlen | ||||
) | [private] |
Reimplemented from multi_interface_roam::ipaddr::_BaseNet.