Here's a patch that improves support for SNMPv1 traps a bit. It adds an IPADDRESS tag (0x40) and the corresponding field, adds an SNMP binding for UDP port 162 and it modifies the SNMPtrapv1 class. (According to RFC 1067, there's no ID field in SNMP PDUs.)
I used the following test data:
0000 30 29 02 01 00 04 06 70 75 62 6C 69 63 A4 1C 06 0).....public...
0010 07 2B 06 01 04 01 96 26 40 04 C0 A8 01 0A 02 01 .+.....&@.......
0020 06 02 01 01 43 03 FE 62 54 30 00 ....C..bT0.
Decoding now gives:
<SNMP version=<ASN1_INTEGER[0L]> community=<ASN1_STRING['public']>
PDU=<SNMPtrapv1 enterprise=<ASN1_OID['.1.3.6.1.4.1.2854']>
agent_addr=<ASN1_IPADDRESS['192.168.1.10']> generic_trap=<ASN1_INTEGER[6L]>
specific_trap=<ASN1_INTEGER[1L]> time_stamp=<ASN1_TIME_TICKS[-105900L]>
varbindlist=[] |> |>
As you can see, TIME_TICKS are still not properly decoded, because unsigned integers aren't supported, yet.
The patch is for the latest Linux version.