Agentx: Duplicate registrations errocode is not sent back to the

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 ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-12-2005
Kurapati M-G19456
 
Posts: n/a
Default Agentx: Duplicate registrations errocode is not sent back to the

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, &reg_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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:37 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0