lextudio / sharpsnmplib

Sharp SNMP Library- Open Source SNMP for .NET
https://sharpsnmp.com
MIT License
356 stars 152 forks source link

Agent.SendTrapV2 does not conform RFC 1448 ? #246

Closed lextudio-support closed 1 hour ago

lextudio-support commented 2 hours ago

Hi, first of all, congratulations to you guys, this work seems to be really good.

I am new to all of this SNMP stuff, but look what I've found. My application needs to send and receive SNMPv2 traps, and an important information for it is RequestId, which permits an application to order and distinguish duplicated traps. Since there's no option to define it on the public SnmpSuite API, I began do digg your code. Unfortunatelly, my lack of knowledge lead me to read RCF 1448 (oh gosh), that states all PDU V2 structures, including trap. I found that the first field of PDU is the requestId, but Agent.SendTrapV2 uses the VersionCode wich is always "1" (v2), so my application was receiving always 1 in requestId... for testing, I changed it to "2" and, voila, the received requestId was incremented.

Here's the reference: http://tools.ietf.org/html/rfc1448#section-3

Maybe I'm saying a dummy thing... well, hope I have contributed.

Rgds

Original Reported Date: 2009-02-20T15:51:12.12-08:00 Planned For Release: CrossRoad (2.0) Original CodePlex ID: 3859

lextudio-support commented 2 hours ago

Copied from CodePlex without authors:

Hi tensfeld,

Thanks for the report. You are right, current implementation does not conform to that RFC. I am working on an update soon.

-Lex

Original Posted Date: 2009-02-20T17:38:59.05-08:00

lextudio-support commented 1 hour ago

Copied from CodePlex without authors:

Changes are checked into repository. An extra parameter named requestId added in relevant methods/constructors. This should allow you to set request ID to meet RFC definition.

** Closed by lextm 02/20/2009 5:59PM

Original Posted Date: 2009-02-20T17:59:39.207-08:00

lextudio-support commented 1 hour ago

Original Closed Date: 2010-11-05T19:07:06.503-07:00