[SNMP4J] Missing First Row in Table

Frank Fock fock at agentpp.com
Sun Apr 30 13:00:30 CEST 2006


Hi Phil,

Oops, yes I was a bit biased through other postings ;-)
Sorry! I agree that for the concrete example, it looks
like there is a bug in the agent, although I cannot
reproduce it with the beta 1(+) version I am using
currently.

@Jesse: What version of SNMP4J-Agent do you use?

Best regards,
Frank

PHIL BERGSTRESSER wrote:
> Frank, I believe Jesse is correct. getNext, getBulk should return
> exactly what YOU say they should: the NEXT OID in lexicographical order,
> which if the last index is not supplied, would be 12 in his case. You
> state the technology correctly, but don't see his example correctly. The
> Next instance after myOid.indexOid is myOid.indexOid.12. This is usually
> an agent bug. Think about it.
> 
> Phil
> 
> -----Original Message-----
> From: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org] On
> Behalf Of Frank Fock
> Sent: Saturday, April 29, 2006 6:27 AM
> To: Prusi, Jesse R
> Cc: snmp4j at agentpp.org
> Subject: Re: [SNMP4J] Missing First Row in Table
> 
> Hello Jesse,
> 
> The behavior you described is intended and not a bug.
> GETNEXT and GETBULK return the next accessible object instance with an
> OID (lexicographic) greater than the OID specified in the request.
> 
> To get also the instance for the OID you have in mind, you can use
> OID.predecessor() as the starting OID.
> 
> Best regards,
> Frank
> 
> Prusi, Jesse R wrote:
>> Hello,
>>
>> I have an agent built from snmp4j-agent that has a sparse table 
>> populated with a few entries.  For example:
>>
>> myOid.indexOid.12 = a
>> myOid.indexOid.13 = b
>> myOid.indexOid.16 = c
>> myOid.indexOid.38 = d
>>
>> All entries are returned if:
>>
>> 1) I use GETBULK on myOid.  Or,
>> 2) I use TableUtils getTable() method on myOid with lower and upper 
>> index OIDs = null.
>>
>> However, the first entry is not returned when:
>>
>> 1) I use GETNEXT starting with myOid.indexOid
>> 2) I use SnmpRequest to do a walk on myOid.indexOid
>> 3) I use TableUtils getTable() method on myOid with
>> 	a) lower index = myOid.indexOid
>> 	b) upper index = myOid.(indexOid+1)
>>
>> But all other entries are returned.
>>
>> myOid.indexOid.13 = b
>> myOid.indexOid.16 = c
>> myOid.indexOid.38 = d
>>
>> Is this a bug in SNMP4J?  How can I get all the entries in the 
>> myOid.indexOid subtree without skipping the first entry?
>>
>> Thanks in advance for your help.
>>
>> Jesse Prusi
>>
>> _______________________________________________
>> SNMP4J mailing list
>> SNMP4J at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/snmp4j
> 

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com




More information about the SNMP4J mailing list