From owner-freebsd-hackers Sun Jul 5 13:41:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA00694 for freebsd-hackers-outgoing; Sun, 5 Jul 1998 13:41:36 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from digi.digiware.nl (gtw.digiware.nl [194.151.72.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id NAA00635 for ; Sun, 5 Jul 1998 13:41:24 -0700 (PDT) (envelope-from wjw@digi.digiware.nl) Received: by digi.digiware.nl (8.8.7/1.63) id UAA10241; Sun, 5 Jul 1998 20:39:31 GMT From: wjw@digi.digiware.nl (Willem Jan Withagen) Message-Id: <199807052039.UAA10241@digi.digiware.nl> Subject: Re: adding to sysctl env. To: mike@smith.net.au (mike) Date: Sun, 5 Jul 1998 22:39:30 +0200 (CEST) Cc: terry@lambert.org (Terry Lambert), hackers@FreeBSD.ORG Reply-To: wjw@digiware.nl X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi mike, Terry, I've created a SYSCTL_INT.9 manpage. I've appended it so you can comment. And/or perhaps can commit it, if you have commit-rights Next question: If an include file requires another include file. eg. sys/sysctl.h requires sys/kernel.h Does the include for kernel.h go into sysctl.h? Reason I ask, is that there were no errors when I compiled without the inclusion, but that was the problem I could not see the debug.vlinkxlate in sysctl. :-( --WjW .\" -*- nroff -*- .\" .\" Copyright (c) 1998 Willem Jan Withagen .\" .\" All rights reserved. .\" .\" This program is free software. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $Id: $ .\" .Dd July 4, 1998 .Os .Dt SYSCTL_INT 9 .Sh NAME .Nm SYSCTL_INT .Nd Create an integer type entry in the sysctl table .Sh SYNOPSIS .Fd #include .Fd #include .Ft void .Fn SYSCTL_INT "parent" "nbr" "name" "access" "ptr" "val" "descr" .Sh DESCRIPTION A MACRO to create an integer type entry in the sysctl table. .Pp Its arguments are: .Bl -tag -width 8X .It Ar parent a name from the "class" of top level names, currently: _kern, _debug, _net, _machdep, _vm, _hw, _user, _vfs. .It Ar nbr the number of the sub-OID in the selected class, OR OID_AUTO in which case a number is automagically assigned .It Ar name the name which is used in the text interface with sysctl(8) .It Ar access what acctions are allowed: CTLFLAG_RD (read only), CTLFLAG_WR (write only??), CTLFLAG_RW (read and write) .It Ar ptr a pointer to the storage which actually contains the data used by the entry .It Ar val mostly 0 .It Ar descr mostly "" .El .Sh Example .Bd -literal static int vlinkxlatedebug; SYSCTL_INT(_debug, OID_AUTO, vlinkxlate, CTLFLAG_RW, &vlinkxlatedebug, 0, ""); .Ed .Sh SEE ALSO .Xr sysctl 3 .Xr sysctl 8 .Sh AUTHORS This man page was written by Willem Jan Withagen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message