pysnmp.mapping.udp.asynrole
index
/home/mcfletch/pylive/pysnmp/mapping/udp/asynrole.py

Asynchronous SNMP manager class based on Sam Rushing's asyncore class.
 
Copyright 1999-2002 by Ilya Etingof <ilya@glas.net>. See LICENSE for
details.

 
Modules
       
asyncore
pysnmp.mapping.udp.error
pysnmp.mapping.udp.role
sys

 
Classes
       
dispatcher
Agent
Agent
Manager
Manager

 
class Agent(dispatcher)
    An asynchronous SNMP agent based on the asyncore.py class.
 
Wait for and receive SNMP request messages, send SNMP response
messages asynchronously.
 
  Methods defined here:
__init__(self, (cbFun, cbCtx), ifaces=[('0.0.0.0', 161)])
handle_close(self)
Invoked by asyncore on connection closed event
handle_connect(self)
Objects of this class never expect connect events
handle_error(self, excType=None, excValue=None, excTraceback=None)
Invoked by asyncore on any exception
handle_read(self)
Overloaded asyncore method -- read SNMP message from socket.
 
This does NOT time out so one needs to implement a mean of
handling timed out requests (perhaps it's worth looking at
medusa/event_loop.py for an interesting approach).
send(self, rspMsg, dstAddr)
send(rspMsg, dstAddr)
 
Send SNMP message (string) to remote SNMP process by 'dstAddr' address
(given in socket module notation).
writable(self)
Objects of this class never expect write events

Methods inherited from dispatcher:
__getattr__(self, attr)
# cheap inheritance, used to pass all other attribute
# references to the underlying socket object.
__repr__(self)
accept(self)
add_channel(self, map=None)
bind(self, addr)
close(self)
connect(self, address)
create_socket(self, family, type)
del_channel(self, map=None)
handle_accept(self)
handle_expt(self)
handle_expt_event(self)
handle_read_event(self)
handle_write(self)
handle_write_event(self)
listen(self, num)
log(self, message)
log_info(self, message, type='info')
readable(self)
recv(self, buffer_size)
set_reuse_addr(self)
set_socket(self, sock, map=None)

Data and other attributes inherited from dispatcher:
accepting = False
addr = None
closing = False
connected = False
debug = False

 
class Manager(dispatcher)
    An asynchronous SNMP manager based on the asyncore.py class.
 
  Methods defined here:
__init__(self, (cbFun, cbCtx)=(None, None), dstAddr=(None, 0), iface=('0.0.0.0', 0))
handle_close(self)
Invoked by asyncore on connection closed event
handle_connect(self)
Objects of this class never expect connect events
handle_error(self, excType=None, excValue=None, excTraceback=None)
Invoked by asyncore on any exception
handle_read(self)
Overloaded asyncore method -- read SNMP reply message from
socket.        
 
This does NOT time out so one needs to implement a mean of
handling timed out requests (see examples/async_snmp.py for
one of possible solutions).
send(self, reqMsg, dstAddr=(None, 0), (cbFun, cbCtx)=(None, None))
send(reqMsg[, dstAddr[, (cbFun, cbCtx)]])
 
Send SNMP message (string) to remote server process as specified
on manager object creation or by 'dstAddr' address (given
in socket module notation).
 
The callback function (as specified on manager object creation)
will be invoked on response arrival or error.
writable(self)
Objects of this class never expect write events

Methods inherited from dispatcher:
__getattr__(self, attr)
# cheap inheritance, used to pass all other attribute
# references to the underlying socket object.
__repr__(self)
accept(self)
add_channel(self, map=None)
bind(self, addr)
close(self)
connect(self, address)
create_socket(self, family, type)
del_channel(self, map=None)
handle_accept(self)
handle_expt(self)
handle_expt_event(self)
handle_read_event(self)
handle_write(self)
handle_write_event(self)
listen(self, num)
log(self, message)
log_info(self, message, type='info')
readable(self)
recv(self, buffer_size)
set_reuse_addr(self)
set_socket(self, sock, map=None)

