Subject: Re: dynamic sysctl
To: Pavel Cahyna <firstname.lastname@example.org>
From: Andrew Brown <email@example.com>
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" >-----|
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."