Public Member Functions | Public Attributes

rpki.adns.query Class Reference

Inherits object.

Collaboration diagram for rpki.adns.query:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def cleanup
def done1
def done2
def go
def loop1
def loop2
def lose
def socket_cb
def socket_eb
def socket_timeout

Public Attributes

 backoff
 cb
 eb
 iterator
 nameservers
 qclass
 qname
 qtype
 request
 response
 sockets
 start
 timer

Detailed Description

Simplified (no search paths) asynchronous adaptation of
dns.resolver.Resolver.query() (q.v.).

Definition at line 116 of file adns.py.


Member Function Documentation

def rpki.adns.query.__init__ (   self,
  cb,
  eb,
  qname,
  qtype = dns.rdatatype.A,
  qclass = dns.rdataclass.IN 
)

Definition at line 122 of file adns.py.

def rpki.adns.query.cleanup (   self  ) 
Shut down our timer and sockets.

Definition at line 258 of file adns.py.

def rpki.adns.query.done1 (   self  ) 
Done with outer loop.  If we got a useful answer, cache it, then
pass it back to caller; if we got an error, pass the appropriate
exception back to caller.

Definition at line 273 of file adns.py.

def rpki.adns.query.done2 (   self  ) 
Done with inner loop.  If we still haven't got an answer and
haven't (yet?) eliminated all of our nameservers, wait a little
while before starting the cycle again, unless we've hit the
timeout threshold for the whole query.

Definition at line 239 of file adns.py.

def rpki.adns.query.go (   self  ) 
Start running the query.  Check our cache before doing network
query; if we find an answer there, just return it.  Otherwise
start the network query.

Definition at line 138 of file adns.py.

def rpki.adns.query.loop1 (   self  ) 
Outer loop.  If we haven't got a response yet and still have
nameservers to check, start inner loop.  Otherwise, we're done.

Definition at line 162 of file adns.py.

def rpki.adns.query.loop2 (   self,
  iterator,
  nameserver 
)
Inner loop.  Send query to next nameserver in our list, unless
we've hit the overall timeout for this query.

Definition at line 173 of file adns.py.

def rpki.adns.query.lose (   self,
  e 
)
Something bad happened.  Clean up, then pass error back to caller.

Definition at line 266 of file adns.py.

def rpki.adns.query.socket_cb (   self,
  af,
  from_host,
  from_port,
  wire 
)
Received a packet that might be a DNS message.  If it doesn't look
like it came from one of our nameservers, just drop it and leave
the timer running.  Otherwise, try parsing it: if it's an answer,
we're done, otherwise handle error appropriately and move on to
next nameserver.

Definition at line 213 of file adns.py.

def rpki.adns.query.socket_eb (   self,
  e 
)
UDP socket signaled error.  If it really is some kind of socket
error, handle as if we've timed out on this nameserver; otherwise,
pass error back to caller.

Definition at line 200 of file adns.py.

def rpki.adns.query.socket_timeout (   self  ) 
No answer from nameserver, move on to next one (inner loop).

Definition at line 193 of file adns.py.


Member Data Documentation

Definition at line 158 of file adns.py.

Definition at line 130 of file adns.py.

Definition at line 131 of file adns.py.

Definition at line 169 of file adns.py.

Definition at line 159 of file adns.py.

Definition at line 134 of file adns.py.

Definition at line 132 of file adns.py.

Definition at line 133 of file adns.py.

Definition at line 153 of file adns.py.

Definition at line 157 of file adns.py.

Definition at line 152 of file adns.py.

Definition at line 135 of file adns.py.

Definition at line 151 of file adns.py.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables