[SNMP4J] table "discovery"

Marco.Bresciani at alcatel.it Marco.Bresciani at alcatel.it
Wed Feb 1 08:52:57 CET 2006


Thank you. Work in progress...

Dott. Ing. Marco Bresciani

-- 
Alcatel - WTD R&D SW Lab. [Stage]
Via Trento, 30
20059 Vimercate (Mi) Italia
Phone: +39.039.686.5546
E-Mail: Marco.Bresciani at Alcatel.It




Frank Fock <fock at agentpp.com>
31/01/2006 20.12
 
        To:     Marco BRESCIANI/IT/ALCATEL at ALCATEL
        cc:     snmp4j at agentpp.org
        Subject:        Re: [SNMP4J] table "discovery"


Marco,

You can do a GETBULK for the whole subtree under the table's OID.
This would not be very efficient.

A faster (but probably unsafe) way would be sending a GETNEXT with
the columns you expect (start from TableOID.1.1 to TableOID.1.n).
Normally column sub-identifiers have no holes, but there might be some
exception.

A fast and reliable approach is sending a GETBULK on the first column
only and repeat until the highest index of the table is returned. Then you
can send GETNEXTs on the last OID of each column
(TableOID.1.lastCol.lastIndex) to get the next column.

Hope this helps.

Best regards,
Frank

Marco.Bresciani at alcatel.it wrote:

>Hi all,
>  I'm still upgarding a SNMP communication class I've inherited from past 

>developers... Speaking about table-getting, I renewed a method that got a 

>table using OID indexes so everything worked fine.
>  Now I'm upgrading another method that does not receive, as parameters, 
>the list of OIDs needed because the older communication part contained 
the 
>whole MIB so it knows which columns belong to a table and it retrieves 
>all.
>
>So... is it possible to know how many columns (and their OIDs) a table 
>has?
>
>Thank you,
>
>Dott. Ing. Marco Bresciani
>
> 
>


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







More information about the SNMP4J mailing list