Name resolution that doesn't depend on Nest's connection manager.
Nest's /etc/resolv.conf points at 127.0.0.1, a DNS proxy inside connmand.
If that process stops, nothing resolves (and a statically linked VM can't use
the device's own resolver anyway). The SDK instead points Erlang's own DNS
client (inet_res) at real servers when it starts, and stops it re-reading
resolv.conf:
- the
:nameserverssetting, if given (a list of IPv4 tuples), else - non-loopback servers from
/etc/resolv.conf, else - the default gateway.
Summary
Functions
Configures Erlang's resolver; returns the nameservers used.
The default gateway's IPv4 address, or nil.
Functions
@spec configure_dns() :: [:inet.ip4_address()]
Configures Erlang's resolver; returns the nameservers used.
@spec gateway() :: :inet.ip4_address() | nil
The default gateway's IPv4 address, or nil.