Re: possible bug in getnext implementation

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 ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-11-2007
Dave Shield
 
Posts: n/a
Default Re: possible bug in getnext implementation

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
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:03 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0