Pfx.bnot

You're seeing just the function bnot, go back to Pfx module for more information.

Specs

bnot(prefix()) :: prefix()

Returns a bitwise NOT of the bits in pfx.

This inverts the pfx and returns it using the same representation as given.

Examples

iex> bnot("255.255.0.0")
"0.0.255.255"

iex> bnot({255, 255, 0, 0})
{0, 0, 255, 255}

iex> bnot({{255, 255, 0, 0}, 32})
{{0, 0, 255, 255}, 32}

iex> new(<<255, 255, 0, 0>>, 32) |> bnot()
%Pfx{bits: <<0, 0, 255, 255>>, maxlen: 32}

iex> bnot("5323:e689::/32")
"acdc:1976::/32"