Re: possible bug in getnext implementation

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 11/12/2007, Rotem Tzuk <[email protected]> wrote:
> I expected the index to refer to the number of rows in my table.

That sounds more like an integer-based index.
With an integer index, the rows will typically be
    myObject.1
    myObject.2
       :
    myObject.N


With a string index, the rows will typically be more like

    myObject."one"
    myObject."two"
    myObject."four"
    myObject."three"

(i.e. ordered by length of string and dictionary order)


> So if I have 2 rows, every number higher than 2 will yield row 2.

No - that's not how GETNEXT works.
Not even for integer indexes.

If you issue the request "GETNEXT myObject.2" then the agent
will return the next instance *after* "myObject.2"
So for an integer-indexed table   "GETNEXT myObject.2"
would typically return  "myObject.3"
And "GETNEXT myObject.999"  would return  "myNextObject.1"


> Should I use an integer index to achieve this behavior?

You should use the indexing specified by your MIB file.
The definition of the table determines what index values
you should be using.

Dave

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
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.