ip v1.1.1 IP.Scope
Implements scope lookup for all (currently) known scopes.
Please open a pull-request if this needs changing.
Link to this section Summary
Link to this section Functions
Link to this function
address_scope(address)
address_scope(address)
address_scope(IP.Address.t()) :: binary()
address_scope(IP.Address.t()) :: binary()
Return the scope of address
Examples
iex> ~i(192.0.2.0)
...> |> IP.Scope.address_scope()
"DOCUMENTATION"
iex> ~i(2001:db8::)
...> |> IP.Scope.address_scope()
"DOCUMENTATION"
Link to this function
prefix_scope(prefix)
prefix_scope(prefix)
prefix_scope(IP.Prefix.t()) :: binary()
prefix_scope(IP.Prefix.t()) :: binary()
Return the scope of prefix
Examples
iex> ~i(192.0.2.0/24)
...> |> IP.Scope.prefix_scope()
"DOCUMENTATION"
iex> ~i(2001:db8::/32)
...> |> IP.Scope.prefix_scope()
"DOCUMENTATION"