On 23 December 2011 12:44, Suresh kumar <skjaiswa...@hotmail.com> wrote:
> 2.       Now we are trying to implement CONNECTION table which is a dynamic
> table. When the system starts (when snmpd agent is launched) there may or
> may not be any entries in this table and eventually as connections are
> configured this table is populated. The initialize_table_() function will be
> called once only when the daemon initializes the modules.


The primary purpose of the initialize_table_xxx function is to *register* the
table with the agent.   I.e. tell the agent what the structure of the table is,
what columns it has, what type of indexing it uses, and where the root of
the table is located.
   Initializing the table would not normally involve setting values.


> How do we handle the updation of Connection Table?

The most common approach would be use the cache helper,
which will be called when a request is received for this table.
This load routine would populate the local version of the table
with data from the underlying system, and the MIB handler would
then use this local version to process the request.

This local version would normally be retained for a few seconds
and used to process subsequent requests, until the cache helper
decided it was "too old" to be useful, and would then call the load
routine again.


>             If yes, we would like to know what
> functions can we use here for implementing both GET and SET modes?
> The so far examples posted in different forums do not address this part.

You haven't said which mib2c framework you are using for your table,
but a number of them take the option

    mib2c -Scache=1 .....

which will include the basic cache handling code.

Dave

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to