mix iana.specials (Pfx v0.13.0) View Source

Download and convert IANA's IPv4/6 Special-Purpose Address Registries.

Used during development and not available when Pfx is used as a dependency.

Usage:

mix iana.specials [options]

options include:
-f, --force   download from iana, replaces local xml registry files
-s, --show    convert the xml registry files and show map on screen

The xml registry files are:

  • parsed into a list [{Pfx.t, %{property: value}] per registry
  • sorted more to less specific
  • the lists are then stored in a map %{ip4: [..], ip6: [..]}
  • that map is then saved as priv/specials in erlang external term format
    or shown on screen when -s option is used.

Pfx uses priv/specials as an external resource for a module attribute that allows looking up IANA attributes for a given prefix via Pfx.iana_special/2.