Part of twisted.names.client View Source View In Hierarchy
|Method||pickServer||Return the address of a nameserver.|
|Method||connectionMade||Called by associated
|Method||connectionLost||Called by associated
|Method||queryUDP||Make a number of DNS queries via UDP.|
|Method||queryTCP||Make a number of DNS queries via TCP.|
|Method||filterAnswers||Extract results from the given message.|
|Method||lookupZone||Perform an AXFR record lookup.|
|Instance Variable||_reactor||A provider of
|Method||_openFile||Wrapper used for opening files in the class, exists primarily for unit testing purposes.|
|Method||_connectedProtocol||Return a new
|Method||_query||Get a new
Inherited from ResolverBase:
|Method||exceptionForCode||Convert a response code (one of the possible values of
|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||lookupNamingAuthorityPointer||Perform a NAPTR record lookup.|
|Method||lookupAllRecords||Perform an ALL_RECORD lookup.|
|Method||getHostByName||Resolve the domain name
dictmapping tuple keys of query name/type/class to Deferreds which will be called back with the result of those queries. This is used to avoid issuing the same query more than once in parallel. This is more efficient on the network and helps avoid a "birthday paradox" attack by keeping the number of outstanding requests for a particular query fixed at one instead of allowing the attacker to raise it to an arbitrary number.
Construct a resolver which will query domain name servers listed in the
resolv.conf(5)-format file given by
well as those in the given
servers list. Servers are queried
in a round-robin fashion. If given,
resolv is periodically
checked for modification and re-parsed if it is noticed to have
|Parameters||servers||If not None, interpreted as a list of (host, port) pairs specifying
addresses of domain name servers to attempt to use for this lookup. Host
addresses should be in IPv4 dotted-quad form. If specified, overrides
|resolv||Filename to read and parse as a resolver(5) configuration file. (type: |
|timeout||Default number of seconds after which to reissue the query. When the last
timeout expires, the query is considered failed. (type: Sequence of |
|reactor||A provider of |
|Raises||ValueError||Raised if no nameserver addresses can be found.|
Wrapper used for opening files in the class, exists primarily for unit testing purposes.
Return the address of a nameserver.
TODO: Weight servers for response time so faster ones can be preferred.
Return a new
bound to a randomly selected port number.
Called by associated
instances when they connect.
Called by associated
instances when they disconnect.
|Parameters||*args||Positional arguments to be passed to |
Make a number of DNS queries via UDP.
|Parameters||queries||The queries to make. (type: A |
|timeout||Number of seconds after which to reissue the query. When the last timeout
expires, the query is considered failed. (type: Sequence of |
|Returns|| (type: |
Make a number of DNS queries via TCP.
|Parameters||queries||The queries to make. (type: Any non-zero number of |
|timeout||The number of seconds after which to fail. (type: |
|Returns|| (type: |
Extract results from the given message.
If the message was truncated, re-attempt the query over TCP and return a Deferred which will fire with the results of that query.
If the message's result code is not
dns.OK, return a
Failure indicating the type of error which occurred.
Otherwise, return a three-tuple of lists containing the results from the answers section, the authority section, and the additional section.
dns.Query for the
given parameters and dispatch it via UDP.
If this query is already outstanding, it will not be re-issued. Instead, when the outstanding query receives a response, that response will be re-used for this query as well.
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||DNS name to resolve. (type: |
|timeout||When this timeout expires, the query is considered failed. (type: |