Pfx.from_masked
You're seeing just the function
from_masked
, go back to Pfx module for more information.
Specs
Returns a Pfx.t/0
struct, after applying mask
to address
.
Examples
iex> from_masked("10.10.10.10", "255.255.255.0")
%Pfx{bits: <<10, 10, 10>>, maxlen: 32}
iex> from_masked({{10, 10, 10, 10}, 32}, "255.255.255.0")
%Pfx{bits: <<10, 10, 10>>, maxlen: 32}
iex> from_masked("10.10.10.0", "0.0.255.255", inverted: true)
...> |> format()
"10.10.0.0/16"