module documentation
(source)

Base functionality useful to various parts of Twisted Names.

Variable EMPTY_RESULT Undocumented
Class ResolverBase ResolverBase is a base class for implementations of interfaces.IResolver which deals with a lot of the boilerplate of implementing all of the lookup methods.
Function extractRecord Resolve a name to an IP address, following CNAME records and NS referrals recursively.
Variable typeToMethod Undocumented
Variable _ANS Undocumented
Variable _AUTH Undocumented
Variable _ADD Undocumented
_ANS = (source)

Undocumented

_AUTH = (source)

Undocumented

_ADD = (source)

Undocumented

EMPTY_RESULT = (source)

Undocumented

(type: tuple[tuple, ...])
def extractRecord(resolver, name, answers, level=10): (source)

Resolve a name to an IP address, following CNAME records and NS referrals recursively.

This is an implementation detail of ResolverBase.getHostByName.

ParametersresolverThe resolver to use for the next query (unless handling an NS referral). (type: IResolver)
nameThe name being looked up. (type: dns.Name)
answersAll of the records returned by the previous query (answers, authority, and additional concatenated). (type: list of dns.RRHeader)
levelRemaining recursion budget. This is decremented at each recursion. The query returns None when it reaches 0. (type: int)
ReturnsThe first IPv4 or IPv6 address (as a dotted quad or colon quibbles), or None when no result is found. (type: native str or None)
typeToMethod = (source)

Undocumented

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.