lextudio / sharpsnmplib

Sharp SNMP Library- Open Source SNMP for .NET
https://sharpsnmp.com
MIT License
356 stars 152 forks source link

Get Module, Object or Entity from OID #465

Closed lextudio-support closed 2 hours ago

lextudio-support commented 2 hours ago

Hello guys, I made a Walker requesting a network device some information.

IPEndPoint receiver = new IPEndPoint(ip, 161);
            IList<Variable> result = new List<Variable>();
            WalkMode mode = WalkMode.WithinSubtree;

            Messenger.Walk(VersionCode.V1, receiver, new OctetString(community), new ObjectIdentifier("1.3"), result, timeout, mode);

The code returns all OIDs perfectly on your device, but I needed to convert these names to OIDs.
I saw the example that makes this translation, but it uses the compilation of MIBs, I would make this translation from the list of loaded MibModule method Parser.ParseToModules (...).

How do I link this?

Original Reported Date: 2013-03-15T05:49:16.987-07:00 Original CodePlex Discussion Thread ID: 436761

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

http://stackoverflow.com/questions/15433165/get-mibmodule-object-or-entity- from-objectidentifier-sharpsnmplib

Original Posted Date: 2013-03-16T18:55:09.947-07:00

lextudio-support commented 2 hours ago

Marked as Answer Date: 2013-10-06T21:16:53.427-07:00