fix wrong names and add markup

This commit is contained in:
christos 2019-09-15 01:03:23 +00:00
parent ca2fce2e75
commit 9aeb91c2c4
1 changed files with 22 additions and 8 deletions

View File

@ -1,4 +1,4 @@
.\" $NetBSD: sysctl.3,v 1.204 2018/09/06 09:28:00 maxv Exp $
.\" $NetBSD: sysctl.3,v 1.205 2019/09/15 01:03:23 christos Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" @(#)sysctl.3 8.4 (Berkeley) 5/9/95
.\"
.Dd September 6, 2018
.Dd September 14, 2019
.Dt SYSCTL 3
.Os
.Sh NAME
@ -330,7 +330,8 @@ Querying the tree to discover the name to number mapping permits
dynamic discovery of all the data that the tree currently has
instrumented.
For example, to discover all the nodes below the
CTL_VFS node:
.Dv CTL_VFS
node:
.Pp
.Bd -literal -offset indent -compact
struct sysctlnode query, vfs[128];
@ -356,7 +357,11 @@ version be explicitly specified.
.Pp
Creation and destruction of nodes works by constructing part of a new
node description (or a description of the existing node) and invoking
CTL_CREATE (or CTL_CREATESYM) or CTL_DESTROY at the parent of the new
.Dv CTL_CREATE
(or
.Dv CTL_CREATESYM ) or
.Dv CTL_DESTROY
at the parent of the new
node, with a pointer to the new node passed via the
.Fa new
and
@ -374,7 +379,11 @@ The minimum requirements for creating a node are setting the
.Fa sysctl_flags
to indicate the new node's type,
.Fa sysctl_num
to either the new node's number (or CTL_CREATE or CTL_CREATESYM if a
to either the new node's number (or
.Dv CTL_CREATE
or
.Dv CTL_CREATESYM
if a
dynamically allocated MIB number is acceptable),
.Fa sysctl_size
to the size of the data to be instrumented (which must agree with the
@ -389,7 +398,9 @@ will vary depending on what is to be instrumented.
If existing kernel data is to be covered by this new node, its address
should be given in
.Fa sysctl_data
or, if CTL_CREATESYM is used,
or, if
.Dv CTL_CREATESYM
is used,
.Fa sysctl_data
should be set to a string containing its name from the kernel's symbol
table.
@ -398,10 +409,13 @@ the new integer or quad type data should be placed into either
.Fa sysctl_idata
or
.Fa sysctl_qdata ,
respectively, along with the SYSCTL_IMMEDIATE flag being set, or
respectively, along with the
.Dv CTLFLAG_IMMEDIATE
flag being set, or
.Fa sysctl_data
should be set to point to a copy of the new data, and the
SYSCTL_OWNDATA flag must be set.
.Dv CTLFLAG_OWNDATA
flag must be set.
This latter method is the only way that new string and struct type
nodes can be initialized.
Invalid kernel addresses are accepted, but any attempt to access those