Hi ,
I am currently implementing dynamic context registration via IF-Table.
In the init_ifTable , I did the following changes .
_ifTable_initialize_interface(user_context, flags,NULL);
_ifTable_initialize_interface(user_context, flags,"context1");
_ifTable_initialize_interface(user_context, flags,"context2");
I handled these context in the _mfd_ifTable_get_values
Based on the context received via snmpwalk , I filter over the oid and send it
back ,
Actually when I do the same with hardcoded value , it was working find and I
got expected output ,
bash-4.3# snmpwalk -v3 -u testUser -l authPriv -a MD5 -A 'password' -x DES -X
'password' -n " context1" 172.17.0.2 1.3.6.1.2.1.2.2.1.7
IF-MIB::ifAdminStatus.1 = INTEGER: up(1)
IF-MIB::ifAdminStatus.3 = INTEGER: up(1)
IF-MIB::ifAdminStatus.3 = No more variables left in this MIB View (It is past
the end of the MIB tree)
bash-4.3# snmpwalk -v3 -u testUser -l authPriv -a MD5 -A 'password' -x DES -X
'password' -n " context2" 172.17.0.2 1.3.6.1.2.1.2.2.1.7
IF-MIB::ifAdminStatus.2 = INTEGER: up(1)
IF-MIB::ifAdminStatus.4 = INTEGER: up(1)
But I want to do the same in dynamic way , means the initialization I want to
do check new context table and
Check if any updates is there , if any need to initialize interface with new
table name .
However , the initialization linked with init call , So is there any way to
initialize the table intermediate and register with new table .
Like below
Void _Custom_ifTable_initialize_interface(I fTable_registration
user_context,char * MyContext)
{
ifTable_registration *user_context;
u_long flags =0 ;
user_context = netsnmp_create_data_list("ifTable", NULL, NULL);
_ifTable_initialize_interface(user_context,flags, MyContext)
}
Regards,
Sridhar .L
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders