This project has moved. For the latest updates, please go here.

Private Enterprise MIB Support or Loading (for GetTable)?

Topics: bug report (break and fix), feature request (I want ...), usage (how to ...)
Jul 17, 2008 at 9:32 PM
First, initial impressions of your library are certainly positive.  I look forward to working with it further. 

I have a question that looking at your source didn't provide me an answer.  I would like to be able to load and use a private enterprise MIB, in particular, HP, but it appears I need to somehow load the MIB in order to perform a GetTable function call.  It throws an error on index = 11 in the IDefinition indexer.  I am using your latest source.  I can get individual values from a private enterprise MIB, so it might have to do with your GetTable implementation and need to have the MIB loaded?

Again, I look forward to using your library further.

Jul 18, 2008 at 4:26 AM
Hi Brian,

By default, #SNMP only parses 70 MIB documents bundled. For private MIB, please call ObjectRegistry.Instance.LoadFile() or LoadFolder(). This allows #SNMP to parse them and understand what objects are defined inside. Then when you call GetTable, the current implementation should know the OID you pass is a table and return you the table content.

The OID validation was added in GetTable from Change Set 12388.

Jul 21, 2008 at 1:22 PM
Lex -

Thank you for the response.  I was not able to actually load my enterprise MIB as it appears to be a MIB parsing problem.  However, I did find a way to accomplish what I wanted with the Walk based on how the data is represented.

I will continue to use your library and offer feedback, etc.

Jul 24, 2008 at 6:51 AM
Hi Brian,

I see that parser inside #SNMP cannot parse all MIB documents, so a workaround can be used. In fact, the table OID validation is done by this line inside Manager.GetTable

            if (!Mib.ObjectRegistry.Instance.IsTableId(table.ToNumerical()))
throw new ArgumentException("not a table OID: " + table);

You can remove/comment out these lines, and then you can do table operation without MIB documents.

Hope this helps.


Marked as answer by lextm on 10/6/2013 at 9:14 PM