lextudio/sharpsnmplib

Custom datatype in SNMP trap variable

lextudio-support opened this issue · 2 comments

I use sharpsnmp library to send simple SNMP traps. It works great, I could
implement the features I had to without any problem.

The traps I sent so far contained simple data types as variables, like
OctetString or Integer32.

Now I should send a more 'complex' variable in a new trap, that contains TWO
octetstring values + an Integer32 or one more OctetString . As I think I
should implement a new data type that implements ISnmpData, but I couldn't
find how to do it.

Sorry, if this question is a basic one, but SNMP only is a very small part of
my project and I did not have to dive deep into this topic so far, so I hope
this nics library provides an easy way to implement this.

Thanks in advance!

Original Reported Date: 2012-11-20T05:50:42.09-08:00
Original CodePlex Discussion Thread ID: 403942

Copied from CodePlex without authors:

You cannot extend ISnmpData, as SNMP only supports a limited set of types.

In a TRAP message you can return a set of objects (if you define them clearly
in the MIB file), and that's all you can do.

Regards,

Lex

Original Posted Date: 2012-11-20T19:45:45.577-08:00

Marked as Answer Date: 2013-10-06T20:27:38.27-07:00