The dnsd daemon
Created by: batonius
The PR implements the dnsd
daemon as described in #9 (closed).
Notes:
-
smolnetd
should be updated as well fordnsd
to work, because of https://github.com/m-labs/smoltcp/pull/133 . - The daemon uses the dns-parser crate to create/parse DNS packets.
- The daemon implements
dns:<url>
scheme and currently supports only domain-to-ipv4 resolving, returning resolved IPs in textual form, separated by newlines. - The name server is hardcoded to
8.8.8.8
, to be configurable once #7 (closed) is done. - The schema works in blocked mode only, but the requests themselves are implemented via non-blocking UDP sockets.
- The daemon maintains an internal cache of resolved domains with hardcoded lifetime 5min, to be configurable after #7 (closed).
- On errors, the daemon returns
ENODATA
, on request timeouts (30 sec, to be configurable) -ETIMEOUT
. - The daemon doesn't support IDN.
@jackpot51 We should probably do something about the ad-hoc DNS code in libstd
and newlib
once this is merged.
Closes #9 (closed).