Pfx.link_local-question-mark
You're seeing just the function
link_local-question-mark
, go back to Pfx module for more information.
Specs
Returns true if pfx
is a link-local prefix, false otherwise
Link local prefixes include:
0.0.0.0/8
, rfc1122, 'this-network'255.255.255.255/32
, rfc1122, limited broadcast169.254.0.0/16
, rfc3927, link-local (see examples)fe80::/64
, rfc4291, link-local
Examples
# first 256 addresses are reserved
iex> link_local?("169.254.0.0")
false
# last 256 addresses are reserved
iex> link_local?("169.254.255.0")
false
# rest is considered link local
iex> link_local?("169.254.1.0")
true
iex> link_local?("169.254.254.255")
true
iex> link_local?("0.0.0.0")
true
iex> link_local?("0.255.255.255")
true
iex> link_local?({0, 255, 255, 255})
true
iex> link_local?("fe80::acdc:1975")
true
iex> link_local?("1.1.1.1")
false
# bad prefix
iex> link_local?("10.10.10.256")
false