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