On Wed, 13 Oct 2004 18:12:30 +0530 Karthikeyan wrote:
KN> > You might want to extract the cache_helper from 5.2, which will allow you
KN> > to have the cache refreshed periodically. Otherwise, you can use a timer
KN> > in 5.1.2 to achieve a similar effect.
KN>
KN> Please elaborate in detail about these examples. I am not getting it
KN> properly. I searched for the code netsnmp_cache in nsCache.c file. This
KN> strcuture is used to retrieve the information for this table. But, where we
KN> are actually filling this structure with datas. For tcpTable example, this
KN> netsnm-_cache is called as a paramenter for tcpTable_load but never used.
The netsnmp_cache doesn't necessarily hold that data, it is the structure that
the agent uses to manage the cache. In the tcpTable, the load routing actually
keeps the cache in the static local variable tcp_head. Another common approach,
which avoids a global, would be to keep a pointer to the cache in the cache
'magic' void pointer.
KN> Yes. you are correct and we can do it like that. But I need to catch all
KN> the datafor all the tables at one place and use it whenever i need it. But,
KN> these data should get updated at regular intervals. If I call anything
KN> inside init() method, then during agent startup it will retrieve the data,
KN> but then init() method will never b call again. So, I cannot fetch the
KN> current data in regular intervals. is there any function which calls in
KN> loop throughtout the snmpd is running?
http://www.net-snmp.org/tutorial-5/agent/group__snmp__alarm.html
--
Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
<irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>
You are lost in a twisty maze of little standards, all different.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders