On 23 March 2011 12:28, sujata patra <[email protected]> wrote:
> Let's say the tableis registered as below .
> initialize_xxxx {
> netsnmp_inject_handler_before(reg,
>         netsnmp_get_cache_handler(timeout_default_value,
>                                  xxx_load,xxx_free,
>                                  xxx_oid,xxx_oid_len),
>             TABLE_ITERATOR_NAME);
> struct config_line * cl =
> register_app_prenetsnmp_mib_handler("cacheTimeout",
>               getTimeout, NULL, NULL);
> }
>
>  getTimeout(const char *token, char *line)
>  {
>         int cacheTimeOut_ = 0;
>
>          line = read_config_read_data(ASN_INTEGER,   line,
>                                  &cacheTimeOut_, NULL);
> +    netsnmp_cache * cache =
> netsnmp_cache_find_by_oid(xxx_oid,xxx_oid_len);
> +     cache->timeout= cacheTimeOut_
>
> }
>
> Do you mean to say this ?


That feels about right, yes.

Though there's no real benefit in using
   register_app_prenetsnmp_mib_handler()
      here.   You might as well use the standard
   register_app_config_handler()

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

Reply via email to