Hello All
In my Net-SNMP ,version 5.2.2 ,the agent trigger handlers that not
relevant for the specific request,
EXAMPLE:
I've 2 tables entityStateTable (from the ENTITY-MIB) and the ccCopyTable
(from CISCO-CONFIG-COPY-MIB) when i walk on the table
entityStateTable the agent triggered ,also, the ccCopyTable handler ,the
agent response is O.k - i receive response only from the
entityStateTable but it can be problematic in performance issue.
Attached the code that responsible for the handlers registration.
void
initialize_table_entStateTable(void)
{
static oid entStateTable_oid[] = {1,3,6,1,2,1,131,1,1};
size_t entStateTable_oid_len = OID_LENGTH(entStateTable_oid);
netsnmp_handler_registration *reg;
netsnmp_table_data *table_data;
netsnmp_table_registration_info *table_info;
reg = netsnmp_create_handler_registration(
"entStateTable", entStateTable_handler,
entStateTable_oid, entStateTable_oid_len,
HANDLER_CAN_RWRITE
);
table_data = netsnmp_create_table_data( "entStateTable" );
table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info );
netsnmp_table_helper_add_indexes(table_info,
ASN_INTEGER, /* index: entPhysicalIndex */
0);
table_info->min_column = COLUMN_ENTSTATELASTCHANGED;
table_info->max_column = COLUMN_ENTSTATESTANDBY;
netsnmp_register_table( reg, table_info );
DEBUGMSGTL(( "entStateTable", "register table "));
}
void
initialize_table_ccCopyTable(void)
{
static oid ccCopyTable_oid[] = {1,3,6,1,4,1,9,9,96,1,1,1};
size_t ccCopyTable_oid_len = OID_LENGTH(ccCopyTable_oid);
netsnmp_handler_registration *reg;
netsnmp_table_data *table_data;
netsnmp_table_registration_info *table_info;
reg = netsnmp_create_handler_registration(
"ccCopyTable", ccCopyTable_handler,
ccCopyTable_oid, ccCopyTable_oid_len,
HANDLER_CAN_RWRITE
);
table_data = netsnmp_create_table_data( "ccCopyTable" );
table_info = SNMP_MALLOC_TYPEDEF( netsnmp_table_registration_info );
netsnmp_table_helper_add_indexes(table_info,
ASN_UNSIGNED, /* index: ccCopyIndex */
0);
table_info->min_column = COLUMN_CCCOPYPROTOCOL;
table_info->max_column = COLUMN_CCCOPYENTRYROWSTATUS;
netsnmp_register_table( reg, table_info );
DEBUGMSGTL(( "ccCopyTable", "register table "));
}
Can somone help me with that ?
Kobi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders