twisted.names.root.Resolver(common.ResolverBase) class documentationtwisted.names.root
          View Source
          (View In Hierarchy)
        
      Resolver 
implements recursive lookup starting from a specified list of root 
servers.
| Instance Variable | hints | See hintsparameter of__init__ | 
| Method | __init__ | No summary | 
| Instance Variable | _maximumQueries | See maximumQueriesparameter of__init__ | 
| Instance Variable | _reactor | See reactorparameter of__init__ | 
| Instance Variable | _resolverFactory | See resolverFactoryparameter of__init__ | 
| 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 Deferredwhich
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.rCodeto an exception instance representing it. | 
| Method | query | Dispatch queryto the method which can handle its type. | 
| Method | lookupAddress | Perform an A record lookup. | 
| Method | lookupIPV6Address | Perform an AAAA record lookup. | 
| Method | lookupAddress6 | Perform an A6 record lookup. | 
| Method | lookupMailExchange | Perform an MX record lookup. | 
| Method | lookupNameservers | Perform an NS record lookup. | 
| Method | lookupCanonicalName | Perform a CNAME record lookup. | 
| Method | lookupMailBox | Perform an MB record lookup. | 
| Method | lookupMailGroup | Perform an MG record lookup. | 
| Method | lookupMailRename | Perform an MR record lookup. | 
| Method | lookupPointer | Perform a PTR record lookup. | 
| Method | lookupAuthority | Perform an SOA record lookup. | 
| Method | lookupNull | Perform a NULL record lookup. | 
| Method | lookupWellKnownServices | Perform a WKS record lookup. | 
| Method | lookupService | Perform an SRV record lookup. | 
| Method | lookupHostInfo | Perform a HINFO record lookup. | 
| Method | lookupMailboxInfo | Perform an MINFO record lookup. | 
| Method | lookupText | Perform a TXT record lookup. | 
| Method | lookupSenderPolicy | Perform a SPF record lookup. | 
| Method | lookupResponsibility | Perform an RP record lookup. | 
| Method | lookupAFSDatabase | Perform an AFSDB record lookup. | 
| Method | lookupZone | Perform an AXFR record lookup. | 
| Method | lookupNamingAuthorityPointer | Perform a NAPTR record lookup. | 
| Method | lookupAllRecords | Perform an ALL_RECORD lookup. | 
| Method | getHostByName | Resolve the domain name nameinto an IP address. | 
| Class Variable | _errormap | A dictmapping DNS protocol failure response codes to 
exception classes which will be used to represent those failures. | 
| Method | _cbRecords | Undocumented | 
| Parameters | hints | A listofstrgiving the dotted quad representation of IP addresses of root servers at 
which to begin resolving names. (type:listofstr) | 
| maximumQueries | An optional intgiving the maximum number of queries which will be attempted to resolve a 
single name. (type:int) | |
| reactor | An optional IReactorTimeandIReactorUDPprovider to use to bind UDP ports and manage timeouts. (type:IReactorTimeandIReactorUDPprovider) | |
| resolverFactory | An optional callable which accepts reactorandserversarguments and returns an instance that provides aqueryUDPmethod. Defaults totwisted.names.client.Resolver. (type: callable) | 
Return a list of two-tuples representing the addresses of the root 
servers, as defined by self.hints.
Issue one query and return a Deferred which
fires with its response.
| Parameters | query | The query to issue. (type: dns.Query) | 
| servers | The servers which might have an answer for this query. (type: listoftupleofstrandint) | |
| timeout | A timeout on how long to wait for the response. (type: tupleofint) | |
| filter | A flag indicating whether to filter the results.  If True, the
returnedDeferredwill 
fire with a three-tuple of lists oftwisted.names.dns.RRHeader(like the return value of the lookup* methods ofIResolver.
IFFalse, the result will be aMessageinstance. (type:bool) | |
| Returns | A Deferredwhich fires with the response or a timeout error. (type:Deferred) | |
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.
Issue a query to a server and follow a delegation if necessary.
| Parameters | query | The query to issue. (type: dns.Query) | 
| servers | The servers which might have an answer for this query. (type: listoftupleofstrandint) | |
| timeout | A tupleofintgiving the timeout to use for this
query. | |
| queriesLeft | A intgiving the number of queries which may yet be attempted 
to answer this query before the attempt will be abandoned. | |
| Returns | A Deferredwhich fires with a three-tuple of lists oftwisted.names.dns.RRHeadergiving the response, or with aFailureif 
there is a timeout or response error. | |
Interpret the response to a query, checking for error codes and following delegations if necessary.
| Parameters | response | The Messagereceived in response to issuingquery. (type:Message) | 
| query | The dns.Querywhich
was issued. (type:dns.Query.) | |
| timeout | The timeout to use if another query is indicated by this response. (type: tupleofint) | |
| queriesLeft | A intgiving the number of queries which may yet be attempted 
to answer this query before the attempt will be abandoned. | |
| Returns | A Failureindicating a response error, a three-tuple of lists oftwisted.names.dns.RRHeadergiving the response toqueryor aDeferredwhich
will fire with one of those. | |