Thanks. That worked and it now does cache loads/frees. But it is not working as I expected.
1) I thought it would always issue a free before a load. However, the
first time I issue a command (this happens whether I issue it right away
after the table init routine or if I wait more than 60 seconds (my timeout
value), I see the load without a free first. My table is now 8 rows long
instead of 4. (The table init creates indexes 1 - 4, and the cache load
creates 5 - 8. See screen1 file attached.)
2) After 60 seconds, I see the cache free. This works ok, but when I issue
another command, I never see another load and I get an error message for
the command.
I have included my .c, a debug file, and the output of my snmptable
command. I have net-snmp-5.3.2.2-7.el5_4.2 on RedHat 5.4. Let me know if
you need more info. Thanks.
(See attached file: lldpPortConfigTable.c)(See attached file: debug.txt)
(See attached file: screen1.txt)
Kathy McLeod
Dept S82 CCB - SNMP
IBM Rochester, MN
(507) 253-4803
Dave Shield
<d.t.shi...@liver
pool.ac.uk> To
Sent by: Kathy McLeod/Rochester/i...@ibmus
dave.shi...@googl cc
email.com [email protected]
t
Subject
04/06/2010 04:51 Re: cache load never gets called
AM
On 30 March 2010 21:12, Kathy McLeod <[email protected]> wrote:
> I ran the mib2c to generate a cache handler for a file created using
> mib2c.table_data.conf. The main function still works ok, but even tho I
> set the cache timeout value to -1, it never seems to expire. I also
tested
> with a timeout value of 60 and it didn't expire. The only debug
statements
> I get are the ones in the init and deinit routines. I am not able to
> figure out what is wrong.
The cache helper is not getting injected into the helper chain correctly.
It needs to be inserted before the handler "TABLE_TDATA_NAME"
rather than "TABLE_DATA_NAME".
I'll tweak the mib2c config file accordingly.
Dave
lldpPortConfigTable.c
Description: Binary data
debug.txt
Description: Binary data
screen1.txt
Description: Binary data
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ Net-snmp-users mailing list [email protected] Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
