1

I had a Listener setup for SNMP Traps using SharpSnmpLib v11.1 that I grabbed from Nuget.org. I noticed there was an update to this package to v11.2. When I updated, there was no longer a reference to the Listener.

I cannot find where this function has moved to in the documentation. Where has this functionality moved to?

As per the instructions here I am posting my question here with the appropriate tag.

UPDATE

I know the listener has been removed, I am looking for the function that listens for the Trap message coming in.

UPDATE 2

Here is what I am seeing after performing the update with the Nuget Package Manager Code Screenshot

Red_Phoenix
  • 482
  • 6
  • 22
  • https://github.com/lextudio/sharpsnmplib-samples/tree/master/Samples/CSharpCore/snmptrapd – Lex Li Aug 01 '19 at 03:53
  • So I added 'using Listener = Lextm.SharpSnmpLib.Pipeline.Listener;' to my code and I get an error under 'Pipeline' stating: The type or namespace name 'Pipeline' does not exist in the Namespace. I updated to v11.2.0 via Nuget Manager in VS. – Red_Phoenix Aug 01 '19 at 12:48
  • Clone the samples from GitHub and study the code. Then you need no one to answer for you. – Lex Li Aug 01 '19 at 13:10
  • I did that. What I am seeing is that after updating the library from the Nuget manager to v11.2, it says pipeline does not exist in the using statement. Is it possible that the build in the Nuget library does not have the references? – Red_Phoenix Aug 01 '19 at 13:22
  • No, you didn't. Do open the sample project (snmptrapd) in Visual Studio and check from where the classes come from. Don't make a rather simple thing that complex. – Lex Li Aug 01 '19 at 13:24
  • @LexLi I see the Listener in (solution)SharpSnmpLib.Samples : (project) SharpSnmpLib.Engine/Pipeline/Listener. But if you look at my attached photo, it is not referencing in the update package I got from the VS Nuget package Manager. Please forgive my ignorance. I have only delved into the SNMP world 6 months ago. – Red_Phoenix Aug 01 '19 at 14:20
  • 1
    In short, you no longer should expect everything from the NuGet package, and have to add certain classes from the sample repo. That's just what I said above and I won't comment more. – Lex Li Aug 01 '19 at 19:06
  • @LexLi That was what I was missing. I was under the assumption that Nuget would always have what I need. I appreciate your time on this. – Red_Phoenix Aug 01 '19 at 19:09
  • It's not very strange that OP wonders about this, I was also looking for it, because it was in the API docs. – Vincent Vega Oct 12 '20 at 14:13

2 Answers2

2

If someones still looking for the Listener. It was moved into the "Engine" Namespace.

https://www.nuget.org/packages/SharpSnmpLib.Engine/

rmbl
  • 39
  • 4
1

The Listener was removed in this commit:

https://github.com/lextudio/sharpsnmplib/commit/3256c88d63bcb812f7f9ca470cbcd5f0d21210a4


The autor moved the Listener to the samples repository:

https://github.com/lextudio/sharpsnmplib-samples/commit/e729b167ba69e5e4dd386d42ad7d519927a16ae8#diff-39dd1695679daed1c64bc2f1cdf1df2d


You can clearly read it on the release info:

https://github.com/lextudio/sharpsnmplib/releases/tag/11.2.0