[AGENT++] Walking table row by row using SNMP++

Altaf Aali altaf.aali at gmail.com
Mon Apr 30 03:12:38 CEST 2007


I understand that the OID ordering causes this to happen.

For the second answer though, are you saing that I should the OIDs of the
columns in the request? Since, from the documentation, you can set a single
OID for a specific VB (using the setOID method), I assume you will have add
multiple VBs to the request PDU as follows:

Pdu pdu;
Vb vb;
vb.set_oid (column1Oid);
pdu+= vb;
vb.set_oid (column2Oid);
 pdu+= vb;
vb.set_oid (column3Oid);
 pdu+= vb;
..
...

Is this understanding correct so far?  If yes, then I have three related
questions:

1. If I set the max repetitions to n and the use the above pdu in a getBulk
request, should I get n rows with 3 columns each (specified by the OIDs
above)?
2. If in 1, the table only has n-1 rows, then should agent return an
end-of-table or it is based on the agent implementation? Or will I probably
get a no-such instance?
3. By adding the row number to each columnOid as follows, should I be able
to select a particular row:

 Pdu pdu;
Vb vb;
vb.set_oid (column1Oid+"."+rowIndex);
pdu+= vb;
vb.set_oid (column2Oid+"."+rowIndex);
 pdu+= vb;
vb.set_oid (column3Oid+"."+rowIndex);
 pdu+= vb;
..
...

Of course I can simply try these out and see the results but it would be
helpful to know what to expect.

Thanks for the help
Altaf

On 4/29/07, Jochen Katz <katz at agentpp.com> w+rote:

> Hi,
>
> > I am attempting  to traverse a table but apparently the getBulk
> traverses
> > the table column by column so that the output for a table that has data
> as
> > follows:
>
> you first get the complete first column because the oid of the last row
> in the first column is smaller than the oid of the first row in the
> second column.
>
> > Is there a way to get the data row by row
>
> You will have to put all the oids of the first row you want to get into
> the request.
>
> Regards,
> Jochen
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp
>



More information about the AGENTPP mailing list