[Xorp-users] How do class SnmpEventLoop export events to the snmp agent

Bruce Simpson bms at incunabulum.net
Sun May 31 09:06:05 PDT 2009


jjw0927 wrote:
> ...
> Thanks for Bruce's reply.
> But can you tell me the detail about the *communication* between the 
> Class SnmpEventLoop and the mibs(such as bgp4 and ospf)? I do not know 
> which *function* in the files of xorpevents.cc and xorpevents.hh to 
> get the informantion in mibs.

You probably need to gain more familiarity with Net-SNMP as a toolkit to 
understand that code, as the coupling is more involved than a single 
function. I got my Net-SNMP stripes by modifying some 802.11 Wi-Fi 
routers to export MIBs many years ago.

It just embeds a Net-SNMP MIB module in the snmpd process, using the 
shared library mechanism, to retrieve the MIB information via XRL. 
Unfortunately this involves taking a copy of the BGP routing table data, 
making it unsuitable for use in the Default-Free Zone unless you have 
RAM to burn. The OSPF stuff is just a stub and doesn't have any 
functionality, ignore it.

Last August I did a feasibility study / technical report for XORP, Inc. 
to look at the problem in detail. I've been of the opinion that AgentX 
should be used, as it side-steps the need to depend on the loader mechanism.
I'd regard the SNMP functionality as alpha quality in terms of 
functionality only. One of the original goals was that XORP router 
processes wouldn't need any existing changes to be SNMP visible. I don't 
believe that's possible without changes to the XRL architecture.

Net-SNMP does implement macro and function glue to facilitate splicing 
MIBs into the OID tree, but it's largely only suitable for simple C 
applications. If you have a large data structure which needs to be 
exported via SNMP, and it is not mapped into the same address space, you 
can't benefit from Net-SNMP's glue.

These problems are not XORP-specific, or even Net-SNMP-specific, by any 
means. It's just something which needs to be revisited carefully.

thanks,
BMS



More information about the Xorp-users mailing list