NetAddr.prefix
You're seeing just the function
prefix
, go back to NetAddr module for more information.
Specs
Returns a human-readable CIDR for the first address in
netaddr
.
Examples
iex> NetAddr.prefix %NetAddr.IPv4{address: <<192, 0, 2, 1>>, length: 24}
"192.0.2.0/24"
iex> NetAddr.prefix %NetAddr.Generic{address: <<1, 2, 3, 4, 5>>, length: 32}
"0x0102030400/32"