SharpSnmp vs SnmpSharpNet

9.6k views Asked by At

I'm about to embark on a project where I need to create an SNMP Agent via C#. I've never worked with SNMP, so I plan on using an existing library/API such as SharpSnmp or SnmpSharpNet.

I'm fishing for responses from anyone who has personal experience with both of these API's and has an opinion on which one is better and why. - or maybe your opinion is that they are the same difference (i.e. you have no preference) - If so, I'm interested in that sorta response, too.

1

There are 1 answers

2
Lex Li On BEST ANSWER

As the developer of #SNMP, I can only provide the following feedback,

The two were designed differently (history review)

#SNMP comes from Malcolm Crowe's research project on SNMP. When I tried to improve it I redesigned the whole API from scratch and wanted to make it natural and suitable for C#/.NET developers, similar to PowerSNMP for .NET (http://www.dart.com/psnet.aspx), but not a clone.

SNMP#NET originates from other libraries, such as snmp4j, if you read it homepage, http://snmpsharpnet.com/node/1. So its API looks similar to them too, which I personally dislike.

The two were developed differently (software process)

#SNMP follows Test Driven Development from its day one. All critical pieces have been covered in its unit test suite. So although it has been refactored heavily several times during the seven major releases, it is still a stable code base.

From SNMP#NET I could not see any unit test suite. I don't know how it was tested. But it has been proven to be stable too.

The code base management approaches are different (SCM)

All revisions of #SNMP can be easily observed on CodePlex, and later on Google Code, and finally on GitHub. https://github.com/lextm/sharpsnmplib/commits/master You can track almost every changes, because I checked in often. If you want to inspect the evolution of the code base, #SNMP makes it easy.

SNMP#NET only releases source code snapshots with binaries. There is no public repository for it.

Feature Set Differences

#SNMP provides a set of command line utilities (similar to some of Net-SNMP utilities) to demonstrate how to use the library. It also provides demo level MIB Compiler, Browser, and Agent. Those samples serve as starting point for first time users to learn about the API.

SNMP#NET has many good small articles on how to use the API, http://snmpsharpnet.com/node/6. But it does not have many large scale samples. Especially, SNMP#NET does not have MIB compiling support yet, nor agent development support.

Platform support differences

#SNMP has been tested on Mono a few years ago, and later officially supports Mono on non-Windows operating systems. I don't know if SNMP#NET ever supports this.

Updated Starting from 8.0 release, #SNMP starts to target mobile platforms (Mono for Android first, and MonoTouch later). The code base is also re-licensed under MIT/X11 to avoid deployment problems.

Updated Starting from 10.0 release, #SNMP starts to target .NET Standard.

Relationship between the two

Noticeably, part of #SNMP's v3 support is ported from SNMP#NET. Both projects are released under LGPL, so I did not try to reinvent the wheels. Obviously SNMP#NET has better privacy methods support, but porting such pieces to #SNMP is also easy to achieve (I did show that by porting MD5, SHA-1, DES, TripleDES and AES128/192/256 support).

Updated Starting from 8.0 release, #SNMP code base is re-licensed under MIT/X11 + BSD 3 Clause.

Updated #SNMP has a Professional edition, which includes MIB document support.