Geet Bhatia <geetbhati...@gmail.com> writes:

> Hi,
>
> I am trying to make small manager application in qt (for GUI) with Net-SNMP
> C APIs.
>
> 1. I am able to parse MIB file through read_mib. But when I traverse the
> tree struct, return value of read_mib, to get information it shows zero
> content in that but pointer to that tree is not zero, that means read_mib
> is successful. I confirmed that by printing the MIB from tree to a file
> through print_mib api and this is also successfully writing.
> Please tell me correct way of traversing tree structure and extracting
> information.
> 2. The print_mib api is not printing the description and other information
> of object type in file. My GUI needs to show description also. Please tell
> me correct way to parse the MIB so that I can get the full
> information.

Before calling read_mib or init_snmp, do this:

  netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID, 
                         NETSNMP_DS_LIB_SAVE_MIB_DESCRS, 1);

> 3. I am also receiving the traps in different threads and trying to show
> those on GUI. But its not happening. Please send me a small code that is
> able to receive traps asynchronously in different thread.

See apps/snmptrapd.c
-- 
Wes Hardaker
Please mail all replies to net-snmp-coders@lists.sourceforge.net

------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to