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 request. This is quite different from usual DNS requests. See http://cr.yp.to/djbdns/axfr-notes.html for more information.|
|Instance Variable||_reactor||A provider of
|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
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.
resolv.conf(5)-format file given by
resolvas well as those in the given
serverslist. Servers are queried in a round-robin fashion. If given,
resolvis periodically checked for modification and re-parsed if it is noticed to have changed.
|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.|
TODO: Weight servers for response time so faster ones can be preferred.
DNSDatagramProtocolbound to a randomly selected port number.
dns.DNSProtocolinstances when they connect.
dns.DNSProtocolinstances when they disconnect.
_connectedProtocol, issue a query to it using
*args, and arrange for it to be disconnected from its transport after the query completes.
|Parameters||*args||Positional arguments to be passed to |
|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: |
|Parameters||queries||The queries to make. (type: Any non-zero number of |
|timeout||The number of seconds after which to fail. (type: |
|Returns|| (type: |
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.Queryfor 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.