Pfx.host

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

Specs

host(prefix(), integer()) :: prefix()

Return the nth host in given pfx.

The result is in the same format as pfx.
Note that offset nth wraps around. See Pfx.member/2.

Example

iex> host("10.10.10.0/24", 128)
"10.10.10.128"

iex> host({10, 10, 10, 10}, 13)
{10, 10, 10, 10}

iex> host({{10, 10, 10, 0}, 24}, 128)
{{10, 10, 10, 128}, 32}

iex> host(%Pfx{bits: <<10, 10, 10>>, maxlen: 32}, 128)
%Pfx{bits: <<10, 10, 10, 128>>, maxlen: 32}