Pfx.link_local
You're seeing just the function
link_local
, go back to Pfx module for more information.
Specs
Returns a map with link-local address components for given pfx
.
Returns nil if pfx
is not link-local as per
rfc3927 or
rfc4291
Examples
iex> x = link_local("169.254.128.233")
iex> x
%{ digits: {169, 254, 128, 233},
prefix: "169.254.0.0/16",
ifaceID: 33001,
address: "169.254.128.233"
}
#
iex> host(x.prefix, x.ifaceID)
"169.254.128.233"
iex> y = link_local("fe80::acdc:1976")
iex> y
%{ preamble: 1018,
prefix: "fe80::/64",
ifaceID: 2900105590,
address: "fe80::acdc:1976"
}
#
iex> host(y.prefix, y.ifaceID)
"fe80::acdc:1976"