SNMP

Started by
3 comments, last by CyberSlag5k 15 years, 10 months ago
Can someone suggest a good SNMP library to use in a .net environment? I'm coding in C#, and I found a library on Code Project, but for some reason I can't do any Set commands. It throws very vague exceptions, so I'm not sure what's going wrong. I don't think the library itself is failing to do something, but I can't figure out where the problem lies because any exception I get is either a null reference exception (from somewhere within the library) or an "SNMP Timeout" exception, which really doesn't tell me anything. I'm sure it's a problem with the device, but I'm rather stuck at this point, so I'm thinking it's time to switch libraries, unless someone can think of something to help me diagnose the problem. Thank you.
Without order nothing can exist - without chaos nothing can evolve.
Advertisement
Do you have the source code to the library? If so, trace through it to the point of exception. Even without source, you can use something like Reflect.NET to get a pretty good feeling for what the library is doing.

Another thing you could try is to look at the actual network traffic using Wireshark or some similar tool. (Wireshark is a free download) I seem to recall that SNMP is a text-level protocol, which makes network analysis pretty easy.
enum Bool { True, False, FileNotFound };
Unfortunately, the method that's throwing the error is 500 lines of while looping goodness. I've been looking at it, and will continue to do so, but it's not pretty.
Without order nothing can exist - without chaos nothing can evolve.
I highly recommend looking at the traffic on the wire, then, to see what's being sent and received.
enum Bool { True, False, FileNotFound };
I will do so. Thanks.
Without order nothing can exist - without chaos nothing can evolve.

This topic is closed to new replies.

Advertisement