t.n.r.Resolver(common.ResolverBase) : class documentation

Part of twisted.names.root View Source View In Hierarchy

Resolver implements recursive lookup starting from a specified list of root servers.
Instance VariableshintsA list of str giving the dotted quad representation of IP addresses of root servers at which to begin resolving names.
_maximumQueriesA int giving the maximum number of queries which will be attempted to resolve a single name.
_reactorA IReactorTime and IReactorUDP provider to use to bind UDP ports and manage timeouts.
Method __init__ Undocumented
Method discoveredAuthority Undocumented
Method _roots Return a list of two-tuples representing the addresses of the root servers, as defined by self.hints.
Method _query Issue one query and return a Deferred which fires with its response.
Method _lookup Implement name lookup by recursively discovering the authoritative server for the name and then asking it, starting at one of the servers in self.hints.
Method _discoverAuthority Issue a query to a server and follow a delegation if necessary.
Method _discoveredAuthority Interpret the response to a query, checking for error codes and following delegations if necessary.

Inherited from ResolverBase:

Method exceptionForCode Convert a response code (one of the possible values of dns.Message.rCode to an exception instance representing it.
Method query Undocumented
Method lookupAddress
Method lookupIPV6Address
Method lookupAddress6
Method lookupMailExchange
Method lookupNameservers
Method lookupCanonicalName
Method lookupMailBox
Method lookupMailGroup
Method lookupMailRename
Method lookupPointer
Method lookupAuthority
Method lookupNull
Method lookupWellKnownServices
Method lookupService
Method lookupHostInfo
Method lookupMailboxInfo
Method lookupText
Method lookupSenderPolicy
Method lookupResponsibility
Method lookupAFSDatabase
Method lookupZone
Method lookupNamingAuthorityPointer
Method lookupAllRecords
Method getHostByName
Method _cbRecords Undocumented
def __init__(self, hints, maximumQueries=10, reactor=None): (source)
Undocumented
def _roots(self): (source)
Return a list of two-tuples representing the addresses of the root servers, as defined by self.hints.
def _query(self, query, servers, timeout, filter): (source)
Issue one query and return a Deferred which fires with its response.
ParametersqueryThe query to issue. (type: dns.Query )
serversThe servers which might have an answer for this query. (type: list of tuple of str and int )
timeoutA timeout on how long to wait for the response. (type: tuple of int )
filterA flag indicating whether to filter the results. If True, the returned Deferred will fire with a three-tuple of lists of RRHeaders (like the return value of the lookup* methods of IResolver. IF False, the result will be a Message instance. (type: bool )
ReturnsA Deferred which fires with the response or a timeout error. (type: Deferred )
def _lookup(self, name, cls, type, timeout): (source)
Implement name lookup by recursively discovering the authoritative server for the name and then asking it, starting at one of the servers in self.hints.
def _discoverAuthority(self, query, servers, timeout, queriesLeft): (source)
Issue a query to a server and follow a delegation if necessary.
ParametersqueryThe query to issue. (type: dns.Query )
serversThe servers which might have an answer for this query. (type: list of tuple of str and int )
timeoutA tuple of int giving the timeout to use for this query.
queriesLeftA int giving the number of queries which may yet be attempted to answer this query before the attempt will be abandoned.
ReturnsA Deferred which fires with a three-tuple of lists of RRHeaders giving the response, or with a Failure if there is a timeout or response error.
def _discoveredAuthority(self, response, query, timeout, queriesLeft): (source)
Interpret the response to a query, checking for error codes and following delegations if necessary.
ParametersresponseThe Message received in response to issuing query. (type: Message )
queryThe dns.Query which was issued. (type: dns.Query. )
timeoutThe timeout to use if another query is indicated by this response. (type: tuple of int )
queriesLeftA int giving the number of queries which may yet be attempted to answer this query before the attempt will be abandoned.
ReturnsA Failure indicating a response error, a three-tuple of lists of RRHeaders giving the response to query or a Deferred which will fire with one of those.
def discoveredAuthority(self, auth, name, cls, type, timeout): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2012-02-14 18:17:43.