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

Type Answer

object --+
         |
        Answer


DNS stub resolver answer

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

For convenience, the answer object implements much of the sequence protocol, forwarding to its rrset. E.g. "for a in answer" is equivalent to "for a in answer.rrset", "answer[i]" is equivalent to "answer.rrset[i]", and "answer[i:j]" is equivalent to "answer.rrset[i:j]".

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)
  __delitem__(self, i)
  __delslice__(self, i, j)
  __getattr__(self, attr)
  __getitem__(self, i)
  __getslice__(self, i, j)
  __iter__(self)
  __len__(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

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

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 2.1 on Sun Dec 10 12:46:08 2006 http://epydoc.sf.net