class SnmpEventLoop

A singleton EventLoop capable of exporting events to the snmp agent. More...

 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods

Public Static Methods

Protected Members

Detailed Description

The SnmpEventLoop class provides an EventLoop to all the MIB modules that need to communicate with XORP. The modules will use the EventLoop to instanciate listeners required for asyncronous inter-process communication with XORP.

typedef std::set<XorpFd> FdSet


typedef std::map<TimeVal, unsigned int> AlarmMap


SnmpEventLoop&  the_instance ()



This function provides the only way to instantiate this class, since all other constructors are private. Use it like this:

 SnmpEventLoop& e = SnmpEventLoop::the_instance();

Now use 'e' anywhere you would use an event loop in Xorp modules, for instance:

 XorpTimer xt = e.new_periodic_ms(100, callback);

NOTE: typically you would never need to call If you do, you should set a short timeout, since while your MIB module is blocked, you cannot process any other SNMP requests.

Returns: reference to the SnmpEventLoop used by all XORP MIB modules.

void  destroy ()


This will free the one and only instance

void  set_log_name (const char * n)



This is the name this class will use to identify itself in the snmpd log. Only used for debugging

const char *  get_log_name ()



AlarmMap _pending_alarms



FdSet _exported_readfds



FdSet _exported_writefds



FdSet _exported_exceptfds



Generated by: bms on on Wed Jul 23 10:06:03 2008, using kdoc 2.0a54+XORP.