Pfx.pfxlen
You're seeing just the function
pfxlen
, go back to Pfx module for more information.
Specs
pfxlen(prefix()) :: non_neg_integer()
Returns the length of the bitstring for given prefix
.
Examples
iex> pfxlen("10.10.10.0/24")
24
iex> pfxlen({{10, 10, 10, 0}, 25})
25
iex> pfxlen(%Pfx{bits: <<10, 10, 10, 0::1>>, maxlen: 32})
25
iex> pfxlen("10.10.10.10")
32