PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB` netaddr.ip.BaseIP
Package netaddr :: Package ip :: Class BaseIP
[hide private]
[frames] | no frames]

Class BaseIP

object --+
         |
        BaseIP
Known Subclasses:

An abstract base class for common operations shared between various IP related subclasses.

Instance Methods [hide private]
 
__init__(self)
Constructor.
 
key(self)
Returns: a key tuple that uniquely identifies this IP address.
 
sort_key(self)
Returns: A key tuple used to compare and sort this IPAddress correctly.
 
__hash__(self)
Returns: A hash value uniquely indentifying this IP object.
 
__eq__(self, other)
Returns: True if this IPAddress or IPNetwork object is equivalent to other, False otherwise.
 
__ne__(self, other)
Returns: True if this IPAddress or IPNetwork object is not equivalent to other, False otherwise.
 
__lt__(self, other)
Returns: True if this IPAddress or IPNetwork object is less than other, False otherwise.
 
__le__(self, other)
Returns: True if this IPAddress or IPNetwork object is less than or equal to other, False otherwise.
 
__gt__(self, other)
Returns: True if this IPAddress or IPNetwork object is greater than other, False otherwise.
 
__ge__(self, other)
Returns: True if this IPAddress or IPNetwork object is greater than or equal to other, False otherwise.
 
is_unicast(self)
Returns: True if this IP is unicast, False otherwise
 
is_multicast(self)
Returns: True if this IP is multicast, False otherwise
 
is_loopback(self)
Returns: True if this IP is loopback address (not for network transmission), False otherwise.
 
is_private(self)
Returns: True if this IP is for internal/private use only (i.e.
 
is_link_local(self)
Returns: True if this IP is link-local address False otherwise.
 
is_reserved(self)
Returns: True if this IP is in IANA reserved range, False otherwise.
 
is_ipv4_mapped(self)
Returns: True if this IP is IPv4-compatible IPv6 address, False otherwise.
 
is_ipv4_compat(self)
Returns: True if this IP is IPv4-mapped IPv6 address, False otherwise.
 
_set_value(self, value)

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  info
A record dict containing IANA registration details for this IP address if available, None otherwise.
  version
the IP protocol version represented by this IP object.
  _module
  _value
  value
a positive integer representing the value of IP address/subnet.

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

Constructor.

Overrides: object.__init__

key(self)

 
Returns:
a key tuple that uniquely identifies this IP address.

sort_key(self)

 
Returns:
A key tuple used to compare and sort this IPAddress correctly.

__hash__(self)
(Hashing function)

 

hash(x)

Returns:
A hash value uniquely indentifying this IP object.
Overrides: object.__hash__

__eq__(self, other)
(Equality operator)

 
Parameters:
Returns:
True if this IPAddress or IPNetwork object is equivalent to other, False otherwise.

__ne__(self, other)

 
Parameters:
Returns:
True if this IPAddress or IPNetwork object is not equivalent to other, False otherwise.

__lt__(self, other)
(Less-than operator)

 
Parameters:
Returns:
True if this IPAddress or IPNetwork object is less than other, False otherwise.

__le__(self, other)
(Less-than-or-equals operator)

 
Parameters:
Returns:
True if this IPAddress or IPNetwork object is less than or equal to other, False otherwise.

__gt__(self, other)
(Greater-than operator)

 
Parameters:
Returns:
True if this IPAddress or IPNetwork object is greater than other, False otherwise.

__ge__(self, other)
(Greater-than-or-equals operator)

 
Parameters:
Returns:
True if this IPAddress or IPNetwork object is greater than or equal to other, False otherwise.

is_unicast(self)

 
Returns:
True if this IP is unicast, False otherwise

is_multicast(self)

 
Returns:
True if this IP is multicast, False otherwise

is_loopback(self)

 
Returns:
True if this IP is loopback address (not for network transmission), False otherwise. References: RFC 3330 and 4291.

is_private(self)

 
Returns:
True if this IP is for internal/private use only (i.e. non-public), False otherwise. Reference: RFCs 1918, 3330, 4193, 3879 and 2365.

is_link_local(self)

 
Returns:
True if this IP is link-local address False otherwise. Reference: RFCs 3927 and 4291.

is_reserved(self)

 
Returns:
True if this IP is in IANA reserved range, False otherwise. Reference: RFCs 3330 and 3171.

is_ipv4_mapped(self)

 
Returns:
True if this IP is IPv4-compatible IPv6 address, False otherwise.

is_ipv4_compat(self)

 
Returns:
True if this IP is IPv4-mapped IPv6 address, False otherwise.

Property Details [hide private]

info

A record dict containing IANA registration details for this IP address if available, None otherwise.

Get Method:
unreachable.info(self) - A record dict containing IANA registration details for this IP address if available, None otherwise.

version

the IP protocol version represented by this IP object.

Get Method:
unreachable.version(self) - the IP protocol version represented by this IP object.

value

a positive integer representing the value of IP address/subnet.

Get Method:
unreachable(self)
Set Method:
_set_value(self, value)