RPKI Engine  1.0
Public Member Functions | Public Attributes
rpki::adns::query Class Reference
Inheritance diagram for rpki::adns::query:
Inheritance graph
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.


Constructor & Destructor 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.


Member Function Documentation

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

Definition at line 258 of file adns.py.

Referenced by done1(), and lose().

Here is the caller graph for this function:

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.

References rpki::adns::dispatcher::cb, cb, cleanup(), lose(), nameservers, qclass, qname, qtype, and response.

Referenced by socket_cb().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

References backoff, loop1(), lose(), nameservers, response, and start.

Here is the call graph for this function:

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.

Referenced by done2().

Here is the caller graph for this function:

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.

References lose(), socket_cb(), socket_eb(), socket_timeout(), sockets, and start.

Here is the call graph for this function:

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.

References cleanup(), rpki::adns::dispatcher::eb, and eb.

Referenced by done1(), done2(), loop2(), and socket_eb().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

References done1(), iterator, nameservers, request, and response.

Referenced by loop2().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

References iterator, lose(), and response.

Referenced by loop2().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

References iterator, and response.

Referenced by loop2().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 142 of file adns.py.

Referenced by done2().

Definition at line 165 of file adns.py.

Referenced by socket_cb(), socket_eb(), and socket_timeout().

Definition at line 142 of file adns.py.

Referenced by done1(), done2(), and socket_cb().

Definition at line 122 of file adns.py.

Referenced by rpki::adns::test_query::done(), done1(), and rpki::adns::test_query::lose().

Definition at line 122 of file adns.py.

Referenced by rpki::adns::test_query::done(), done1(), and rpki::adns::test_query::lose().

Definition at line 142 of file adns.py.

Referenced by socket_cb().

Definition at line 142 of file adns.py.

Referenced by done1(), done2(), socket_cb(), socket_eb(), and socket_timeout().

Definition at line 142 of file adns.py.

Referenced by loop2().

Definition at line 122 of file adns.py.

Referenced by done2(), and loop2().

Definition at line 142 of file adns.py.


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