Package dns :: Module ipv6
[hide private]
[frames] | no frames]

Module ipv6

source code

IPv6 helper functions.

Functions [hide private]
 
inet_ntoa(address)
Convert an IPv6 address in binary form to text form.
source code
 
inet_aton(text)
Convert an IPv6 address in text form to binary form.
source code
 
is_mapped(address)
Is the specified address a mapped IPv4 address?
source code
Variables [hide private]
  _leading_zero = re.compile(r'0+([0-9a-f]+)')
  _v4_ending = re.compile(r'(.*):(\d+\.\d+\.\d+\.\d+)$')
  _colon_colon_start = re.compile(r'::.*')
  _colon_colon_end = re.compile(r'.*::$')
  _mapped_prefix = '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff...
  __package__ = 'dns'
Function Details [hide private]

inet_ntoa(address)

source code 

Convert an IPv6 address in binary form to text form.

*address*, a ``binary``, the IPv6 address in binary form.

Raises ``ValueError`` if the address isn't 16 bytes long. Returns a ``text``.

inet_aton(text)

source code 

Convert an IPv6 address in text form to binary form.

*text*, a ``text``, the IPv6 address in textual form.

Returns a ``binary``.

is_mapped(address)

source code 

Is the specified address a mapped IPv4 address?

*address*, a ``binary`` is an IPv6 address in binary form.

Returns a ``bool``.


Variables Details [hide private]

_mapped_prefix

Value:
'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff'