You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for SNMP v2 traps would be nice. I actually have it working and could provide a pull request but it's such a small change I'm not sure it's worth it a pull request. Simply adding ASN_SNMP_TRAP2 to the list of packet types works. SNMP v1 traps have such an oddball format and are so rarely used I'm not sure adding support for them is worth the effort. It isn't for me.
diff --git a/fastsnmp/snmp_parser.pyx b/fastsnmp/snmp_parser.pyx
index 2420cc3..a6060f0 100644
--- a/fastsnmp/snmp_parser.pyx
+++ b/fastsnmp/snmp_parser.pyx
@@ -640,7 +640,7 @@ cdef tuple sequence_decode_c(const unsigned char *stream, const size_t stream_le
objects.append(object_str)
elif tag == ASN_U_NULL:
objects.append(None)
- elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK:
+ elif tag == ASN_U_SEQUENCE or tag == ASN_SNMP_RESPONSE or tag == ASN_SNMP_GETBULK or tag == ASN_SNMP_TRAP2:
tmp_list_val, ex = sequence_decode_c(stream_char, length)
if tmp_list_val is not None:
objects.append(tmp_list_val)
The text was updated successfully, but these errors were encountered:
Support for SNMP v2 traps would be nice. I actually have it working and could provide a pull request but it's such a small change I'm not sure it's worth it a pull request. Simply adding ASN_SNMP_TRAP2 to the list of packet types works. SNMP v1 traps have such an oddball format and are so rarely used I'm not sure adding support for them is worth the effort. It isn't for me.
The text was updated successfully, but these errors were encountered: