Hi,
I am using NETSNMP for my SNMP AGENT. I need to implement some
private mibs. I have the mib file along with the assigned oid's.
As NETSNMP provides mib2c tool for generating most of the code, i too
wanted to use it. But i am getting some issues.
I have my own database, which will store the data related to the mib
tabular and scalar variables. I mean, in case of insertion, i will save
the data into Database. In case of deletion, i will remove it from my
database. In database, i am taking care of storing it in
SNMP-index-compliant manner.
My database is just exposing few API
create_row(table_id,...)(indexes of table will be passed)
delete_row(table_id)
get_data(table_id, column_id,...)(indexes of table will be passed)
set_data(table_id,column_id,...)(indexes of table will be passed)
get_first(table_id,column_id,...)
get_next(table_id,column_id,...)
So basically i just need to call these API from my agent code. I tried
generating netsnmp compatible code using mib2c. But it is asking for
other options. and i am not able to figure out which will suit my
requirement best.
i generated using mib2c -c mib2c.iterate.conf option.
but here i am finding that it needs to maintain pointers to all my rows.
And it will internally use table_iterator API's to do all the work.
I have my database. I cannot give them pointer to all my rows. Otherwise
there is no use of maintaining a DATABASE.
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.
Initially i was using UCP style snmp coding. there, when i select ucd
style coding option in mib2c, it will just give me what i want. It will
give me write functions for each mib object, where i can call my
DATABASE API. Also in case of GET, i will get the switch case, where
again i can call my DATABASE API.
I want something similar in net-snmp style coding also. As my DATABASE
is already there.
Can anyone help me, which option will suit my requirement. Also can
someone send me the link which will explain all these options in details
along with examples.
Regard's
Navjyot.
------------------------------------------------------------------------------
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