This is a discussion on Re: possible bug in getnext implementation within the SNMP Users forums, part of the Networking and Network Related category; On 11/12/2007, Rotem Tzuk <Rotemt@waves.com> wrote: > I expected the index to refer to ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On 11/12/2007, Rotem Tzuk <Rotemt@waves.com> 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 Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/...net-snmp-users |