code wiki / (root) / nx_dns_server_daemon.nx

nx_dns_server_daemon.nx

buildroot/runtime/nx_dns_server_daemon.nx

3568 B99 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind servicetopic dns
docsdependenciesstructsconstsfunctions

about

nx_dns_server_daemon.nx -- live authoritative DNS daemon. Closes the DNS half of the sovereign hosting chain. Companion to nx_audit_server_daemon.nx (TCP/HTTP daemon). Composes: nx_dns_authoritative.nx -- zone-table + query parse + response build sys_socket / sys_bind / sys_recvfrom / sys_sendto (UDP) Binds to 127.0.0.1:5353 by default (unprivileged port; production :53 requires CAP_NET_BIND_SERVICE or root). Per cardinal user-owns-every-bit: caller picks the port. Per cardinal feedback- bounded-loop-discipline: 1M-request budget on the accept loop. Zone configuration: hard-coded for this v0 to nishifamily.com -> 192.0.2.42 audit.nishifamily.com -> 192.0.2.43 Future: read from a TOML / JSONL zone file via shipped nx_toml or nx_jsonl primitives. expect_exit: 0 (clean exit after 1M-request budget; in normal daemon operation the supervisor wrapper restarts).

dependencies 2 imports · 0 importers

nx_syscalls_x86_64.nx nx_dns_authoritative.nx nx_dns_server_daemon.nx

imports: nx_syscalls_x86_64.nxnx_dns_authoritative.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_socket sys_bind nx_dns_zone_init nx_dns_zone_add_a sys_recvfrom nx_dns_serve_query nx_dns_get_u16_be nx_dns_build_response nx_dns_get_u16_be ↻ nx_dns_put_u16_be nx_dns_decode_name_ascii nx_dns_zone_lookup_a sys_sendto

structs

none

consts

25const NXDS_MAGIC_1024: i64 = 1024
27const NXDS_PORT: i64 = 5353
28const NXDS_REQ_CAP: i64 = 4096 // RFC 1035 ยง2.3.4 max UDP
29const NXDS_RESP_CAP: i64 = 4096
30const NXDS_REQUEST_BUDGET: i64 = 1000000
31const SOCK_DGRAM: i64 = 2

functions

33func main() -> i64