[SNMP4J] Missing First Row in Table

PHIL BERGSTRESSER phil.bergstresser at adtran.com
Sat Apr 29 23:04:08 CEST 2006


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

_______________________________________________
SNMP4J mailing list
SNMP4J at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j



More information about the SNMP4J mailing list