Home | Trees | Index | Help |
|
---|
Package dns :: Module resolver :: Class Resolver |
|
object
--+
|
Resolver
Method Summary | |
---|---|
Initialize a resolver instance. | |
a new object with type S, a subtype of T |
|
dns.resolver.Answer instance |
Query nameservers to find the answer to the question. |
Extract resolver configuration from the Windows registry. | |
Process f as a file in the /etc/resolv.conf format. | |
Reset all resolver configuration to the defaults. | |
Configure Edns. | |
Add a TSIG signature to the query. |
Instance Variable Summary | |
---|---|
dns.resolver.Cache object | cache
- The cache to use. |
dns.name.Name object | domain
- The domain of this host |
int | edns
- The EDNS level to use. |
int | ednsflags
- The EDNS flags |
dns.name.Name object | keyname
- The TSIG keyname to use. |
dict | keyring
- The TSIG keyring to use. |
float | lifetime
- The total number of seconds to spend trying to get an answer to the
question. |
list of strings | nameservers
- A list of nameservers to query. |
int | payload
- The EDNS payload size. |
int | port
- The port to which to send queries. |
list of dns.name.Name objects | search
- The search list. |
float | timeout
- The number of seconds to wait for a response from a server, before
timing out. |
Method Details |
---|
__init__(self,
filename='/etc/resolv.conf',
configure=1)
Initialize a resolver instance.
|
__new__(S, ...)
|
query(self, qname, rdtype=1, rdclass=1, tcp=0)Query nameservers to find the answer to the question. The qname, rdtype, and rdclass parameters may be objects of the appropriate type, or strings that can be converted into objects of the appropriate type. E.g. For rdtype the integer 2 and the the string 'NS' both mean to query for records with DNS rdata type NS.
|
read_registry(self)Extract resolver configuration from the Windows registry. |
read_resolv_conf(self, f)Process f as a file in the /etc/resolv.conf format. If f is a string, it is used as the name of the file to open; otherwise it is treated as the file itself. |
reset(self)Reset all resolver configuration to the defaults. |
use_edns(self, edns, ednsflags, payload)Configure Edns.
|
use_tsig(self, keyring, keyname=None)Add a TSIG signature to the query.
|
Instance Variable Details |
---|
cacheThe cache to use. The default is None.
|
domainThe domain of this host
|
ednsThe EDNS level to use. The default is -1, no Edns.
|
ednsflagsThe EDNS flags
|
keynameThe TSIG keyname to use. The default is None.
|
keyringThe TSIG keyring to use. The default is None.
|
lifetimeThe total number of seconds to spend trying to get an answer to the question. If the lifetime expires, a Timeout exception will occur.
|
nameserversA list of nameservers to query. Each nameserver is a string which contains the IP address of a nameserver.
|
payloadThe EDNS payload size. The default is 0.
|
portThe port to which to send queries. The default is 53.
|
timeoutThe number of seconds to wait for a response from a server, before timing out.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 1.1 on Wed Jul 30 23:38:02 2003 | http://epydoc.sf.net |