I would like to create C# clients that will use SNMP to communicate to a C# manager and I would like to know what namespaces to call, what classes, etc. I have not been able to find C# examples on this (only WMI examples), so if anybody can give me some or give me guidance, I will really appreciate it.
Also, as a general question, what will you people suggest, have the clients listenning/talking through a port and have a similar behaviour on the manager or use SNMP?
Thank you!Sunday, March 12, 2006 6:28 PM
Thanks for your help, all the links have been very helpful but see, the more I look at SNMP I am not sure if it will do what I want to do.
Basically, and this is more of a design question, I would like to send accross a network DataTables with some info. In a nutshell, I will have a server "listen" or "calling" machines asking them for these DataTables. Clients will "listen" to server calls or will send these DataTables when they think it is necesary.
My initial thought was that I could add the DataTables as my Variable Binding List (VBL) in a SNMP packet and send them accross. Do you think this is possible? My other option is to open a port and listen on that port for requests from the server or clients or viceversa (now, I would have ot figure out that whole port thing ujst like SNMP). Even a third option is to have a database, have the clients store the info and then the server would pull it out from the database and show it in a comprehensive manner to the user. Could you please help me? I would really appreciate your help.Saturday, March 25, 2006 5:58 PM
If you don't care some fee, I suggest eMarkSnmp, http://www.emarksoft.com/snmp-examples/csharp-snmp-get.htm
The sample code seems simple, you could even write some vbs to run it.
set snmpSession = CreateObject("eMarkSnmp.SnmpSession")
set vb = CreateObject("eMarkSnmp.SnmpVarBind")
count = snmpSession.SnmpGet("127.0.0.1", "220.127.116.11.18.104.22.168.0")
MsgBox( "Get " & count & " varbinding(s)")
if count = 1 then
set vb = snmpSession.GetVarBind(1)
Str = Str & "OID: " & vb.ObjectID & vblf
Str = Str & "String Value: " & vb.ToString() & vblf
Str = Str & "HexString: "& vb.ToHexString() & vblf
Great, it works!Thursday, February 04, 2010 4:50 PM
Hi All !
May be, I am to blind to see?? I am missing a reference to the most important snmp library, which is available for .Net.
See here: http://sharpsnmplib.codeplex.com/
[Sorry, do not know, how to create valid links herin].
--scambThursday, February 04, 2010 6:43 PM