Subject: Re: dynamic sysctl
To: Pavel Cahyna <pavel.cahyna@st.ms.mff.cuni.cz>
From: Andrew Brown <atatat@atatdot.net>
List: tech-kern
Date: 11/19/2003 20:46:13
>> Well you are adding a system call to convert names to numbers, why not
>> add 'sysctl by name' instead?
>
>Sometimes, the name of a sysctl node is actually a numerical index. E.g under 
>proc there are nodes with PIDs as names. Ints are more natural than strings 
>for that purpose. You could name them by the number represented as decimal
>value, but this is IMHO ugly.

sysctlnametomib() can do direct numeric conversion, too, so this is
not an issue.

i've grown particularly fond of frobbing the securelevel by doing

	sysctl -w 1.9=47

and having sysctl report

	kern.securelevel: 2 -> 47

:)

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
werdna@squooshy.com       * "information is power -- share the wealth."