Subject: Re: smLangTable indexing: why int?

From: [email-masked] (David Levi)
Date: Tue, 13 Apr 1999 15:54:12 -0400

At 10:24 AM 4/13/99 -0700, Wes Hardaker wrote:
>
>So, I've finally gotten around to looking at the DISMAN-SCRIPT-MIB (a
>bit late, I know)...
>
>Why was the smLangTable indexed with an integer instead of, say, the
>OID for the language in the first place?  This means that once an
>entry is put into the table with a given index (say #2 = java) then
>entry #2 can never be deleted and replaced with something different
>(say perl) without a carefully checking to make sure the scripts in
>the other tables don't point to the wrong language all of a sudden.
>Using an index of the language OID would result in less problems like
>this wouldn't it?
>
>Just curious,

I think partly it's because we originally were thinking that the
smLangTable would be static, and that using an integer would simplify
some of the other tables.  In practice (correct me if you think
otherwise, Juergen), the smLangTable probably *will* actually be
static.  Even for an implementation using SMX, you'd probably have
pre-configured which languages are actually supported.  Note that
you cannot change the smLangTable with an SNMP Set, it is completely
read-only.

-Dave
------------------------------------------------------------------------------
David B. Levi               Nortel Networks           [email-masked]
Voice Mail:                 +1 408 495 3622
------------------------------------------------------------------------------

---

From: Wes Hardaker <[email-masked]>
Date: 13 Apr 1999 13:22:57 -0700

>>>>> On Tue, 13 Apr 1999 15:54:12 -0400, [email-masked] (David Levi) said:

David> I think partly it's because we originally were thinking that
David> the smLangTable would be static, and that using an integer
David> would simplify some of the other tables.  In practice (correct
David> me if you think otherwise, Juergen), the smLangTable probably
David> *will* actually be static.  Even for an implementation using
David> SMX, you'd probably have pre-configured which languages are
David> actually supported.  Note that you cannot change the
David> smLangTable with an SNMP Set, it is completely read-only.

Lets put it this way...  I wanted to create a configurable scripting
set that allowed administrators to put lines in a configuration file
that would point to arbitrary scripting languages
(/usr/local/bin/perl, /usr/local/bin/tcl, /usr/local/bin/emacs even).
The problem is I wanted to nicely handle the indexing in the table for 
the user...  I can't do this now (I suppose I could use a hash value
and hope not to hit any collisions).  I'd have to have the user assign 
the path and let them suffer if they rename it.

Even for a router or something else that prompts for a more static
environment, flash roms can get updated to drop an older language and
adopt a newer better one.  They'd have to internally develop an
enumerated list that shouldn't have re-used slots.

Since this is already possible using a mib though...

(Actually, I probably would have picked a octet-string name for my
specific case, but either would be fine).

-- 
Wes Hardaker
Distributed Computing Analysis and Support
University of California at Davis