Subject: Re: Sysctl vendor fields
To: None <>
From: Andrew Brown <>
List: current-users
Date: 07/04/2003 01:13:38
>>>The first one was, instead of only declaring CTL_XXX and XXX_VALUE defines
>>>and write a function for every single subtree, to declare full structs
>>>that reference each other in a way that makes it possible for a single
>>>function to handle a whole subtree, with some quirks for some values that
>>>need special management.
>	BSDI is doing something like this.  you pass table of CTL_xx and
>	pointer to variable, and sysctl_int_arr() will handle dispatches.

yeah.  i was thinking that each (terminal) node should have a pointer
to a function that handled it.  and/or a pointer to a cookie that the
function could pick over for "hints".  of course, that would only be
for sysctls created in kernel space.  sysctls created from userland
wouldn't get all the fancy handling.

it's tricky, but it's certainly doable.  i have this crazy notion that
ifconfig could be turned into a shell script, but i doubt i'll really
get that far with it...  :)

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."