On 06/11/06, Srivastava, Namburi (IE10)
> Using iterate method of accessing table parameters how to find the column
> information

The model used by the iterate helper is to separate the processing into two
separate stages. The get_{first,next} routines are concerned with identifying
the appropriate row for a particular request - and ignore the column
(or columns)
that will be required.

The helper routine then takes this particular row, and identifies the relevant
columns (using the 'table_info->colnum' field).

See one of the relevant MIB modules in the source tree (such as
for an example of how this works in practise.

> and how to set (I mean, which structure to set) the no. of rows in the table?

The get_{first,next} routines will loop through all the rows of the table.
There's typically no structure that explicitly contains the number of
rows - these
hook routines can work through the internal representation of the table, however
this might be held.

> In my case no. of rows to be provided by external api and
> their number is varying dynamically.

No problem - just have the get_first routine call this API to retrieve
this number,
and have a shared variable so that the get_next routine knows when to stop.

> No. of rows may be different for each snmpwalk request. In the sense, number
> of rows may be varying dynamically

Again, no problem. Each SNMP request will trigger a fresh
get_{first,next} loop.
Everything should work properly


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
Net-snmp-users mailing list
Please see the following page to unsubscribe or change other options: