Pfx.bxor
You're seeing just the function
bxor
, go back to Pfx module for more information.
Specs
A bitwise XOR of two t:prefix
's.
Both prefixes must have the same maxlen
.
Examples
iex> x = new(<<10, 11, 12, 13>>, 32)
iex> y = new(<<255, 255>>, 32)
iex> bxor(x, y)
%Pfx{bits: <<245, 244, 12, 13>>, maxlen: 32}
iex> bxor(%Pfx{bits: <<10, 11, 12, 13>>, maxlen: 32}, "255.255.0.0")
%Pfx{bits: <<245, 244, 12, 13>>, maxlen: 32}
iex> bxor("10.11.12.13", {255, 255, 0, 0})
"245.244.12.13"
iex> bxor({10, 11, 12, 13}, "255.255.0.0")
{245, 244, 12, 13}
iex> bxor({{10, 11, 12, 13}, 32}, "255.255.0.0")
{{245, 244, 12, 13}, 32}