t.n.h.Resolver(common.ResolverBase) : class documentation

Part of twisted.names.hosts View Source View In Hierarchy

A resolver that services hosts(5) format files.
Method __init__ Undocumented
Method lookupAddress Read any IPv4 addresses from self.file and return them as Record_A instances.
Method lookupIPV6Address Read any IPv6 addresses from self.file and return them as Record_AAAA instances.
Method _aRecords Return a tuple of dns.RRHeader instances for all of the IPv4 addresses in the hosts file.
Method _aaaaRecords Return a tuple of dns.RRHeader instances for all of the IPv6 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 exceptionForCode Convert a response code (one of the possible values of dns.Message.rCode to an exception instance representing it.
Method query Undocumented
Method lookupAddress6 Undocumented
Method lookupMailExchange Undocumented
Method lookupNameservers Undocumented
Method lookupCanonicalName Undocumented
Method lookupMailBox Undocumented
Method lookupMailGroup Undocumented
Method lookupMailRename Undocumented
Method lookupPointer Undocumented
Method lookupAuthority Undocumented
Method lookupNull Undocumented
Method lookupWellKnownServices Undocumented
Method lookupService Undocumented
Method lookupHostInfo Undocumented
Method lookupMailboxInfo Undocumented
Method lookupText Undocumented
Method lookupSenderPolicy Undocumented
Method lookupResponsibility Undocumented
Method lookupAFSDatabase Undocumented
Method lookupZone Undocumented
Method lookupNamingAuthorityPointer Undocumented
Method lookupAllRecords Undocumented
Method getHostByName Undocumented
Class Variable _errormap A dict mapping DNS protocol failure response codes to exception classes which will be used to represent those failures.
Method _lookup Undocumented
Method _cbRecords Undocumented
def __init__(self, file='/etc/hosts', ttl=60 * 60): (source)
Undocumented
def _aRecords(self, name): (source)
Return a tuple of dns.RRHeader instances for all of the IPv4 addresses in the hosts file.
def _aaaaRecords(self, name): (source)
Return a tuple of dns.RRHeader instances for all of the IPv6 addresses in the hosts file.
def _respond(self, name, records): (source)
Generate a response for the given name containing the given result records, or a failure if there are no result records.
ParametersnameThe DNS name the response is for. (type: str)
recordsA tuple of dns.RRHeader instances giving the results that will go into the response.
ReturnsA 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.
def lookupAddress(self, name, timeout=None): (source)
Read any IPv4 addresses from self.file and return them as Record_A instances.
def lookupIPV6Address(self, name, timeout=None): (source)
Read any IPv6 addresses from self.file and return them as Record_AAAA instances.
API Documentation for Twisted, generated by pydoctor at 2013-11-08 22:07:30.