mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
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:
1 parent
13b75a73c9
commit
67b8c718fb
11 files changed
+372
-3
No files matched your search
@@ -19,6 +19,7 @@
|
||||
#include "sfp.h"
|
||||
#include "dhcp.h"
|
||||
#include "syslog.h"
|
||||
#include "dns.h"
|
||||
#include "uip/uip.h"
|
||||
#include "version.h"
|
||||
|
||||
@@ -1802,6 +1803,8 @@ void cmd_parser(void) __banked
|
||||
parse_mtu();
|
||||
} else if (cmd_compare(0, "syslog")) {
|
||||
parse_syslog();
|
||||
} else if (cmd_compare(0, "dns")) {
|
||||
dns_parse();
|
||||
} else if (cmd_compare(0, "ip")) {
|
||||
if (cmd_compare(1, "dhcp")) {
|
||||
dhcp_start();
|
||||
|
||||
Reference in new issue
Block a user