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 IPv4 addresses from self.file and return them as Record_A 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 Dispatch query to the method which can handle its type.
Method lookupAddress6
Method lookupMailExchange
Method lookupNameservers
Method lookupCanonicalName
Method lookupMailBox
Method lookupMailGroup
Method lookupMailRename
Method lookupPointer
Method lookupAuthority
Method lookupNull
Method lookupWellKnownServices
Method lookupService
Method lookupHostInfo
Method lookupMailboxInfo
Method lookupText
Method lookupSenderPolicy
Method lookupResponsibility
Method lookupAFSDatabase
Method lookupZone
Method lookupNamingAuthorityPointer
Method lookupAllRecords
Method getHostByName
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 IPv4 addresses from self.file and return them as Record_A instances.
API Documentation for Twisted, generated by pydoctor at 2012-12-26 12:18:15.