This is a discussion on Agentx: Duplicate registrations errocode is not sent back to the within the SNMP Users forums, part of the Networking and Network Related category; Hi, I am using NET-SNMP-5.1.1. Agent runs in Agentx mode. If two different subagent processes (not ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I am using NET-SNMP-5.1.1. Agent runs in Agentx mode. If two different subagent processes (not part of the agents), registers the same MIBs with the Agent, Agent returns AGENTX_ERR_DUPLICATE_REGISTRATION error code in the PDU. But this error code is not sent back to the caller. The following function does not return the error AGENTX_ERR_DUPLICATE_REGISTRATION error code to the caller of netsnmp_register_mib(). netsnmp_session* does not have any 'STATUS' member like in netsnmp_agent_session. In the function register_agentx_list(), this eorror code is captured netsnmp_agent_session structure staus member. This value can not be accessed in netsnmp_register_mib() function. Please let me know how to get back the error code in the PDU to the caller? I will implement, verify and submit the fix to the group. Your help in this regard will be greatly appreciated. Thanks Mahesh netsnmp_register_mib() { ... if (perform_callback) { reg_parms.name = mibloc; reg_parms.namelen = mibloclen; reg_parms.priority = priority; reg_parms.range_subid = range_subid; reg_parms.range_ubound = range_ubound; reg_parms.timeout = timeout; reg_parms.flags = (u_char) flags; /* * Should this really be called if the registration hasn't actually * succeeded? */ snmp_call_callbacks(SNMP_CALLBACK_APPLICATION, SNMPD_CALLBACK_REGISTER_OID, ®_parms); ===========> Note that this functions return value is not being assigned to the return code. } ..... return res_code; } ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |