Hi,
I am trying to build an agent that could load specified MIBs and then query
selected values. But when I try to print mib information via "print_mib" my
application crashes. I'm using this code to load MIB
netsnmp_init_mib();
read_all_mibs();
snmp_set_mib_warnings(2);
//struct tree *tr = netsnmp_read_module("CISCO-RHINO-MIB");
struct tree *tr = read_mib("CISCO-RHINO-MIB.mib");
//
while(tr)
{
printf("%s\n",tr->label);
tr = tr->next_peer;
}
FILE *f = fopen("test.txt","w");
print_mib(f);
fclose(f);
Using read_module instead of read_mib is practically the same, but
read_module doesn't display any output, while read_mib will produce this
output
http://imgur.com/rbiieWf
When trying to print_mib to file the program then fails.
Any ideas what I did wrong here?
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders