Subject: Re: Sysctl vendor fields
To: None <firstname.lastname@example.org>
From: Andrew Brown <email@example.com>
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" >-----|
firstname.lastname@example.org * "ah! i see you have the internet
email@example.com (Andrew Brown) that goes *ping*!"
firstname.lastname@example.org * "information is power -- share the wealth."