dns: resolve host names

A small resolver for IPv4 address records, so that clients such as NTP can
be given a host name: "dns server <ip> [<ip>]", "dns lookup <name>" and
"dns". Without a configured server it uses the one DHCP handed out. A query
goes to the servers in turn every two seconds and gives up after six tries;
answers with compressed names and CNAME records ahead of the address are
understood. A name that already is a dotted address is taken without a
query.

The resolver sits in BANK3, the command line in BANK2 next to the helpers it
uses. The System page shows and sets the servers.
This commit is contained in:
DrDoof committed 2026-09-29 22:40:43 +02:00
1 parent 13b75a73c9
commit 67b8c718fb
11 files changed
+372 -3

No files matched your search

+2
View File
@@ -25,6 +25,7 @@
#include "machine.h"
#include "phy.h"
#include "syslog.h"
#include "dns.h"
#include "httpd/page_impl.h"
#include "boot.h"
#include "sfp.h"
@@ -1756,6 +1757,7 @@ void main(void)
check_and_flash_update_image();
syslog_init();
dns_init();
#ifdef DEBUG
// This register seems to work on the RTL8373 only if also the SDS