SharpSnmpPro.Mib Assembly Full Version Reviewers’ Guide

By Lex Li

This page shows you a guide on SharpSnmpPro.Mib assembly full version.

In this article:

Background

The Full version is sent to registered users only via emails, and is packaged up with latest #SNMP Library. So below are the assemblies in the ZIP package,

  • SharpSnmpPro.Mib.Trial.dll
  • SharpSnmpLib.dll
  • SharpSnmpPro.Mib.Trial.2.0.0.nupkg

Note

For 1.2 release, the following are included in the ZIP package,

  • SharpSnmpPro.Mib.Trial.dll
  • SharpSnmpLib.Full.dll
  • SharpSnmpLib.Portable.dll

Supported Platforms

Unlike the Compiler Pro which requires .NET 4.5 and Windows, this product can be used on multiple platforms,

  • .NET Framework 4.5.2 and above
  • Mono 5.0 and above (via .NET Standard 2.0)
  • Xamarin.iOS Unified (via .NET Standard 2.0)
  • Xamarin.Android (via .NET Standard 2.0)
  • Xamarin.Mac (via .NET Standard 2.0)
  • Other platforms that are compliant to .NET Standard 2.0.

Note

More information about .NET Standard 2.0 can be found from Microsoft .

Complete Sample Project

You learn how SNMP operations can be done by consuming the open source SNMP API. A question then is what values MIB documents provide, as they are said to be an important part of SNMP protocol but not seem to be utilized anywhere if we solely use #SNMP Library.

Well, a rough answer is MIB documents mean everything,

  • They tell what each object identifiers (OID) mean.
  • They tell which OID is for a table, a row, and a column.
  • They tell which kind of data we should expect for an object, OCTET STRING or any other valid types.

Thus, a MIB specific library such as SharpSnmpPro.Mib can help build a much more powerful SNMP manager.

../_images/mib.png

To test it out, we reuse the default test projects for Trial version, which can be found at GitHub. It can be cloned to a local folder, such as D:\sharpsnmppro-sample .

git clone https://github.com/lextm/sharpsnmppro-sample.git
git checkout release_2.0

Note

For 1.2 release, execute the following commands,

git clone https://github.com/lextm/sharpsnmppro-sample.git
git checkout release_1.2

Then extract all the files from the ZIP package to that folder (D:\sharpsnmppro-sample for example).

Lastly, execute an extra script to prepare the NuGet local feed,

install.nuget.bat

Note

For 1.2 release, there is no install.nuget.bat.

Tests.csproj is an NUnit project that shows the below,

  • How to compile and load MIB documents.
  • How to query entity by name.
  • How to check description of entities.
  • How to verify data against entities. (note that the trial edition only support simple entities, while the full edition supports all entities).
  • How to check OBJECT-TYPE macro specific properties.

To make the test project work with Full version, the following changes need to be made,

  1. Modify snmptranslate.csproj and Tests.csproj to use SharpSnmpPro.Mib as package reference, instead of SharpSnmpPro.Mib.Trial.
  2. Modify sharpsnmppro.txt following the instructions in the email.
  3. Remove TRIAL from “Conditional compilation symbols”, which then enables Full version only test cases.

Note

For 1.2 release, the following changes need to be made,

  1. Remove the original reference to SharpSnmpPro.Mib.Trial.dll.
  2. Add a new reference to SharpSnmpPro.Mib.dll.
  3. Modify sharpsnmppro.txt following the instructions in the email.
  4. Remove TRIAL from “Conditional compilation symbols”, which then enables Full version only test cases.