Iptrie.Iana.lookup
You're seeing just the function
lookup
, go back to Iptrie.Iana module for more information.
Specs
lookup(Pfx.prefix(), atom() | nil) :: nil | map() | any()
Returns either nil, a property value or property map for given prefix
Examples
iex> lookup("10.10.10.10")
{"10.0.0.0/8",
%{
allocation: "1996-02",
destination: true,
forward: true,
global: false,
name: "private-use",
prefix: "10.0.0.0/8",
reserved: false,
source: true,
spec: ["rfc1918"]
}}
# non-existing property
iex> lookup("10.10.10.10", :missing)
nil
iex> lookup("::ffff:0:0/96", :global)
false
iex> lookup("::ffff:0:0/96", :name)
"ipv4-mapped-address"