On 30/11/2007, Shantanu Sinha <[EMAIL PROTECTED]> wrote:
> Here is my sample code for my agentx subagent:
>
> m_arrOID = {1, 3, 6, 1, 4, 1, 3814, 3};
> m_regHandler =  netsnmp_create_handler_registration(m_strName.c_str(),
>                                         requestHandler,
>                                         m_arrOID,
>                                         OID_LENGTH(m_arrOID),
>                                         HANDLER_CAN_RWRITE);
> m_regHandler->my_reg_void = this;

Is that all?
This simply creates the handler registration structure.
It does not register the handler with the agent.


> So when I do a snmpget on .1.3.6.1.4.1.3814.3, the requestHandler gets
> called.

I'm surprised.
>From the code above, I wouldn't ever expect the 'requestHandler' routine
to be called at all.



> But when I do a snmpget on .1.3.6.1.4.1.3814.3.1.0, the requestHandler
> DOES NOT get called.  I intend to use requestHandler() code to process
> all snmp requests for OIDs prefixed with  .1.3.6.1.4.1.3814.3


I would expect you to have some statement of the form
    netsnmp_register_xxxx( m_regHandler, .... )
somewhere following the code above.

Dave

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to