Re: how to Initialise the contents of the table?

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 10/08/06, 蔷<Qiang Hu> <[email protected]> wrote:
> I generated mib2c files by mib2c.conf also with iterator option.and now i
> wanted to know how to Initialise the contents of the table

If you look at the generated code, you should see a routine
'tbModuleTable_createEntry()'.  Call this with the relevant values for
each row you wish to create.

The only unexpected thing is you'll need to explicitly set the 'valid'
flag for each row.
Something like:

struct tbModuleTable_entry *entry;

entry = tbModuleTable_createEntry(1, 256, "eenie");
entry->valid = 1;
entry = tbModuleTable_createEntry(3, 128, "meenie");
entry->valid = 1;
entry = tbModuleTable_createEntry(4, 64, "mynie");
entry->valid = 1;
entry = tbModuleTable_createEntry(2, 32, "mo");
entry->valid = 1;


Dave

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.