summaryrefslogtreecommitdiffstats
path: root/share/man/man9/sysctl.9
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-09-30 17:09:59 +0000
committerru <ru@FreeBSD.org>2006-09-30 17:09:59 +0000
commite06dc5d45dc84cffc41bfaa924344cd166192ce2 (patch)
tree481d5143ebdc0e134cba8d6c10645ae885b6bc75 /share/man/man9/sysctl.9
parent521c0353e962321d073a39f7d2a4bcf64d680ecc (diff)
downloadFreeBSD-src-e06dc5d45dc84cffc41bfaa924344cd166192ce2.zip
FreeBSD-src-e06dc5d45dc84cffc41bfaa924344cd166192ce2.tar.gz
Revise markup.
Diffstat (limited to 'share/man/man9/sysctl.9')
-rw-r--r--share/man/man9/sysctl.9194
1 files changed, 54 insertions, 140 deletions
diff --git a/share/man/man9/sysctl.9 b/share/man/man9/sysctl.9
index 9f5426a..2a1ddee 100644
--- a/share/man/man9/sysctl.9
+++ b/share/man/man9/sysctl.9
@@ -45,113 +45,21 @@
.Sh SYNOPSIS
.In sys/types.h
.In sys/sysctl.h
-.Fo SYSCTL_DECL
-.Fa "name"
-.Fc
-.Fo SYSCTL_INT
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "val"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_LONG
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "val"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_NODE
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "handler"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_OPAQUE
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "len"
-.Fa "fmt"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_PROC
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "arg"
-.Fa "handler"
-.Fa "fmt"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_STRING
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "arg"
-.Fa "len"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_STRUCT
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "type"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_UINT
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "val"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_ULONG
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "val"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_XINT
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "val"
-.Fa "descr"
-.Fc
-.Fo SYSCTL_XLONG
-.Fa "parent"
-.Fa "nbr"
-.Fa "name"
-.Fa "access"
-.Fa "ptr"
-.Fa "val"
-.Fa "descr"
-.Fc
+.Fn SYSCTL_DECL name
+.Fn SYSCTL_INT parent nbr name access ptr val descr
+.Fn SYSCTL_LONG parent nbr name access ptr val descr
+.Fn SYSCTL_NODE parent nbr name access handler descr
+.Fn SYSCTL_OPAQUE parent nbr name access ptr len fmt descr
+.Fn SYSCTL_PROC parent nbr name access ptr arg handler fmt descr
+.Fn SYSCTL_STRING parent nbr name access arg len descr
+.Fn SYSCTL_STRUCT parent nbr name access ptr type descr
+.Fn SYSCTL_UINT parent nbr name access ptr val descr
+.Fn SYSCTL_ULONG parent nbr name access ptr val descr
+.Fn SYSCTL_XINT parent nbr name access ptr val descr
+.Fn SYSCTL_XLONG parent nbr name access ptr val descr
.Sh DESCRIPTION
The
-.Nm
+.Nm SYSCTL
kernel interfaces allow code to statically declare
.Xr sysctl 8
MIB entries, which will be initialized when the kernel module containing the
@@ -165,20 +73,20 @@ node must be declared in the current context using
.Fn SYSCTL_DECL .
.Pp
New nodes are declared using one of
-.Nm SYSCTL_INT ,
-.Nm SYSCTL_LONG ,
-.Nm SYSCTL_NODE ,
-.Nm SYSCTL_OPAQUE ,
-.Nm SYSCTL_PROC ,
-.Nm SYSCTL_STRING ,
-.Nm SYSCTL_STRUCT ,
-.Nm SYSCTL_UINT ,
-.Nm SYSCTL_ULONG ,
-.Nm SYSCTL_XINT ,
+.Fn SYSCTL_INT ,
+.Fn SYSCTL_LONG ,
+.Fn SYSCTL_NODE ,
+.Fn SYSCTL_OPAQUE ,
+.Fn SYSCTL_PROC ,
+.Fn SYSCTL_STRING ,
+.Fn SYSCTL_STRUCT ,
+.Fn SYSCTL_UINT ,
+.Fn SYSCTL_ULONG ,
+.Fn SYSCTL_XINT ,
and
-.Nm SYSCTL_XLONG .
+.Fn SYSCTL_XLONG .
Each macro accepts a parent name, as declared using
-.Nm SYSCTL_DECL ,
+.Fn SYSCTL_DECL ,
an OID number, typically
.Dv OID_AUTO ,
a node name, a set of control and access flags, and a description.
@@ -187,9 +95,9 @@ size, a value, and a function pointer implementing the MIB entry may also be
present.
.Pp
For most of the above macros, declaring a type as part of the access flags is
-not necessary -- however, when declaring a sysctl implemented by a function,
+not necessary \[em] however, when declaring a sysctl implemented by a function,
including a type in the access mask is required:
-.Bl -tag -width CTLTYPE_STRING
+.Bl -tag -width ".Dv CTLTYPE_STRING"
.It Dv CTLTYPE_NODE
This is a node intended to be a parent for other nodes.
.It Dv CTLTYPE_INT
@@ -213,7 +121,7 @@ This is an unsigned long.
.Pp
All sysctl types except for new node declarations require one or more flags
to be set indicating the read and write disposition of the sysctl:
-.Bl -tag -width CTLFLAG_ANYBODY
+.Bl -tag -width ".Dv CTLFLAG_ANYBODY"
.It Dv CTLFLAG_RD
This is a read-only sysctl.
.It Dv CTLFLAG_WR
@@ -224,7 +132,7 @@ This sysctl is readable and writable.
Any user or process can write to this sysctl.
.It Dv CTLFLAG_SECURE
This sysctl can be written to only if the effective securelevel of the
-process is <= 0.
+process is \[<=] 0.
.It Dv CTLFLAG_PRISON
This sysctl can be written to by processes in
.Xr jail 2 .
@@ -247,42 +155,44 @@ implement access control to limit the undesired exposure of information about
other processes, network connections, etc.
.Pp
The following top level sysctl name spaces are commonly used:
-.Bl -tag -width regression
-.It Dv compat
+.Bl -tag -width ".Va regression"
+.It Va compat
Compatibility layer information.
-.It Dv debug
+.It Va debug
Debugging information.
Various name spaces exist under
-.Dv debug .
-.It Dv hw
+.Va debug .
+.It Va hw
Hardware and device driver information.
-.It Dv kern
+.It Va kern
Kernel behavior tuning; generally deprecated in favor of more specific
name spaces.
-.It Dv machdep
+.It Va machdep
Machine-dependent configuration parameters.
-.It Dv net
+.It Va net
Network subsystem.
Various protocols have name spaces under
-.Dv net .
-.It Dv regression
+.Va net .
+.It Va regression
Regression test configuration and information.
-.It Dv security
+.It Va security
Security and security-policy configuration and information.
-.It Dv sysctl
+.It Va sysctl
Reserved name space for the implementation of sysctl.
-.It Dv user
+.It Va user
Configuration settings relating to user application behavior.
Generally, configuring applications using kernel sysctls is discouraged.
-.It Dv vfs
+.It Va vfs
Virtual file system configuration and information.
-.It Dv vm
+.It Va vm
Virtual memory subsystem configuration and information.
.El
.Sh EXAMPLES
Sample use of
-.Nm SYSCTL_DECL
-to declare the "security" sysctl tree for use by new nodes:
+.Fn SYSCTL_DECL
+to declare the
+.Va security
+sysctl tree for use by new nodes:
.Bd -literal -offset indent
SYSCTL_DECL(_security);
.Ed
@@ -351,11 +261,15 @@ the future.
.Xr sysctl_ctx_init 9 ,
.Xr sysctl_remove_oid 9
.Sh HISTORY
+The
.Xr sysctl 8
-first appeared in
+utility first appeared in
.Bx 4.4 .
.Sh AUTHORS
-The sysctl implementation originally found in
+.An -nosplit
+The
+.Nm sysctl
+implementation originally found in
.Bx
has been extensively rewritten by
.An Poul-Henning Kamp
OpenPOWER on IntegriCloud