Part of twisted.names View Source
The functions exposed in this module can be used for asynchronous name resolution and dns queries.
If you need to create a resolver with specific requirements, such as
needing to do queries against a particular host, the createResolver
function will return an IResolver.
Future plans: Proper nameserver acquisition on Windows/MacOS, better caching, respect timeouts
| Class | Resolver | No summary |
| Class | AXFRController | Undocumented |
| Class | ThreadedResolver | Undocumented |
| Class | DNSClientFactory | Undocumented |
| Function | createResolver | Create and return a Resolver. |
| Function | getResolver | Get a Resolver instance. |
| Function | getHostByName | Resolve a name to a valid ipv4 or ipv6 address. |
| Function | lookupAddress | |
| Function | lookupIPV6Address | |
| Function | lookupAddress6 | |
| Function | lookupMailExchange | |
| Function | lookupNameservers | |
| Function | lookupCanonicalName | |
| Function | lookupMailBox | |
| Function | lookupMailGroup | |
| Function | lookupMailRename | |
| Function | lookupPointer | |
| Function | lookupAuthority | |
| Function | lookupNull | |
| Function | lookupWellKnownServices | |
| Function | lookupService | |
| Function | lookupHostInfo | |
| Function | lookupMailboxInfo | |
| Function | lookupText | |
| Function | lookupSenderPolicy | |
| Function | lookupResponsibility | |
| Function | lookupAFSDatabase | |
| Function | lookupZone | |
| Function | lookupAllRecords | |
| Function | lookupNamingAuthorityPointer |
| Parameters | servers | If not None, interpreted as a list of domain name servers to
attempt to use. Each server is a tuple of address in str
dotted-quad form and int port number. (type: list of (str, int) or None) |
| resolvconf | If not None, on posix systems will be interpreted as an
alternate resolv.conf to use. Will do nothing on windows systems. If
None, /etc/resolv.conf will be used. (type: str or None) | |
| hosts | If not None, an alternate hosts file to use. If
None on posix systems, /etc/hosts will be used. On windows,
C:\windows\hosts will be used. (type: str or None) | |
| Returns | (type: IResolver) | |
Create twisted.names.client.theResolver if it is None, and
then return that value.
| Returns | (type: IResolver) | |
Will errback with DNSQueryTimeoutError on a timeout,
DomainError or AuthoritativeDomainError (or
subclasses) on other errors.
| Parameters | name | DNS name to resolve. (type: str) |
| timeout | Number of seconds after which to reissue the query. When the last timeout
expires, the query is considered failed. (type: Sequence of int) | |
| effort | How many times CNAME and NS records to follow while resolving this name. (type: int) | |
| Returns | (type: Deferred) | |