How can I write an SNMP agent or SNMP extension agent DLL in C#
Asked Answered
G

2

17

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.

Gudgeon answered 25/9, 2008 at 21:17 Comment(0)
A
5

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

Anastice answered 19/12, 2009 at 14:21 Comment(2)
#SNMP Suite version 4 now has an snmpd project to show how to write SNMP agents in C#.Goodrich
#SNMP 5 is out. Its agent now supports SNMP v1, v2c, and v3.Goodrich
B
2
  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?!

Biosynthesis answered 26/9, 2008 at 3:50 Comment(3)
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.Gudgeon
On the other hand, using Ajax for the laundry should work better.Gudgeon
@[zvikara]: that's a Bold statement ;-)Behoove

© 2022 - 2024 — McMap. All rights reserved.