Subject: Re: dynamic sysctl
To: Pavel Cahyna <>
From: Andrew Brown <>
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" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."