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

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

A resolver that services hosts(5) format files.
Method upgradeToVersion1 Undocumented
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 Undocumented
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

Inherited from Versioned:

Method __setstate__ Undocumented
Method __getstate__ Get state, adding a version number to it on its way out.
Method versionUpgrade (internal) Do a version upgrade.
def upgradeToVersion1(self): (source)
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-06-04 17:20:01.