最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c++ - Extracting dependent MIB files in MIB file parsing using net-snmp - Stack Overflow

programmeradmin5浏览0评论

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

发布评论

评论列表(0)

  1. 暂无评论