[SNMP4J] SnmpWalk Termination Conditions

Frank Fock fock at agentpp.com
Wed Nov 17 09:03:00 CET 2004


Hi Tim,

Please find my answers inline:

Tim Couger wrote:

>>From what I could tell in the examples, there are several conditions that
>will terminate the walk.  These are:
>
>1)  responsePDU == null
>  
>
This is condition indicates a timeout.

>2)  responsePDU.getErrorStatus() != 0
>  
>
This may only occur with a broken agent when you do a walk
or if you are using SNMPv1. A SNMPv2c/SNMPv3 agent
should never return an error on a GETNEXT/GETBULK operation.

>3)  responsePDU.get(0).getOid() == null
>  
>
This would be a broken agent too.

>4)  responsePDU.get(0).getOid().size() < targetOID.size()
>  
>
This condition is true, if the walk leaves the sub-tree it was issued
for.

>5)  targetOID.leftMostCompare(targetOID.size(),
>                               responsePDU.get(0).getOid()) != 0
>  
>
Same as above.

>6)  Null.isExceptionSyntax(responsePDU.get(0).getVariable().getSyntax())
>  
>
This condition is true when the agent returns endOfMibView exception syntax
(or any other exception syntax like noSuchInstance or noSuchObject, but 
these
should not be returned by a correctly implemented agent for 
GETNEXT/GETBULK).

>7)  responsePDU.get(0).getOid().compareTo(targetOID) <= 0
>  
>
This condition would be true for an agent, that does not implement 
lexicographic
ordering correctly (yes, such agent exists - unfortunately ;-).

>>From my tests, I only found situations that triggered conditions #1, #2, and
>#5.  Can someone tell me when situations #3, #4, #6, and #7 might occur?
>The reason I care is that I will need to explain them in the documentation.
>
>  
>
Best regards,
Frank




More information about the SNMP4J mailing list