Date: Thu, 11 Sep 1997 14:05:52 +1000 From: Mike Smith <mike@smith.net.au> To: Simon Shapiro <Shimon@i-Connect.Net> Cc: Mike Smith <mike@smith.net.au>, freebsd-hackers@freebsd.org Subject: Re: /usr/include/sys How To question Message-ID: <199709110405.OAA06436@word.smith.net.au> In-Reply-To: Your message of "Wed, 10 Sep 1997 20:13:21 MST." <XFMail.970910201321.Shimon@i-Connect.Net>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > If you only have a small number of these tunables, make them sysctl > > variables. Otherwise, define a structure containing them and a new > > ioctl to retrieve it. > > I have the ioctl to retrieve them. How do I go about making them sysctl > variables? Try something like : #ifndef FOO_TUNABLE # define FOO_TUNABLE 16 #endif static int foo_knob = FOO_TUNABLE; SYSCTL_INT(_machdep, OID_AUTO, foo_knob, CTLFLAG_RO, &foo_knob, 0, ""); See sys/sysctl.h for more details. mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709110405.OAA06436>