Re: how to get a table such as "ifTable" from remote snmp agent?

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 03/09/06, holyful <[email protected]> wrote:
> I about to use net-snmp c api to make a NMS , now there is a problem, i
> just can get simple value from certain variable , then how can i get a
> whole table such ai "ifTable" in one session ??

The basic way to retrieve a table is via a sequence of GETNEXT requests.
The first one should list the column objects that you are interested in.
The second one should list the results from the first request.
The third one should list the results from the second request, and so on.

That will work with any version of SNMP.

If you're using SNMPv2c or SNMPv3, then you can use GETBULK, which
effectively combines multiple GETNEXT cycles into a single request.

See 'snmptable.c' for an example of how this works in practice.

Dave

-------------------------------------------------------------------------
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
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.