Pfx.eui64_encode
You're seeing just the function
eui64_encode
, go back to Pfx module for more information.
Specs
Creates a modified EUI-64 out of eui
(an EUI-48 address or an EUI-64).
This flips the 7-th bit (U/L - universal/local) and inserts 0xFFFE
in the
middle.
The function assumes either an EUI-48 or EUI-64 address. In the latter case, it'll only flip the 7-th bit.
Examples
iex> eui64_encode("0088.8888.8888")
"02-88-88-FF-FE-88-88-88"
iex> eui64_encode("0288.8888.8888")
"00-88-88-FF-FE-88-88-88"
iex> eui64_encode({0x00, 0x88, 0x88, 0x88, 0x88, 0x88})
{0x02, 0x88, 0x88, 0xFF, 0xFE, 0x88, 0x88, 0x88}
# modified EUI-64 from an existing EUI-64, simply flip the 7th bit
iex> eui64_encode("01:23:45:67:89:AB:CD:EF")
"03-23-45-67-89-AB-CD-EF"