Re: sysctl() considered harmful

Mark H. Wood (mwood@mhw.OIT.IUPUI.EDU)
Thu, 15 Jan 1998 13:48:49 -0500 (EST)


On Tue, 6 Jan 1998, A.N.Kuznetsov wrote:

> In article <199801060047.BAA01590@mira.isdn.cs.tu-berlin.de> you wrote:
> : No effort has been taking to give those sysctls which lost their
> : meaning during 2.1 some reasonable implementation. Most notably,
> : NET_IPV4_FORWARD can probably implemented on top of
> : NET_IPV4_FORWARDING. One exception: NET_IPV4_DYNADDR is apparently
> : the same as NET_IPV4_IP_DYNADDR.
>
> I'm sorry but the most of 2.1.77 NET_IPV4_* and NET_IPV6_* are obsolete.
> So that just imagine, that they do not exist at all :-)
> They will stabilize in 2.2 and, apparently, will have nothing
> common with 2.0.
>
> Moreover, I believe all the idea behind binary sysctl() is wrong
> by design. sysctl() touches bowels of kernel, so that you cannot hope
> that a value will be preserved in development or between major releases.

Nonsense. There's no reason for these constants to change between
releases. That's why the original poster was surprised. If the internal
values change, then you should provide glue code to translate between
internal values and the documented external ones. If the change is so
great that no such translation is possible (which should happen *very*
rarely), declare a new interface and mark the old one obsolete.

-- 
Mark H. Wood, Lead System Programmer   mwood@IUPUI.Edu
A bug on the windshield of an onrushing future.