summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2019-01-06 20:09:39 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2019-01-06 20:09:39 +0000
commit0873ec2e7bd4d8a94e8fa8439d461ca6906c112c (patch)
treebaee27f883d79f60662420c000fc2d5099bfd7d0 /lib
parentf9d9d05087b38f3a1e719b3aa354c85bf48af970 (diff)
Fix most of the .Li abuse:
* Use .Vt for struct names and other type names like in_port_t. * Use .Dv for #define'd constants like CPUSTATES and KERN_SYSVIPC_INFO. * Use .Va for sysctl variable names like "machdep". Not touching some of the .Li use related to networking; that stuff looks suspicious in more than one way and a diff would need review.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/sysctl.296
1 files changed, 49 insertions, 47 deletions
diff --git a/lib/libc/sys/sysctl.2 b/lib/libc/sys/sysctl.2
index 8259ccd057a..f71a28a6cc2 100644
--- a/lib/libc/sys/sysctl.2
+++ b/lib/libc/sys/sysctl.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sysctl.2,v 1.18 2018/12/26 16:14:59 anton Exp $
+.\" $OpenBSD: sysctl.2,v 1.19 2019/01/06 20:09:38 schwarze Exp $
.\"
.\" Copyright (c) 1993
.\" The Regents of the University of California. All rights reserved.
@@ -27,7 +27,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: December 26 2018 $
+.Dd $Mdocdate: January 6 2019 $
.Dt SYSCTL 2
.Os
.Sh NAME
@@ -229,7 +229,7 @@ Each time it runs,
gets the list of debugging variables from the kernel and
displays their current values.
The system defines twenty
-.Li struct ctldebug
+.Vt struct ctldebug
variables named
.Va debug0
through
@@ -322,7 +322,7 @@ The number of disks currently attached to the system.
A comma-separated list of disk names.
.It Dv HW_DISKSTATS Pq Va hw.diskstats
An array of
-.Li struct diskstats
+.Vt struct diskstats
structures containing disk statistics.
.It Dv HW_MACHINE Pq Va hw.machine
The machine class.
@@ -354,17 +354,17 @@ The total physical memory, in bytes.
The product name of the machine.
.It Dv HW_SENSORS Pq Va hw.sensors
Third level comprises an array of
-.Li struct sensordev
+.Vt struct sensordev
structures containing information about devices
that may attach hardware monitoring sensors.
.Pp
Third, fourth and fifth levels together comprise an array of
-.Li struct sensor
+.Vt struct sensor
structures containing snapshot readings of hardware monitoring sensors.
In such usage, third level indicates the numerical representation
of the sensor device name to which the sensor is attached
(a device's xname and number are matched with the help of
-.Li struct sensordev
+.Vt struct sensordev
structure above),
fourth level indicates sensor type and
fifth level is an ordinal sensor number (unique to
@@ -530,7 +530,7 @@ variable.
.El
.It Dv KERN_BOOTTIME Pq Va kern.boottime
A
-.Li struct timeval
+.Vt struct timeval
structure is returned.
This structure contains the time that the system was booted.
.It Dv KERN_CACHEPCT Pq Va kern.bufcachepercent
@@ -540,7 +540,7 @@ the default is 20%.
The scheduler exponential decay value.
.It Dv KERN_CLOCKRATE Pq Va kern.clockrate
A
-.Li struct clockinfo
+.Vt struct clockinfo
structure is returned.
This structure contains the clock, statistics clock and profiling clock
frequencies, the number of micro-seconds per hz tick, and the clock
@@ -549,7 +549,7 @@ skew rate.
The console device.
.It Dv KERN_CPTIME Pq Va kern.cp_time
An array of longs of size
-.Li CPUSTATES
+.Dv CPUSTATES
is returned, containing statistics about the number of ticks spent by
the system in interrupt processing, user processes
.Po
@@ -564,7 +564,7 @@ but obtains information from only the single CPU specified by the
third level name given.
.It Dv KERN_CPUSTATS
A
-.Li struct cpustats
+.Vt struct cpustats
structure is returned.
This structure contains the array described in
.Dv KERN_CPTIME2
@@ -575,7 +575,7 @@ Get or set the YP domain name.
.It Dv KERN_FILE Pq Va kern.file
Return the entire file table, or a subset of it.
An array of
-.Li struct kinfo_file
+.Vt struct kinfo_file
structures is returned,
whose size depends on the current number of selected files in the system.
The third and fourth level names are as follows:
@@ -587,11 +587,11 @@ The third and fourth level names are as follows:
.El
.Pp
The fifth level name is the size of the
-.Li struct kinfo_file
+.Vt struct kinfo_file
and the sixth level name is the number of structures to return.
.It Dv KERN_FORKSTAT Pq Va kern.forkstat
A
-.Li struct forkstat
+.Vt struct forkstat
structure is returned.
This structure contains information about the number of
.Xr fork 2 ,
@@ -635,7 +635,7 @@ A node containing the statistics for the memory bucket of the
specified size (in decimal notation, the number of bytes per bucket
element, e.g., 16, 32, 128).
Each node returns a
-.Li struct kmembuckets .
+.Vt struct kmembuckets .
.Pp
If a value is specified that does not correspond directly to a
bucket size, the statistics for the closest larger bucket size will be
@@ -652,7 +652,7 @@ types.
A node containing the statistics for the memory types of the specified
name.
Each node returns a
-.Li struct kmemstats .
+.Vt struct kmemstats .
.El
.It Dv KERN_MAXCLUSTERS Pq Va kern.maxclusters
The maximum number of
@@ -673,7 +673,7 @@ The maximum number of simultaneous threads the system will allow.
The maximum number of vnodes available on the system.
.It Dv KERN_MBSTAT Pq Va kern.mbstat
A
-.Li struct mbstat
+.Vt struct mbstat
structure is returned, containing statistics on
.Xr mbuf 9
usage.
@@ -685,7 +685,7 @@ see
The size of the kernel message buffer.
.It Dv KERN_NCHSTATS Pq Va kern.nchstats
A
-.Li struct nchstats
+.Vt struct nchstats
structure is returned.
This structure contains information about the
filename to
@@ -745,7 +745,7 @@ attempts to comply.
.It Dv KERN_PROC Pq Va kern.proc
Return the entire process table, or a subset of it.
An array of
-.Li struct kinfo_proc
+.Vt struct kinfo_proc
structures is returned,
whose size depends on the current number of selected processes in the system.
The third and fourth level names are as follows:
@@ -762,7 +762,7 @@ The third and fourth level names are as follows:
.El
.Pp
The fifth level name is the size of the
-.Li struct kinfo_proc
+.Vt struct kinfo_proc
and the sixth level name is the number of structures to return.
.It Dv KERN_PROC_ARGS Pq Va kern.procargs
Returns the arguments or environment of a process.
@@ -802,11 +802,11 @@ The third level name is the target process ID.
.It Dv KERN_PROC_VMMAP Pq Va kern.proc_vmmap
Return the entire process VM map entries.
An array of
-.Li struct kinfo_vmentry
+.Vt struct kinfo_vmentry
structures is returned,
whose size depends on the current number of VM map entries of the selected process.
Iteration is possible by setting the base address in the first element of
-.Li struct kinfo_vmentry .
+.Vt struct kinfo_vmentry .
.It Dv KERN_PROF Pq Va kern.profiling
Return profiling information about the kernel.
If the kernel is not compiled for profiling,
@@ -843,7 +843,7 @@ or
to show that profiling is running or stopped.
.It Dv GPROF_TOS
Array of
-.Li struct tostruct
+.Vt struct tostruct
describing destination of calls and their counts.
.El
.It Dv KERN_RAWPARTITION Pq Va kern.rawpartition
@@ -856,14 +856,14 @@ This level may be raised by processes with appropriate privileges.
It may only be lowered by process 1.
.It Dv KERN_SEMINFO Pq Va kern.seminfo
Return the elements of
-.Li struct seminfo .
+.Vt struct seminfo .
If the kernel is not compiled with System V style semaphore support,
attempts to retrieve any of the
.Dv KERN_SEMINFO
values will fail with
.Er EOPNOTSUPP .
The third level names for the elements of
-.Li struct seminfo
+.Vt struct seminfo
are detailed below.
The changeable column shows whether a process with appropriate
privileges may change the value.
@@ -905,14 +905,14 @@ The semaphore maximum value.
.El
.It Dv KERN_SHMINFO Pq Va kern.shminfo
Return the elements of
-.Li struct shminfo .
+.Vt struct shminfo .
If the kernel is not compiled with System V style shared memory support,
attempts to retrieve any of the
.Dv KERN_SHMINFO
values will fail with
.Er EOPNOTSUPP .
The third level names for the elements of
-.Li struct shminfo
+.Vt struct shminfo
are detailed below.
The changeable column shows whether a process with appropriate
privileges may change the value.
@@ -975,7 +975,7 @@ The random value is added to make buffer overflow exploitation slightly
harder.
The bigger the number, the harder it is to brute force this added protection,
but it also means bigger waste of memory.
-.It Li KERN_SYSVIPC_INFO Pq Va kern.sysvipc_info
+.It Dv KERN_SYSVIPC_INFO Pq Va kern.sysvipc_info
Return System V style IPC configuration and run-time information.
The third level name selects the System V style IPC facility.
.Bl -column "KERN_SYSVIPC_MSG_INFO" "struct shm_sysctl_info" -offset indent
@@ -1058,7 +1058,7 @@ The variables are as follows:
.Bl -tag -width "123456"
.It Dv KERN_TTY_INFO Pq Va kern.tty.ttyinfo
Returns an array of
-.Li struct itty
+.Vt struct itty
structures containing tty statistics.
.It Dv KERN_TTY_TKCANCC Pq Va kern.tty.tk_cancc
Returns the number of input characters in canonical mode.
@@ -1140,7 +1140,7 @@ Most architectures define at least the following variables.
Consult the example file
.Pa /etc/examples/sysctl.conf
for a non-exhaustive list of
-.Li machdep
+.Va machdep
variables.
.Ss CTL_NET
The string and integer information available for the
@@ -1179,7 +1179,7 @@ The fifth and sixth level names are as follows:
.It Dv NET_RT_TABLE Ta "rtableid"
.El
.Bl -tag -width "123456"
-.It Li NET_RT_DUMP
+.It Dv NET_RT_DUMP
If set to 0, show all routes.
If set to any number, show all routes with that number priority.
If set to a negative number, show routes that do not have the positive
@@ -1400,10 +1400,10 @@ IPsec encapsulated or decapsulated by the host.
The default value is 0.
.It Li ip.ifq
Fifth level comprises an array of
-.Li struct ifqueue
+.Vt struct ifqueue
structures containing information about IP packet input queue.
The fifth level names for the elements of
-.Li struct ifqueue
+.Vt struct ifqueue
are detailed below.
.Bl -column "Fifth level name" "integer" "Changeable" -offset indent
.It Sy "Fifth level name" Ta Sy "Type" Ta Sy "Changeable"
@@ -1610,7 +1610,7 @@ Returns 1 if TCP segments with the
flag set are being acknowledged immediately, otherwise 0.
.It Li tcp.baddynamic Pq Va net.inet.tcp.baddynamic
An array of
-.Li in_port_t
+.Vt in_port_t
is returned specifying the bitmask of TCP ports between 512
and 1023 inclusive that should not be allocated dynamically
by the kernel (i.e., they must be bound specifically by port number).
@@ -1618,7 +1618,7 @@ by the kernel (i.e., they must be bound specifically by port number).
Returns 1 if Explicit Congestion Notifications for TCP are enabled.
.It Li tcp.ident Pq Va net.inet.tcp.ident
A
-.Li struct tcp_ident_mapping
+.Vt struct tcp_ident_mapping
specifying a local and foreign endpoint of a TCP
socket is filled in with the effective and real UIDs of the process that
owns the socket.
@@ -1656,7 +1656,7 @@ is increased to 10 * MSS or 14600 bytes, as specified in
RFC 6928.
.It Li tcp.rootonly Pq Va net.inet.tcp.rootonly
An array of
-.Li in_port_t
+.Vt in_port_t
is returned specifying the bitmask of TCP ports
that can only be bound by processes with root euid.
When running with a
@@ -1861,10 +1861,10 @@ Methods for overriding this value are documented in
.Pp
.It Li ip6.ifq Pq Va net.inet6.ip6.ifq
Fifth level comprises an array of
-.Li struct ifqueue
+.Vt struct ifqueue
structures containing information about IPv6 packet input queue.
The fifth level names for the elements of
-.Li struct ifqueue
+.Vt struct ifqueue
are detailed above in
.Li ip.ifq .
.Pp
@@ -1968,10 +1968,11 @@ Set or get the default TTL value which is used for MPLS (Shim) Header.
The default is 255.
.It Dv MPLSCTL_IFQUEUE Pq Va net.mpls.ifq
Fourth level comprises an array of
-.Li struct ifqueue
+.Vt struct ifqueue
structures containing information about MPLS packet input queue.
The forth level names for the elements of
-.Li struct ifqueue are same as described in
+.Vt struct ifqueue
+are the same as described in
.Li ip.ifq
in the
.Dv PF_INET
@@ -2011,10 +2012,10 @@ If set to 1, enable PIPEX processing.
The default is 0.
.It Dv PIPEXCTL_INQ Pq Va net.pipex.inq
Fourth level comprises an array of
-.Li struct ifqueue
+.Vt struct ifqueue
structures containing information about the PIPEX packet input queue.
The forth level names for the elements of
-.Li struct ifqueue
+.Vt struct ifqueue
are the same as described in
.Li ip.ifq
in the
@@ -2022,10 +2023,11 @@ in the
section.
.It Dv PIPEXCTL_OUTQ Pq Va net.pipex.outq
Fourth level comprises an array of
-.Li struct ifqueue
+.Vt struct ifqueue
structures containing information about PIPEX packet output queue.
The forth level names for the elements of
-.Li struct ifqueue are same as described in
+.Vt struct ifqueue
+are the same as described in
.Li ip.ifq
in the
.Dv PF_INET
@@ -2176,7 +2178,7 @@ pages which contain anonymous mapping.
.It Dv VM_LOADAVG Pq Va vm.loadavg
Return the load average history.
The returned data consists of a
-.Li struct loadavg .
+.Vt struct loadavg .
.It Dv VM_MALLOC_CONF Pq Va vm.malloc_conf
String of option flags for the
.Xr malloc 3
@@ -2189,12 +2191,12 @@ in seconds.
.It Dv VM_METER Pq Va vm.vmmeter
Return the system wide virtual memory statistics.
The returned data consists of a
-.Li struct vmtotal .
+.Vt struct vmtotal .
.It Dv VM_NKMEMPAGES Pq Va vm.nkmempages
Number of pages in kmem_map.
.It Dv VM_PSSTRINGS Pq Va vm.psstrings
Returns the address of the process
-.Li struct ps_strings .
+.Vt struct ps_strings .
The
.Xr ps 1
program uses it to locate the argument and environment strings.