Pfx.neighbor
You're seeing just the function
neighbor
, go back to Pfx module for more information.
Specs
Returns the neighboring prefix for pfx
, such that both can be combined in a
supernet.
Examples
iex> neighbor("1.1.1.128/25")
"1.1.1.0/25"
iex> neighbor("1.1.1.0/25")
"1.1.1.128/25"
iex> neighbor({1, 1, 1, 1})
{1, 1, 1, 0}
iex> neighbor({{1, 1, 1, 128}, 25})
{{1, 1, 1, 0}, 25}
iex> neighbor(%Pfx{bits: <<1, 1, 1, 1::1>>, maxlen: 32})
%Pfx{bits: <<1, 1, 1, 0::1>>, maxlen: 32}