Pfx.size

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

Specs

size(prefix()) :: pos_integer()

Returns the number of full addresses as represented by pfx.

size(pfx) == 2^(pfx.maxlen - bit_size(pfx.bits))

Examples

iex> size("1.1.1.0/23")
512

iex> size({1,1,1,1})
1

iex> size({{1, 1, 1, 0}, 16})
65536

iex> size(%Pfx{bits: <<1, 1, 1>>, maxlen: 32})
256