2009/5/29 Navjyot <[email protected]>:
> I have my own database, which will store the data related to the mib
> tabular and scalar variables.... In database, i am taking care of storing it 
> in
> SNMP-index-compliant manner.
> My database is just exposing few API


> I just want simple code from mib2c, wherein i should be able to call my
> database API based on the option(get,set,create) and table and column
> id.

I suspect that you might be best off using the basic "table" helper,
rather than any of the more-specific table helpers (iterate, container, etc).

Unfortunately there isn't a mib2c template for this - so the simplest
is probably to use something like 'table_data' or 'iterate', and then
tweak this to register the table using 'netsnmp_register_table()' instead.

The main thing to be careful of is when processing GETNEXT requests.
The table helper will extract the requested index values, but you'll have
to take care of identifying the next row in the table, and updating the
OID accordingly.
   The descriptions in AGENT.txt, and the old UCD-style code might
help you here, since that's effectively what happens there.



Dave

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to