Dear all :
I have a question about CONTAINER_INSERT function , .
I use CONTAINER_INSERT to insert multi index data which is 18 X 512 volumn in net-snm
But when I upgrade to net-snm
Shall I change my code architecture?
Here is code
void
init_quanta_s31elLogTable(void)
{
s31elLogTable_context *context;
netsnmp_index index;
oid index_oid, sub_index_oid, temp_index_oid[2];
int time1,time2 ;
time1 = clock();
#ifdef s31elLogTable_MULTI_INDEX
DEBUGMSGTL(("mySnmp",
"Initial 's31elLogTable' table (multi-index)...\n"));
#else
DEBUGMSGTL(("mySnmp", "Initial 's31elLogTable' table...\n"));
#endif
initialize_table_s31elLogTable();
for (index_oid = 1; index_oid <= s31elLogTable_ROW_MAX; index_oid++) {
for (sub_index_oid = 1; sub_index_oid <= s31elLogTable_SUB_ROW_MAX;
sub_index_oid++) {
temp_index_oid[0] = index_oid;
temp_index_oid[1] = sub_index_oid;
index.oids = temp_index_oid;
index.len = 2;
context = SNMP_MALLOC_TYPEDEF(s31elLogTable_context);
s31elLogTable_extract_index(context, &index);
time1 = clock();
CONTAINER_INSERT(cb.container, context);
time2 = clock();
system_printf("extract_index take %d\n",time2-time1);
}
}
}
Here is mib file :
s31elLogTable OBJECT-TYPE
SYNTAX SEQUENCE OF S31elLogEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"A table containing Event Log records."
::={ s31el2 3 }
s31elLogEntry OBJECT-TYPE
SYNTAX S31elLogEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"This table presents the list of all events which are present in the
MMB event log."
INDEX { s31elLogSource,s31elLogId}
::= { s31elLogTable 1 }
S31elLogEntry ::= SEQUENCE {
s31elLogSource INTEGER,
s31elLogTime DisplayString,
s31elLogSeverity DisplayString,
s31elLogId INTEGER,
s31elLogText DisplayString
}
Regards,
Brenden Lai
--- 本郵件來自HiNet WebMail ---
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________ 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
