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

Module ipv6

source code

IPv6 helper functions.

Functions [hide private]
string
inet_ntoa(address)
Convert a network format IPv6 address into text.
source code
string
inet_aton(text)
Convert a text format IPv6 address into network format.
source code
 
is_mapped(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 a network format IPv6 address into text.

Parameters:
  • address (string) - the binary address
Returns: string
Raises:
  • ValueError - the address isn't 16 bytes long

inet_aton(text)

source code 

Convert a text format IPv6 address into network format.

Parameters:
  • text (string) - the textual address
Returns: string
Raises:

Variables Details [hide private]

_mapped_prefix

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