Package netaddr :: Package strategy :: Module eui64 |
[hide private]
[frames] | no frames]

# Module eui64

IEEE 64-bit EUI (Extended Unique Indentifier) logic.

Functions | [hide private]
valid_str(addr) Returns: `True` if EUI-64 indentifier is valid, `False` otherwise. |
str_to_int(addr) Returns: An unsigned integer that is equivalent to value represented by EUI-64 string identifier. |
int_to_str(int_val, dialect=None) Returns: An IEEE EUI-64 identifier that is equivalent to unsigned integer. |
int_to_packed(int_val) Returns: a packed string that is equivalent to value represented by an unsigned integer. |
packed_to_int(packed_int) Returns: An unsigned integer equivalent to value of network address represented by packed binary string. |
valid_words(words, dialect=None) |
int_to_words(int_val, dialect=None) |
words_to_int(words, dialect=None) |
valid_bits(bits, dialect=None) |
bits_to_int(bits, dialect=None) |
int_to_bits(int_val, dialect=None) |
valid_bin(bin_val) |
int_to_bin(int_val) |
bin_to_int(bin_val) |

Variables | [hide private]
| AF_EUI64 = `64`
| width = `64` The width (in bits) of this address type.
| word_size = `8` The individual word size (in bits) of this address type.
| word_fmt = ``'``%.2X``'`` The format string to be used when converting words to string values.
| word_sep = ``'``-``'`` The separator character used between each word.
| family = `64` The AF_* constant value of this address type.
| family_name = ``'``EUI-64``'`` A friendly string name address type.
| version = `64` The version of this address type.
| word_base = `16` The number base to be used when interpreting word values as integers.
| max_int = `18446744073709551615` The maximum integer value that can be represented by this address type.
| num_words = `8` The number of words in this address type.
| max_word = `255` The maximum integer value for an individual word in this address type.
| RE_EUI64_FORMAT = `re.compile(r'`(?i)`^`(``[`0`-`9A`-`F`]``{1,2}``)`-`(``[`0`-`9A`-`F`]``{``...`` Compiled regular expression for detecting value EUI-64 identifiers.

Function Details | [hide private]

### valid_str(addr) |
Parameters: `addr` - An IEEE EUI-64 indentifier in string form. Returns: `True` if EUI-64 indentifier is valid, `False` otherwise.

### str_to_int(addr) |
Parameters: `addr` - An IEEE EUI-64 indentifier in string form. Returns: An unsigned integer that is equivalent to value represented by EUI-64 string identifier.

### int_to_str(int_val, dialect=None) |
Parameters: `int_val` - An unsigned integer. `dialect` - (optional) a Python class defining formatting options (Please Note - not currently in use). Returns: An IEEE EUI-64 identifier that is equivalent to unsigned integer.

### int_to_packed(int_val) |
Parameters: `int_val` - the integer to be packed. Returns: a packed string that is equivalent to value represented by an unsigned integer.

### packed_to_int(packed_int) |
Parameters: `packed_int` - a packed string containing an unsigned integer. It is assumed that string is packed in network byte order. Returns: An unsigned integer equivalent to value of network address represented by packed binary string.

Variables Details | [hide private]

  ### RE_EUI64_FORMAT Compiled regular expression for detecting value EUI-64 identifiers. Value:
      re.compile(r'(?i)^([0-9A-F]{1,2})-([0-9A-F]{1,2})-([0-9A-F]{1,2})-([0-
      9A-F]{1,2})-([0-9A-F]{1,2})-([0-9A-F]{1,2})-([0-9A-F]{1,2})-([0-9A-F]{
      1,2})$')