interface documentation

class IResolver(IResolverSimple): (source)

Known implementations: twisted.names.client, twisted.names.common.ResolverBase, twisted.names.resolve.ResolverChain

View In Hierarchy

Undocumented

Method lookup​Address Perform an A record lookup.
Method lookup​Address6 Perform an A6 record lookup.
Method lookup​AFSDatabase Perform an AFSDB record lookup.
Method lookup​All​Records Perform an ALL_RECORD lookup.
Method lookup​Authority Perform an SOA record lookup.
Method lookup​Canonical​Name Perform a CNAME record lookup.
Method lookup​Host​Info Perform a HINFO record lookup.
Method lookup​IPV6​Address Perform an AAAA record lookup.
Method lookup​Mail​Box Perform an MB record lookup.
Method lookup​Mailbox​Info Perform an MINFO record lookup.
Method lookup​Mail​Exchange Perform an MX record lookup.
Method lookup​Mail​Group Perform an MG record lookup.
Method lookup​Mail​Rename Perform an MR record lookup.
Method lookup​Nameservers Perform an NS record lookup.
Method lookup​Naming​Authority​Pointer Perform a NAPTR record lookup.
Method lookup​Null Perform a NULL record lookup.
Method lookup​Pointer Perform a PTR record lookup.
Method lookup​Responsibility Perform an RP record lookup.
Method lookup​Sender​Policy Perform a SPF record lookup.
Method lookup​Service Perform an SRV record lookup.
Method lookup​Text Perform a TXT record lookup.
Method lookup​Well​Known​Services Perform a WKS record lookup.
Method lookup​Zone Perform an AXFR record lookup.
Method query Dispatch query to the method which can handle its type.

Inherited from IResolverSimple:

Method get​Host​By​Name Resolve the domain name name into an IP address.
def lookupAddress(name, timeout): (source)
Perform an A record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupAddress6(name, timeout): (source)
Perform an A6 record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupAFSDatabase(name, timeout): (source)
Perform an AFSDB record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupAllRecords(name, timeout): (source)
Perform an ALL_RECORD lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupAuthority(name, timeout): (source)
Perform an SOA record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupCanonicalName(name, timeout): (source)
Perform a CNAME record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupHostInfo(name, timeout): (source)
Perform a HINFO record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupIPV6Address(name, timeout): (source)
Perform an AAAA record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupMailBox(name, timeout): (source)
Perform an MB record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupMailboxInfo(name, timeout): (source)
Perform an MINFO record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupMailExchange(name, timeout): (source)
Perform an MX record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupMailGroup(name, timeout): (source)
Perform an MG record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupMailRename(name, timeout): (source)
Perform an MR record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupNameservers(name, timeout): (source)
Perform an NS record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupNamingAuthorityPointer(name, timeout): (source)
Perform a NAPTR record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupNull(name, timeout): (source)
Perform a NULL record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupPointer(name, timeout): (source)
Perform a PTR record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupResponsibility(name, timeout): (source)
Perform an RP record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupSenderPolicy(name, timeout): (source)
Perform a SPF record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupService(name, timeout): (source)
Perform an SRV record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupText(name, timeout): (source)
Perform a TXT record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupWellKnownServices(name, timeout): (source)
Perform a WKS record lookup.
Parameters
name:strDNS name to resolve.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def lookupZone(name, timeout): (source)

Perform an AXFR record lookup.

NB This is quite different from other DNS requests. See http://cr.yp.to/djbdns/axfr-notes.html for more information.

NB Unlike other lookup* methods, the timeout here is not a list of ints, it is a single int.

Parameters
name:strDNS name to resolve.
timeout:Sequence[int]When this timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second and third elements are always empty. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.
def query(query, timeout): (source)
Dispatch query to the method which can handle its type.
Parameters
query:QueryThe DNS query being issued, to which a response is to be generated.
timeout:Sequence[int]Number of seconds after which to reissue the query. When the last timeout expires, the query is considered failed.
Returns
DeferredA Deferred which fires with a three-tuple of lists of twisted.names.dns.RRHeader instances. The first element of the tuple gives answers. The second element of the tuple gives authorities. The third element of the tuple gives additional information. The Deferred may instead fail with one of the exceptions defined in twisted.names.error or with NotImplementedError.