From owner-freebsd-hackers Wed Sep 10 21:37:47 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA25616 for hackers-outgoing; Wed, 10 Sep 1997 21:37:47 -0700 (PDT) Received: from word.smith.net.au (word.smith.net.au [202.0.75.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA25611 for ; Wed, 10 Sep 1997 21:37:42 -0700 (PDT) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id OAA06436; Thu, 11 Sep 1997 14:05:55 +1000 (EST) Message-Id: <199709110405.OAA06436@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: Simon Shapiro cc: Mike Smith , freebsd-hackers@freebsd.org Subject: Re: /usr/include/sys How To question In-reply-to: Your message of "Wed, 10 Sep 1997 20:13:21 MST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Sep 1997 14:05:52 +1000 From: Mike Smith Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > 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