Get the best nameservers by non-recursively looking them up for
the domain and all its superdomains, in order. If no nameservers
are found, the root hints are returned.
Given a set of RRs and a domain name weβre looking for, follow
CNAME
s in the response and return the final name (which is the
name that will have the non-CNAME
records associated with it).
Given a set of RRs and a domain name weβre looking for, look for
better matching NS RRs (by comparing the current match count).
Returns the new matching superdomain and the nameserver hostnames.
Given a set of RRs and a domain name weβre looking for, follow any
CNAME
s in the response and get the address from the final A
/ AAAA
record.
Given a set of RRs and a domain weβre looking for, return the record weβre
looking for (if any).
Helper function for resolving CNAMEs: resolve, and add some existing RRs to
the ANSWER section of the result.
Resolve a hostname into an IP address, optionally only doing local
resolution.
Recursive DNS resolution.
Timeout-less version of resolve_recursive
.
Helper function for answering a question given a response from an upstream
nameserver: this will only do further querying if the response is a CNAME.
Validate a nameserver response against the question by only keeping valid
RRs: