On 23 March 2011 10:20, sujata patra <[email protected]> wrote: > "agentxsocket" directive is working fine . > > But The other config parameters are not getting initialized before the call > init_nstAgentSubagentObject();
Correct - the 'init_xxx' routines are all called *before* the config files are processed. (both pre- and post- MIB) That's inherent in the framework of the agent, since the init_xxx routines are where these config handlers are actually registered. If the agent tried to process the config files before the init routines, then there's be no config handlers registered to do the processing. > I want few config tokens to be read before the module initialization. > Module initialization needs them. Can't be done. Or at least, not that way. If there is initialisation that depends on the configuration settings, then this should either be done in the config handlers, or (if this isn't appropriate), by registering a "post-config" callback, to be run after the config files have been handled. > let 's say in the init_nstAgentSubagentObject() I want to register a table > with cache_expiry interval > I do not want to give any fixed value but like to have it in the config file. The natural way to handle this would be to have a default cache expiry time (set when you register the table), and then have the config handler change this value. That would also handle the situation where the administrator didn't set a value in the config file. Dave ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
