Objects of async_session class

The instances of async_session class have the following methods:

open()

Create a socket to be used for communication with remote SNMP process, and pass it to asyncore I/O engine.

This method must be called once upon class instance creation.

send_request(encoded_oids, encoded_vals[, type])

Build and send SNMP message of optionally specified type and put lists of BER encoded Object IDs encoded_oids and their associated values encoded_vals into the message.

Object IDs and their respective values are matched against each other by their positions in the encoded_oids and encoded_vals lists.

The payload for type, encoded_oids and encoded_vals lists can be build with methods, inherited from session superclass.

The default value for type is `GETREQUEST'.

User specified callback_fun will be invoked by asynchronous SNMP manager upon SNMP reply arrival.

Objects of async_session class have the following public instance variables:

port

Specify the UDP port of remote SNMP process. The port variable is of type integer.

The value of the port variable takes effect only if specified before open() method is invoked.

The default value for UDP port is 161.

iface

Specify the IP number of local interface SNMP engine is to bind to. All SNMP requests would be originated from the interfaces SNMP engine binds to.

The value of the iface variable takes effect only if specified before open() method is invoked.

The iface attribute should be a list of strings where each string should represent either FQDN or IP number of desired local interface.

The default value is None what means to bind to all the local interfaces and originate SNMP request from primary system interface.

XXX: current implementation binds ONLY to the first interface of the list.


ilya@glas.net