2 Nov 2009 20:14
Re: Counting Invalid Traps
Frank,
First off, I am not that familiar with all the snmp rfs so I did a bit
of googling and using rfcs 1907 & 2572 I
came up with definitions for two of the counters and what they should count:
snmpASNParseErrors counter is defined in rfc 1907
On page 8 of rfc 1907 the counter is defined
snmpInASNParseErrs OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of ASN.1 or BER errors encountered by the
SNMP entity when decoding received SNMP messages."
::= { snmp 6 }
From this I think that when the MessageDispatcherImpl.processMessage
catches the IOException, the counter that is incremented should be
snmpASNParseErrors not snmpInvalidMsgs since the only time I found
IOException was thrown when processing a PDU was when the BER decoding
encounters an error. If you concur with this hypothesis then the check
for the packet starting with an ASN.1 sequence (0x30) at the beginning
of processMessage should just return after incrementing the counter or
throw an IOException and let the catch IOException block further down
handle the counter incrementing.
snmpInvalidMsgs counter looks like it was added for snmp v3 pdus. The
relevant sections are:
On page 18 of rfc 2572 the counter is defined
(Continue reading)
RSS Feed