Re: To get a row/column objects

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
2008/7/30 Mike Ayers <[email protected]>:
>> The first returnable object is actually
>> ifTable.ifEntry.ifIndex  (ifTable.1.1)
>> and these GETNEXTs would actually return ifTable.1.1.(first index)
>
>        Thanks for the clarification.  So if the OP performed the second get-next on
> ifTable.1.1 instead of ifTable.1, the intended result would have been achieved

Errr... no.

ifTable.1.1 is ifIndex,   so GETNEXT on ifTable.1.1 would return the value
of ifIndex.{first} (being the first accessible instance within the table).
Similarly,  GETNEXT  on ifTable.1 would also return   ifIndex.{first}

In order to get an entry from the second row of the table (and assuming
that the first value of ifIndex was 1), you would need to run GETNEXT
on  ifTable.1.1.1 = ifIndex.1

More generally, if GETNEXT ifTable.1 (or GETNEXT ifTable.1.1)
returned a value of {N},  then the second index would be retrieved
by running  GETNEXT on ifTable.1.1.{N}


> it is often better to use snmpgetnext or one of the helper functions
> like snmptable or snmpwalk than to try to anticipate the next value.

The simplest way to retrieve the table is to use 'snmptable'
or 'snmpwalk' - sure.

Dave

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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.