How to get the name Oid (#Snmp)?

Ok, following Lex Li's advice , and I'm trying to get the Oid name with another lib: # SnmpLib

Here's a sample:

public static void Main(string[] args)
{

    string oid = ".1.3.6.1.4.1";
    IObjectRegistry registry = new ReloadableObjectRegistry(@"C:\Users\Fnizz\Desktop\MIBS_BARCO\");
    IObjectTree tree = registry.Tree;
    var o = tree.Search(ObjectIdentifier.Convert(oid));
    string textual = o.AlternativeText;
    Console.WriteLine(textual);
    if (o.GetRemaining().Count == 0)
    {
        Console.WriteLine(o.Definition.Type.ToString());
    }

    Console.ReadKey();
}

But instead of getting the value .iso.org.dod.internet.private.enterprises, I get the following:.iso.3.6.1.4.1

0
source share
1 answer

To compile MIB documents, you must use the #SNMP MIB compiler (Compiler.exe). If any dependency is missing, she will report. Only when all the dependencies exist, can the compiler compile your documents without errors.

The compiler creates * .module files in the modules folder. Then you need to put these files (* .module) in the folder C: \ Users \ Fnizz \ Desktop \ MIBS_BARCO \.

. MIB, MIB .

0

Source: https://habr.com/ru/post/1682482/


All Articles