6.5 Requests

Each request is a map whose query key names it. Field types are the MessagePack types named; an address is a string in its usual textual form; a name is a string in presentation form, with or without a trailing dot.

6.5.1 resolve — RESOLVER_QUERY #

One question.

KeyTypeMeaning
namestringThe name
typeuintThe record type number (1 A, 28 AAAA, 12 PTR, …)
no_cacheboolBypass the cache for this question; default false

Reply kind: answer:

KeyTypeMeaning
outcomestringfound, notfound, unavailable (§6.6)
recordsarray of mapEach: name (string), type (uint), ttl (uint), data (bin, uncompressed wire rdata), text (string, presentation form)
sourcestringsynthetic, hosts, cache, dns, local
serverstring or nilThe upstream that answered, for dns; for cache, the upstream whose answer was cached; nil otherwise
interfacestring or nilThe interface whose scope answered
validationstring§6.6
rcodeuintThe DNS response code, for dns; for cache, the code of the response that was cached; 0 otherwise

records is the answer section only. When the name was expanded (§6.7) the records are at the expanded name, and name on each record says so.

6.5.2 lookup — RESOLVER_QUERY #

The addresses of a name: what getaddrinfo asks. The resolver asks for A and/or AAAA, applies search expansion, follows the CNAME chain and returns what it ends at.

KeyTypeMeaning
namestringThe name
familystringany (default), inet, inet6

Reply kind: addresses:

KeyTypeMeaning
outcomestringfound when at least one family answered; unavailable when none did and one could not; else notfound
canonicalstringThe name the addresses belong to after expansion and CNAME chasing; the name asked, when neither applied
addressesarray of mapEach: address (string), ttl (uint)
sourcestringAs for resolve
validationstring§6.6

6.5.3 reverse — RESOLVER_QUERY #

KeyTypeMeaning
addressstringAn IPv4 or IPv6 address

Equivalent to resolve of the address's reverse-mapping name with type PTR; the reply is kind: answer.

6.5.4 status — RESOLVER_QUERY #

No fields. Reply kind: status:

KeyTypeMeaning
hostnamestringThe machine's name as the resolver knows it
netdboolWhether the network manager channel is connected
scopesarray of mapEach: interface, servers (array of string), domains (array of string), default_route (bool), exclusive (bool), metric (uint), subnets (array of string: the interface's addresses, each as address/prefix, which name the subnets routing step 3 matches against), demoted (array of string)
fallback_serversarray of stringThe registry's server list
cache_entriesuint
countersmapqueries, synthetic, cache_hits, upstream_sent, upstream_answered, upstream_failed, refused, each uint

6.5.5 flush — RESOLVER_CONTROL #

No fields. Drops every cached answer. Reply ok: true with no kind.

6.5.6 Unknown requests #

A resolver MUST answer a query it does not know with an error reply. A client MUST treat an error reply as "not answered", never as notfound.

Edit this page