How can I read an SNMP MIB file in c#?

浪尽此生 提交于 2019-12-07 06:33:19

问题


How to read a MIB file(.Mib file) using c#.net


回答1:


You can write your own ASN.1 parser, or use an off-the-shelf component. I use NetToolWorks, and am happy with it.

If you do want to roll your own, here's some sample code to get you started.




回答2:


Based on what you need, you have multiple choices.

ASN.1 parsers can be used to parse details. But if you just need to know the OID for objects, #SNMP Suite already has a basic MIB parser/compiler available via both its library (SharpSnmpLib.Mib namespace) and its GUI tool (MIB Compiler and Browser).

https://sharpsnmp.com

As far as I know, Net-SNMP only has a MIB to C tool.



来源:https://stackoverflow.com/questions/848132/how-can-i-read-an-snmp-mib-file-in-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!