Re: Question Concerning Lexicographical Search

Olivier Miakinen <O.Miakinen@frcl.bull.fr> Fri, 23 May 1997 10:01 UTC

Received: from cnri by ietf.org id aa03385; 23 May 97 6:01 EDT
Received: from portal.ex.tis.com by CNRI.Reston.VA.US id aa03936; 23 May 97 6:01 EDT
Received: (from majordom@localhost) by portal.ex.tis.com (8.8.2/8.8.2) id FAA23009 for snmpv2-outgoing; Fri, 23 May 1997 05:47:10 -0400 (EDT)
Message-Id: <33855DAA.15FB@frcl.bull.fr>
Date: Fri, 23 May 1997 11:04:42 +0200
From: Olivier Miakinen <O.Miakinen@frcl.bull.fr>
Organization: ISM/OpenMaster
X-Mailer: Mozilla 3.0Gold (X11; I; AIX 2)
Mime-Version: 1.0
To: Kai Mao <kmao@fujitsu-fnc.com>
Cc: snmpv2@tis.com
Subject: Re: Question Concerning Lexicographical Search
References: <3384CA19.7014@fujitsu-fnc.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-snmpv2@ex.tis.com
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.

Olivier.

-- 
              \\\\                                ////
              (o o)                              (o o)
+----------oOO--(_)--OOo--------------------oOO--(_)--OOo----------+
|  mailto:O.Miakinen@frcl.bull.fr        Phone: +33 1 30 80 70 42  |
|  http://www.ism.bull.net/              Fax:   +33 1 30 80 79 18  |
+-------------(_)-(_)--------------------------(_)-(_)-------------+