AMS NetIds: six numbers from 0 to 255, written with dots like an IP address with two more parts, and sent as six bytes in that order.
iex> ADS.NetId.parse("172.16.17.10.1.1")
{:ok, <<172, 16, 17, 10, 1, 1>>}
iex> ADS.NetId.to_string(<<5, 36, 69, 176, 1, 1>>)
"5.36.69.176.1.1"
iex> ADS.NetId.parse("10.0.0.5")
:errorA NetId is configured on each system, and is often its IP address with .1.1 added, which
from_ip/1 makes.
Summary
Functions
The NetId made from an IPv4 address by adding .1.1.
Parses a NetId written with dots.
Parses a NetId, raising ArgumentError for one that isn't.
A NetId written with dots.
Types
Functions
@spec from_ip(:inet.ip4_address()) :: t()
The NetId made from an IPv4 address by adding .1.1.
iex> ADS.NetId.from_ip({10, 0, 0, 5})
<<10, 0, 0, 5, 1, 1>>
Parses a NetId written with dots.
Parses a NetId, raising ArgumentError for one that isn't.
A NetId written with dots.