Re: Question Concerning Lexicographical Search

Olivier Miakinen <> Fri, 23 May 1997 10:01 UTC

Received: from cnri by id aa03385; 23 May 97 6:01 EDT
Received: from by CNRI.Reston.VA.US id aa03936; 23 May 97 6:01 EDT
Received: (from majordom@localhost) by (8.8.2/8.8.2) id FAA23009 for snmpv2-outgoing; Fri, 23 May 1997 05:47:10 -0400 (EDT)
Message-Id: <>
Date: Fri, 23 May 1997 11:04:42 +0200
From: Olivier Miakinen <>
Organization: ISM/OpenMaster
X-Mailer: Mozilla 3.0Gold (X11; I; AIX 2)
Mime-Version: 1.0
To: Kai Mao <>
Subject: Re: Question Concerning Lexicographical Search
References: <>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk

Kai Mao wrote:
> Hello!
>         I have a general SNMP implementation question.
>         I have a question concerning the OID table used by SNMP's
> lexicographical search for GetNext requests.  How is the GetNext OID
> calculated without using a table?  It seems silly to maintain an ordered
> OID table of all the objects and instances for the GetNext requests.
> Since most SNMP agents utilize method routines for data retrieval, why
> should the SNMP agent have to maintain the OID table with information on
> instances?  Shouldn't the agent be isolated from information concerning
> instances?  But I just don't see how the GetNext can be performed
> without maintaining the OID table.

There is no need to maintain a lexicographically ordered table of
all instances. In some cases it is even impossible (for example the
tcpConnTable and the udpTable in MIB-II).

What you need is, when you receive a GetNext request, to read the
instances once (in any order) and to retain the smallest instance
that is greater than the one asked in the request. It is not so
hard to do.


              \\\\                                ////
              (o o)                              (o o)
|        Phone: +33 1 30 80 70 42  |
|              Fax:   +33 1 30 80 79 18  |