class documentation
class Resolver(common.ResolverBase): (source)
A resolver that services hosts(5) format files.
Method | __init__ |
Undocumented |
Method | lookup |
Read any IPv4 addresses from self.file and return them as Record_A instances. |
Method | lookup |
Read any IPv6 addresses from self.file and return them as Record_AAAA instances. |
Instance Variable | file |
Undocumented |
Instance Variable | ttl |
Undocumented |
Method | _aaaa |
Return a tuple of dns.RRHeader instances for all of the IPv6 addresses in the hosts file. |
Method | _a |
Return a tuple of dns.RRHeader instances for all of the IPv4 addresses in the hosts file. |
Method | _respond |
Generate a response for the given name containing the given result records, or a failure if there are no result records. |
Inherited from ResolverBase
:
Method | exception |
Convert a response code (one of the possible values of dns.Message.rCode to an exception instance representing it. |
Method | get |
Resolve the domain name name into an IP address. |
Method | lookup |
Perform an A6 record lookup. |
Method | lookup |
Perform an AFSDB record lookup. |
Method | lookup |
Perform an ALL_RECORD lookup. |
Method | lookup |
Perform an SOA record lookup. |
Method | lookup |
Perform a CNAME record lookup. |
Method | lookup |
Perform a HINFO record lookup. |
Method | lookup |
Perform an MB record lookup. |
Method | lookup |
Perform an MINFO record lookup. |
Method | lookup |
Perform an MX record lookup. |
Method | lookup |
Perform an MG record lookup. |
Method | lookup |
Perform an MR record lookup. |
Method | lookup |
Perform an NS record lookup. |
Method | lookup |
Perform a NAPTR record lookup. |
Method | lookup |
Perform a NULL record lookup. |
Method | lookup |
Perform a PTR record lookup. |
Method | lookup |
Perform an RP record lookup. |
Method | lookup |
Perform a SPF record lookup. |
Method | lookup |
Perform an SRV record lookup. |
Method | lookup |
Perform a TXT record lookup. |
Method | lookup |
Perform a WKS record lookup. |
Method | lookup |
Perform an AXFR record lookup. |
Method | query |
Dispatch query to the method which can handle its type. |
Instance Variable | type |
Undocumented |
Method | _cb |
Undocumented |
Method | _lookup |
Undocumented |
Class Variable | _errormap |
A dict mapping DNS protocol failure response codes to exception classes which will be used to represent those failures. |
Class Variable | _log |
Undocumented |
Generate a response for the given name containing the given result records, or a failure if there are no result records.
Parameters | |
name:str | The DNS name the response is for. |
records | A tuple of dns.RRHeader instances giving the results that will go into the response. |
Returns | |
A Deferred which will fire with a three-tuple of result records, authority records, and additional records, or which will fail with dns.DomainError if there are no result records. |