tags:

views:

3161

answers:

2

I need to write an SNMP agent for my application.

I read the CodeProject article on how to write an SNMP extension agent DLL using win32, but would like to know if it is possible to do it with managed code.

Also, is it possible to write my own SNMP agent in managed code and run it along windows SNMP service? windows SNMP service is required to run on my server to provide the basic operating system management info.

What C# SNMP library would you recommend? I found a few C# SNMP protocol implementations, but could not find sample code on how to implement an SNMP agent - most samples are only about querying other agents or sending traps.

+1  A: 
  1. the best library I have used in 8 years of NMS development - adventnet
  2. you can write your own, but you need to understand ASN. Good luck with that.
  3. SNMP agents do 2 things: query for data, send and receive traps. What else you want them to do? wash your laundry?! (sorry couldn't resist that! :) ).

What are you trying to do with your SNMP agent?! Does you app need to send traps?! or query for data from a node?!

shiva
Thanks for your answer. I did do some ASN.1 development in C# but it's not what I had in mind - just looking for a good library and mostly some tips and insight. I would like my agent just to send traps and respond to queries. For the laundry my plan is to use python - should be a walk in the park.
zvikara
On the other hand, using Ajax for the laundry should work better.
zvikara
@[zvikara]: that's a Bold statement ;-)
Steven A. Lowe
@Steven I think he is talking about http://en.wikipedia.org/wiki/Ajax_(cleanser)
shiva
@shiva yes, it's a joke; I'm referring to http://en.wikipedia.org/wiki/Bold2in1
Steven A. Lowe
+3  A: 

Hi !

If you would like to use the SNMP protocol from the .Net Framework, regard this library: #SNMP.

It seems possibly to write your own SNMP server with it. But the standard SNMP Agent archictecture is not based on .Net und so - I assume - you cannot use the mentioned library to extend it. You must write your own and this looks possible with the mentioned library.

Hope this help.

br--mabra

mabra
#SNMP Suite version 4 now has an snmpd project to show how to write SNMP agents in C#.
Lex Li
#SNMP 5 is out. Its agent now supports SNMP v1, v2c, and v3.
Lex Li