On Thu, Jul 16, 2009 at 5:17 PM, Dave Shield<[email protected]> wrote:
> 2009/7/15 Logeswari Viswanath <[email protected]>:
>>          - These session attributes are hardcoded with values 1 sec for
>> timeout and 5 for retries
>>
>>       Can these values be made configurable using the variables
>> agentXTimeout and agentXRetries in the file snmp.conf?
>
> These values *are* configurable using these directives.
> But they should go in the subagent configuration file,
> *not* the library config file ('snmp.conf').
>
> What token do you pass to 'snmp_init' in your subagent?
> That's the name of the config file to use.

I have checked these configurable items but they did not help me.

SNMP agent is initialized using the following function calls

         - init_agent() function where session is opened to the master agent.
           Session attributes timeout and retries are set in
           subagent_open_master_session() function
(agent/mibgroup/agentx/subagent.c)
           (I have pasted the relevant lines of the function)

-----------------------------------------------------------------------------
           sess.retries = SNMP_DEFAULT_RETRIES;
           sess.timeout = SNMP_DEFAULT_TIMEOUT;
-------------------------------------------------------------------------------

            These values are re-initialized in the function
_sess_copy() (snmplib/snmp_api.c)
            (I have pasted the relevant lines of the function)
-----------------------------------------------------------------------------
    if (session->retries == SNMP_DEFAULT_RETRIES)
        session->retries = DEFAULT_RETRIES;
    if (session->timeout == SNMP_DEFAULT_TIMEOUT)
        session->timeout = DEFAULT_TIMEOUT;
-----------------------------------------------------------------------------
            (Ctrl flow - snmp_open_ex -> snmp_sess_open -> _sess_open
-> snmp_sess_copy -> _sess_copy)

         - init_snmp() function where snmp configuration files are
loaded and default_store is used to store the values loaded.


Looking into the code, it looks like the configuration files are
loaded after setting the session attributes. Please correct me if i am
wrong.

Best Regards,
Logeswari.

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to