Subject: Re: Replacing the sysctl() interface.
To: None <>
From: Charles M. Hannum <>
List: tech-kern
Date: 06/05/2000 14:54:18
There are problems with all of the approaches mentioned, of course.

* Using a fs interface introduces a lot of bloat and overhead.  In
  wired kernel memory.  Remember that the reason for the way both
  sysctl(2) and SNMP handle the MIB is to keep the kernel
  implementation very fast and small.

* Using a non-fs interface with actual names also introduces a fair
  amount of overhead and bloat -- but not as much.  It has the
  additional performance problem of causing you to re-walk the
  hierarchy (with massive numbers of strcmp()s) every time you fetch a
  value, unless you add another set of iteration primitives.

* With either of the above, you still have to translate everything in

Really, given the way the world works today, and the simply fact that
site managers generally *want* SNMP support, the right thing to do is
to merge our sysctl(2) MIB with SNMP.  The user API would be almost
the same as it is today, but it would require no extra name
translation for SNMP.  The internal implementation could of course be
anything we want; adding a pluggable interface would be fairly

Now, I realize that every mention of the word `SNMP' makes some people
go completely irrational, and I know that *shudder* using a fairly
standardized MIB is unlikely to be accepted, but that's life around