Table with Notaccessible Index

 

Sometimes while querying the SNMP table data, the index value of an SNMP table may not be returned. This is because the "MAX-ACCESS" value of the index entry is defined as 'not-accessible', in the MIB file. There can also be tables with more than one 'not-accessible' index columns.

 

In all table-related classes, the columns with 'not-accessible' MAX-ACCESS are dropped and the request is sent only for the other columns. Therefore, the 'not-accessible' columns are not retrieved while retrieving tables.

 

The getNotAccessibleIndex() method provided in SnmpTable class can be used to get the not-accessible indices. This method returns the not-accessible index values as a two-dimensional String array or null if the table has no column with not-accessible MAX-ACCESS. To get only the not-accessible column names, the method getNotAccessibleIndexColumns() can be used. This returns a String array of column names.

 

Use the following code to get the values of not-accessible index.

 

SnmpTable table = new SnmpTable();

table.setTableOIDWoStart("tableOID");//sets the tableOID

table.run();

table.getNotAccessibleIndex(); //returns the not-accessible index values as a two dimensional String array.

 

The SnmpTable class has another method getIndices() that can be used to get all the indices of the table. Example walk_indexes in the applications directory retrieves the values of the indices.

 

 

 



Copyright © 1996-2006, AdventNet Inc. All Rights Reserved.