Click here to Skip to main content
15,881,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am attempting to implement this code to find out the state of my MLNX ethernet switch and eventually map my port data.

This at the moment is retrieving numerous errors, and I believe the issue is down to an invalid OID for my switch.

public void getValue(){


IPEndPoint ip = new IPEndPoint(IPAddress.Parse("192.163.77.11"), 161);
OctetString oc = new OctetString("public");
List<variable> a = new List<variable> { new Variable(new ObjectIdentifier("1.3.6.1.2.1.2.2.1.8")) };
var result = Messenger.Get(VersionCode.V1, ip, oc, a, 60000);

}

----code was taken from http://www.codeproject.com/Articles/468892/An-introduction-to-sharpSNMP-an-Open-Source-SNMP---

Your help would be very much appreciated. I am really struggling at the moment with my switch and really any help would go a long way.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900