Hello,
I run a snmp agent developed under Net-SNMP in an embed system,
the program eats much memory when adding indexes for each table.
I call the following functions to initialize the table:
netsnmp_create_hander_registration(...)
netsnmp_tdata_create_table(...)
netsnmp_table_helper_add_indexes(...)
set min_colnum and max_colnum...
/*initialise the contents of table*/
for (i=1; i<=TAB_ROW_CNT; i++)
xxxTable_createEntry(..., i)
I definite the row number as index for each table. And all the data to be
get and set are external to snmp agent. In function
xxxTable_createEntry(...),
I create enough rows to add the indexes(the row number exactly). So if the
table
contain much more rows, the initialize table process takes more time and
consume
much more memory.
If I remove the index, snmpget could work because I can get the row and
col number
by parsing request packets. And then I can get data by using the row and
col number.
But the snmpgetnext couldn't work.
Any other "helper" or "container" or table structure should I use?
Which mib2c configuration file should I use to create the table template
code?
Must I add indexes to snmp agent?
Thanks a lot for helps!
Best regards,
Song Hao 郝松
Meter System Division
Shenzhen Kaifa Technology Co., Ltd.
深圳长城开发科技股份有限公司
Tel: 86-755-83032000-33303
Direct Tel: 86-755-83032303
Fax: 86-755-83275061
This message has been scanned.
(210.245.235.14)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users