Pfx.eui64_decode
You're seeing just the function
eui64_decode, go back to Pfx module for more information.
Specs
Decode a modified EUI-64 back into the original EUI-48 address.
Although rfc7217 provides an alternative for modified EUI-64, they are still very much in use, especially on network links using SLAAC.
This function flips the 7-th bit and removes 0xFFFE from the middle.
Note that eui64_encode uses Pfx.from_mac to turn a string or tuple
into a new Pfx.t/0.
Example
iex> eui64_decode("0088.88FE.FF88.8888")
"02-88-88-88-88-88"
iex> eui64_decode("0288.88FF.FE88.8888")
"00-88-88-88-88-88"
iex> eui64_decode("02-88-88-FF-FE-88-88-88")
"00-88-88-88-88-88"
iex> eui64_decode({0x02, 0x88, 0x88, 0xFF, 0xFE, 0x88, 0x88, 0x88})
{0x00, 0x88, 0x88, 0x88, 0x88, 0x88}
iex> new("2001:db8:1:2:020c:29ff:fe0c:47d5")
...> |> cut(-1, -64)
...> |> eui64_decode()
...> |> format()
"00-0C-29-0C-47-D5"