Package dns :: Module resolver :: Class Answer
[show private | hide private]
[frames | no frames]

Class Answer

object --+
         |
        Answer


DNS stub resolver answer

Instances of this class bundle up the result of a successful DNS resolution.

For convenience, the answer is iterable. "for a in answer" is equivalent to "for a in answer.rrset".

Note that CNAMEs or DNAMEs in the response may mean that answer node's name might not be the query name.
Method Summary
  __init__(self, qname, rdtype, rdclass, response)
  __getattr__(self, attr)
  __iter__(self)
  __len__(self)
a new object with type S, a subtype of T __new__(S, ...)

Instance Variable Summary
float (seconds since the epoch) expiration - The time when the answer expires
dns.name.Name object qname - The query name
int rdclass - The query class
int rdtype - The query type
dns.message.Message object response - The response message
dns.rrset.RRset object rrset - The answer

Method Details

__new__(S, ...)

Returns:
a new object with type S, a subtype of T

Instance Variable Details

expiration

The time when the answer expires
Type:
float (seconds since the epoch)

qname

The query name
Type:
dns.name.Name object

rdclass

The query class
Type:
int

rdtype

The query type
Type:
int

response

The response message
Type:
dns.message.Message object

rrset

The answer
Type:
dns.rrset.RRset object

Generated by Epydoc 1.1 on Sat Jul 19 02:54:29 2003 http://epydoc.sf.net