Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jul 1998 22:39:30 +0200 (CEST)
From:      wjw@digi.digiware.nl (Willem Jan Withagen)
To:        mike@smith.net.au (mike)
Cc:        terry@lambert.org (Terry Lambert), hackers@FreeBSD.ORG
Subject:   Re: adding to sysctl env.
Message-ID:  <199807052039.UAA10241@digi.digiware.nl>

next in thread | raw e-mail | index | archive | help
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 <sys/kernel.h>
.Fd #include <sys/sysctl.h>
.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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807052039.UAA10241>