nx_dns_txt.nx
buildroot/runtime/nx_dns_txt.nx
about
nx_dns_txt.nx -- TXT + NS DNS response parsing for ACME DNS-01
propagation polling (RFC 1035 §3.3.11 NS, §3.3.14 TXT).
nx_dns.nx ships an A-record answer-section walker (nx_dns_parse_response_a)
but ACME DNS-01 propagation checking needs two more record types:
- TXT: is the _acme-challenge value visible yet? (the challenge proof)
- NS: who are the AUTHORITATIVE nameservers for the zone? (so we can
query them DIRECTLY and dodge a public resolver's stale cache of
the previous run's TXT set -- exactly what Let's Encrypt checks).
Pure byte parsing over a caller-supplied response buffer -- composes
nx_dns's bounded name-skip (anti-cycle) + endian helpers. No syscalls.
license_tier: ORIGINAL (composes nx_dns RFC 1035 primitives)
genealogy_id: international-research-sources/ietf/rfc_1035
dependencies 2 imports · 1 importers
imports: nx_syscalls.nxnx_dns.nx
imported by: nx_acme_dns01_propagation.nx
structs
| none |
consts
| 21 | const NX_DNS_TXT_OK: i64 = 1 // parsed; (caller inspects found flag) |
| 22 | const NX_DNS_TXT_BAD_HEADER: i64 = 2 |
| 23 | const NX_DNS_TXT_TXID_MISMATCH: i64 = 3 |
| 24 | const NX_DNS_TXT_NOT_RESPONSE: i64 = 4 |
| 25 | const NX_DNS_TXT_TRUNCATED: i64 = 5 |
| 26 | const NX_DNS_TXT_RCODE_NONZERO: i64 = 6 // NXDOMAIN / SERVFAIL / ... |
| 27 | const NX_DNS_TXT_PARSE_FAIL: i64 = 7 |
functions
| 38 | func nx_dns_txt_contains( |
| 112 | func nx_dns_decode_name_at(buf: *u8, n: i64, start: i64, out: *u8, out_cap: i64) -> i64 called by 1: nx_dns_first_ns |
| 145 | func nx_dns_first_ns( called by 1: nx_dns01_authoritative_ip calls 3: nx_dns_get_u16_benx_dns_skip_namenx_dns_decode_name_at |
| 192 | func main() -> i64 |