I need to parse MIB files and extract all oids and descriptions for each object in the given MIB file using c/c++ code. Currently I use net-snmp library. But this becomes a problem if the given MIB file has dependent mib files and those are not present in the system. Is there any functions present on net-snmp to extract the dependent mib files which are not in the system. In my current implementation, following logs are generated
Cannot find module (SNMPv2-TC): At line 39 in ./mibFiles/CISCO-VTP-MIB
Cannot find module (SNMPv2-TC): At line 9 in ./mibFiles//IF-MIB.mib
Cannot find module (SNMPv2-TC): At line 21 in ./mibFiles//SNMPv2-MIB
Cannot find module (RMON-MIB): At line 48 in ./mibFiles/CISCO-VTP-MIB
This is generated from the inner function in print_module_not_found(char*) in parse.c file. Is there any way to extract these file names (in this case "SNMPv2-TC" and "RMON-MIB")?
Another C or C++ library is also fine which does the job