Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 1998 16:07:04 -0700
From:      Mike Smith <mike@smith.net.au>
To:        wjw@IAEhv.nl
Cc:        dfr@nlsystems.com (Doug Rabson), hackers@FreeBSD.ORG
Subject:   Re: SYSCTL ....... 
Message-ID:  <199807242307.QAA00758@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 24 Jul 1998 01:16:39 %2B0200." <199807232316.BAA06524@surf.IAE.nl> 

next in thread | previous in thread | raw e-mail | index | archive | help
> =>  Last time I was daydreaming about sysctl, I thought that using SYSINIT
> =>  functions to build the tree would be a good idea.  This would have the
> =>  benefit of trivially adding in sysctl variables in kernel modules loaded
> =>  using KLD since it runs SYSINITs in the loaded modules.  To support
> =>  unloading modules, a method of automatically disconnecting variables
> =>  defined by the module is needed. 
> 
> Intresting point. 
> I haven't thought about this point. I considered that once submitted OID's 
> are there for ever. But evaporating LKM's would case some access trouble.

Correct.  We should incorporate the simple structure reference counting 
implementation that Terry published a little while back (Terry, why is 
this not on your webpage?).

When registering a node, it should be possible to supply an object 
against which a reference will be taken.  In the case of an LKM, the 
module may not be unloaded without its reference count being zero.

> The main issue here is that the data-structure is fully dynamical. And
> follows the MIB idea: which has identifiers:
> 	N^n or S^n
> where N is either a number or S a string. Given a certain prefix:
> 	a.b.c.d
> of the sequence a.b.c.d.e then the element N_e and S_e have a fixed 
> matching relation. (Call each level a layer of hierachy in the nameing
> space, or more compiler like: scope)
> However if the sequence is:
> 	w.x.y.z.e'
> then again N_e' and S_e' are a matching pair. But there is no relation
> between S_e and S_e', although N_e and N_e' can have the same value.
> this disjunct relation also hold for all other relation which are part of
> the OIDnodes e and e'.

Save yourself some grief, and eliminate numeric OIDs.

> The numeric sequences are more/most important entry for the structure.
> This due to the idea have on SNMP-mib's.

No, and very bad.  Numeric OIDs should be supported for *legacy* nodes 
only.

> Given the fact that one of the most common operators on a MIB-tree will be
> get_next, I'm considering adding a UP-relation as well. This will make it
> possible to get back to the one-higher node in the same tree.

The ability to traverse, and also to best-guess restart a traversal 
from a node that no longer exists, is critical.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807242307.QAA00758>