[EMAIL PROTECTED] wrote on 02/06/2008 02:34:48
AM:
> On 05/02/2008, Lisa Morgan <[EMAIL PROTECTED]> wrote:
> > Each OID is registered individually by calling
> > 'netsnmp_create_handler_registration()'.
>
> No - that just creates the handler registration structure.
> How are these OIDs actually registered?
> What is the full code of your initialisation function?
>
Is this enough? The rest of the initialization code is a bunch of
convoluted C++.
bool NetInstance::registerOID( const OID& oidToRegister,
Handler handler ) {
netsnmp_handler_registration * test;
test = netsnmp_create_handler_registration( "test", handler,
(oid*)oidToRegister.toOid(),
oidToRegister.getSize(),
HANDLER_CAN_RWRITE );
test->handler->myvoid = this;
netsnmp_register_instance( test );
TB("Register OID=%s", oidToRegister.toString());
return true;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders