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 resolveRESOLVER_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
interfacestring or nilThe interface whose scope answered
validationstring§6.6
rcodeuintThe DNS response code, for dns; 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 lookupRESOLVER_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 reverseRESOLVER_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 statusRESOLVER_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), 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 flushRESOLVER_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