Pfx.bxor
You're seeing just the function
bxor
, go back to Pfx module for more information.
Specs
Returns a bitwise XOR of pfx1
and pfx2
.
Both prefixes must have the same maxlen
. The result has the same number of
bits as the first argument.
Examples
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}
# mix 'n match
iex> bxor({{10, 11, 12, 13}, 32}, "255.255.0.0")
{{245, 244, 12, 13}, 32}
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("255.255.0.0/16", "10.11.12.13")
"245.244.0.0/16"