Data and other attributes inherited from dispatcher:
accepting = False
addr = None
closing = False
connected = False
debug = False

 
agent = class Agent(dispatcher)
    An asynchronous SNMP agent based on the asyncore.py class.
 
Wait for and receive SNMP request messages, send SNMP response
messages asynchronously.
 
  Methods defined here:
__init__(self, (cbFun, cbCtx), ifaces=[('0.0.0.0', 161)])
handle_close(self)
Invoked by asyncore on connection closed event
handle_connect(self)
Objects of this class never expect connect events
handle_error(self, excType=None, excValue=None, excTraceback=None)
Invoked by asyncore on any exception
handle_read(self)
Overloaded asyncore method -- read SNMP message from socket.
 
This does NOT time out so one needs to implement a mean of
handling timed out requests (perhaps it's worth looking at
medusa/event_loop.py for an interesting approach).
send(self, rspMsg, dstAddr)
send(rspMsg, dstAddr)
 
Send SNMP message (string) to remote SNMP process by 'dstAddr' address
(given in socket module notation).
writable(self)
Objects of this class never expect write events

Methods inherited from dispatcher:
__getattr__(self, attr)
# cheap inheritance, used to pass all other attribute
# references to the underlying socket object.
__repr__(self)
accept(self)
add_channel(self, map=None)
bind(self, addr)
close(self)
connect(self, address)
create_socket(self, family, type)
del_channel(self, map=None)
handle_accept(self)
handle_expt(self)
handle_expt_event(self)
handle_read_event(self)
handle_write(self)
handle_write_event(self)
listen(self, num)
log(self, message)
log_info(self, message, type='info')
readable(self)
recv(self, buffer_size)
set_reuse_addr(self)
set_socket(self, sock, map=None)

Data and other attributes inherited from dispatcher:
accepting = False
addr = None
closing = False
connected = False
debug = False

 
manager = class Manager(dispatcher)
    An asynchronous SNMP manager based on the asyncore.py class.
 
  Methods defined here:
__init__(self, (cbFun, cbCtx)=(None, None), dstAddr=(None, 0), iface=('0.0.0.0', 0))
handle_close(self)
Invoked by asyncore on connection closed event
handle_connect(self)
Objects of this class never expect connect events
handle_error(self, excType=None, excValue=None, excTraceback=None)
Invoked by asyncore on any exception
handle_read(self)
Overloaded asyncore method -- read SNMP reply message from
socket.        
 
This does NOT time out so one needs to implement a mean of
handling timed out requests (see examples/async_snmp.py for
one of possible solutions).
send(self, reqMsg, dstAddr=(None, 0), (cbFun, cbCtx)=(None, None))
send(reqMsg[, dstAddr[, (cbFun, cbCtx)]])
 
Send SNMP message (string) to remote server process as specified
on manager object creation or by 'dstAddr' address (given
in socket module notation).
 
The callback function (as specified on manager object creation)
will be invoked on response arrival or error.
writable(self)
Objects of this class never expect write events

Methods inherited from dispatcher:
__getattr__(self, attr)
# cheap inheritance, used to pass all other attribute
# references to the underlying socket object.
__repr__(self)
accept(self)
add_channel(self, map=None)
bind(self, addr)
close(self)
connect(self, address)
create_socket(self, family, type)
del_channel(self, map=None)
handle_accept(self)
handle_expt(self)
handle_expt_event(self)
handle_read_event(self)
handle_write(self)
handle_write_event(self)
listen(self, num)
log(self, message)
log_info(self, message, type='info')
readable(self)
recv(self, buffer_size)
set_reuse_addr(self)
set_socket(self, sock, map=None)

Data and other attributes inherited from dispatcher:
accepting = False
addr = None
closing = False
connected = False
debug = False