You are right. I have the following statement after the code below: netsnmp_register_instance(m_regHandler);
Thanks, Shantanu -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Shield Sent: Friday, November 30, 2007 1:33 PM To: Shantanu Sinha Cc: [email protected] Subject: Re: Registering callback for app root oid: 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 ------------------------------------------------------------------------------------------------------------------- CONFIDENTIALITY NOTICE: This e-mail and any files attached may contain confidential and proprietary information of Alcatel-Lucent and/or its affiliated entities. Access by the intended recipient only is authorized. Any liability arising from any party acting, or refraining from acting, on any information contained in this e-mail is hereby excluded. If you are not the intended recipient, please notify the sender immediately, destroy the original transmission and its attachments and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Copyright in this e-mail and any attachments belongs to Alcatel-Lucent and/or its affiliated entities. ------------------------------------------------------------------------- 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
