Home | History | Annotate | only in /src/sbin/sysctl
History log of /src/sbin/sysctl
RevisionDateAuthorComments
 1.22 18-Aug-2019  kamil sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.21 29-Nov-2012  christos branches: 1.21.30; 1.21.32;
use the proper variable
 1.20 13-Dec-2010  pooka branches: 1.20.6; 1.20.12;
RUMP_ACTION -> RUMPPRG
 1.19 05-Nov-2010  pooka make sysctl(8) work as a rump client
 1.18 13-Feb-2009  uebayasi Comment out CFLAGS+=-g.
 1.17 06-Apr-2005  christos branches: 1.17.28; 1.17.30;
PPR/29909: Manuel Bouyer: sysctl dumps core if kern.consdev returns unknown
device. If we cannot determine the device name of the console, print the
console dev_t in hex.
 1.16 25-Mar-2004  atatat Move sysctlbyname(), sysctlnametomib(), and sysctlgetmibinfo() from
sysctl(8) into libc, making the minor number jump. Add prototypes to
sys/sysctl.h, fix sets, modify man pages, etc. That oughta cover it.
 1.15 04-Dec-2003  atatat New sysctl(8) binary. Performs auto-discovery and can add/remove
nodes from the tree. Never needs to be recompiled again.
 1.14 30-Nov-2002  lukem tweaks for fparseln(3) move from libutil to libc:
- remove #include <util.h> if nothing else needed it
- remove LDFLAGS+=-lutil if nothing else needed it
 1.13 19-Aug-2002  lukem Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path
 1.12 20-Mar-2002  christos handle new emulation sysctls, and cleanup function duplication.
 1.11 12-Mar-2000  tsarna Add a "-f file" flag to process directives from a file.
 1.10 17-Jan-2000  itojun don't install /usr/sbin/sysctl (backward compat symlink)
 1.9 17-Jan-2000  itojun move sysctl to /sbin/sysctl. symlink from /usr/sbin/sysctl
is supplied for backward compatibility.

add /sbin/sysctl to base/mi (does not remove /usr/sbin/sysctl
as we have a symlink)
 1.8 17-Jan-2000  itojun Moved from usr.sbin/sysctl/Makefile,v
 1.7 03-Jul-1999  itojun s/CFLAGS/CPPFLAGS/ for -D and -I.
 1.6 02-Jul-1999  itojun IPv6/IPsec sysctl MIB support.
 1.5 05-Mar-1998  christos WARNSify
 1.4 18-Oct-1997  lukem enable WARNS=1 by default, but disable in unclean 3rd party code
 1.3 30-Sep-1995  thorpej New-style RCS ids.
 1.2 22-Dec-1994  cgd specify man pages the new way.
 1.1 09-May-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 09-May-1994  cgd sysctl-of-fish
 1.17.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.17.28.1 08-Dec-2010  riz Pull up following revision(s) (requested by uwe in ticket #1490):
usr.bin/mkdep/Makefile: revision 1.16
sbin/dump_lfs/Makefile: revision 1.10
usr.sbin/services_mkdb/Makefile: revision 1.5
sbin/ifconfig/Makefile: revision 1.40
usr.sbin/racoonctl/Makefile: revision 1.3
sbin/sysctl/Makefile: revision 1.18
Comment out CFLAGS+=-g.
Disable debug.
 1.20.12.1 25-Feb-2013  tls resync with head
 1.20.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.21.32.1 19-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #95):

sbin/sysctl/prog_ops.h: revision 1.3
sbin/sysctl/sysctl_rumpops.c: revision 1.2
sbin/sysctl/sysctl_hostops.c: revision 1.2
sbin/sysctl/Makefile: revision 1.22
sbin/sysctl/sysctl.c: revision 1.162

sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.21.30.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.7 25-Mar-2004  atatat Move sysctlbyname(), sysctlnametomib(), and sysctlgetmibinfo() from
sysctl(8) into libc, making the minor number jump. Add prototypes to
sys/sysctl.h, fix sets, modify man pages, etc. That oughta cover it.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.5 14-Apr-2000  simonb Don't declare 'extern opt*' getopt variables.
 1.4 17-Jan-2000  itojun Moved from usr.sbin/sysctl/pathconf.c,v
 1.3 01-Nov-1997  lukem getopt returns -1 not EOF
 1.2 30-Sep-1995  thorpej New-style RCS ids.
 1.1 09-May-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 09-May-1994  cgd sysctl-of-fish
 1.3 18-Aug-2019  kamil sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.2 13-Dec-2010  pooka branches: 1.2.46; 1.2.48;
use crunchops for crunchables
 1.1 13-Dec-2010  pooka RUMP_ACTION -> RUMPPRG
 1.2.48.1 19-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #95):

sbin/sysctl/prog_ops.h: revision 1.3
sbin/sysctl/sysctl_rumpops.c: revision 1.2
sbin/sysctl/sysctl_hostops.c: revision 1.2
sbin/sysctl/Makefile: revision 1.22
sbin/sysctl/sysctl.c: revision 1.162

sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.2.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.162 03-Aug-2011  christos allow -q flag to work for reads.
 1.161 30-Sep-2009  elad Remove stale references to the "read only at securelevel [12]" flags in
the documentation and code comments.
 1.160 01-Apr-2009  christos Don't print an error with sysctl -w name?=value if name does not exist.
Should be pulled up to 5.0
 1.159 11-Nov-2008  reed branches: 1.159.2;
Reference secmodel_securelevel(9) manual page.
 1.158 02-May-2008  martin branches: 1.158.4;
Move TNF licenses to 2 clause form
 1.157 04-Dec-2006  pavel branches: 1.157.12; 1.157.14;
Move the description of sysctl MIBs from sysctl.3 to a new manual page
sysctl.7. Remove the list of MIBs from sysctl.8 so we don't have to
maintain duplicate information, as proposed by YAMAMOTO Takashi on
tech-userlevel. Also remove references to header files from sysctl.8.

The numeric constants remain documented, they are still needed in some
cases. See the discussion on tech-userlevel. ("mib list in sysctl.8")

OK by YAMAMOTO Takashi.
 1.156 25-Nov-2006  christos branches: 1.156.2;
PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory
 1.155 22-Nov-2006  elad Initial implementation of PaX Segvguard (this is still work-in-progress,
it's just to get it out of my local tree).
 1.154 26-Sep-2006  elad Change the PaX mprotect(2) restrictions' "global_protection" knob to
just "global" -- it's shorter and more readable. Update documentation.
 1.153 05-Sep-2006  rpaulo Import of TCP ECN algorithm for congestion control.
Both available for IPv4 and IPv6.
Basic implementation test results are available at
http://netbsd-soc.sourceforge.net/projects/ecn/testresults.html.

Work sponsored by the Google Summer of Code project 2006.
Special thanks to Kentaro Kurahone, Allen Briggs and Matt Thomas for their
help, comments and support during the project.
 1.152 04-Sep-2006  liamjfoy add net.inet.ip.maxflows. Bump date.
 1.151 08-Aug-2006  wiz Bump date for previous.
 1.150 08-Aug-2006  kardel document timecounter sysctls
 1.149 14-Jul-2006  elad branches: 1.149.2;
move security.setid_core.* to kern.coredump.setid.*, as requested by yamt@.
 1.148 14-Jul-2006  elad okay, since there was no way to divide this to two commits, here it goes..

introduce fileassoc(9), a kernel interface for associating meta-data with
files using in-kernel memory. this is very similar to what we had in
veriexec till now, only abstracted so it can be used more easily by more
consumers.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.
 1.147 29-May-2006  liamjfoy bump date (.Dd)
 1.146 29-May-2006  liamjfoy document Common Address Redundancy Protocol sysctls, aka CARP

ok joerg@
 1.145 16-May-2006  elad Introduce PaX MPROTECT -- mprotect(2) restrictions used to strengthen
W^X mappings.

Disabled by default.

First proposed in:

http://mail-index.netbsd.org/tech-security/2005/12/18/0000.html

More information in:

http://pax.grsecurity.net/docs/mprotect.txt

Read relevant parts of options(4) and sysctl(3) before using!

Lots of thanks to the PaX author and Matt Thomas.
 1.144 06-Mar-2006  christos add the 3 opencrypto sysctls.
 1.143 04-Feb-2006  wiz Bump date for security.*
 1.142 02-Feb-2006  elad - make use of the recently added mode_bits for security.setid_core.mode;
- document setid_core variables.
 1.141 14-Jan-2006  elad add some more to kern.
 1.140 14-Jan-2006  elad remove dup cnmagic.
 1.139 14-Jan-2006  elad Sync and sort ddb, hw, kern, vm.
 1.138 13-Jan-2006  elad oops - this should not have been commited. remove sugid_coredump line.
 1.137 13-Jan-2006  elad grrr... another space -> tab...
 1.136 13-Jan-2006  elad space -> tab
 1.135 13-Jan-2006  elad Sync net.{inet,inet6,key}
 1.134 21-Dec-2005  yamt add vm.inactivepct.
 1.133 13-Dec-2005  yamt add vm.idlezero. noted by Hubert Feyrer.
 1.132 27-Nov-2005  yamt bump date for the previous.
 1.131 27-Nov-2005  yamt add ddb.commandonenter.
 1.130 15-Oct-2005  xtraeme Mention "kern.bufq.strategies", bump date.
 1.129 06-Oct-2005  wiz Add missing comma.
 1.128 03-Oct-2005  elad Document security level for sysctl and security.curtain.

Hi Hubert! :)
 1.127 24-Sep-2005  rpaulo Document kern.hardclock_ticks. Pointed out by Hubert.
 1.126 23-Sep-2005  wiz Drop trailing whitespace.
 1.125 21-Sep-2005  xtraeme Mention vfs.sync.*, bump date.
 1.124 06-Sep-2005  rpaulo Handle net.inet.tcp.debug, net.inet.tcp.debx, net.ns.spp.debug and
net.ns.spp.debx. Bump man page date.
 1.123 04-Aug-2005  rpaulo Added net.bpf.peers and net.bpf.stats and bumped the date.
 1.122 24-May-2005  wiz Bump date for previous. <> -> \*[Lt]\*[Gt].
 1.121 24-May-2005  elad Add man-page bits about the 'count' node.
 1.120 20-May-2005  elad Remove common code for returning supported fingerprints. This is done now
via sysctl(8) using kern.veriexec.algorithms.

Also add an entry for the 'algorithms' variable in sysctl.8 forgotten in
the last commit.
 1.119 19-May-2005  elad Some changes in veriexec.

New features:

- Add a veriexec_report() routine to make most reporting consistent and
remove some common code.
- Add 'strict' mode that controls how veriexec behaves.
- Add sysctl knobs:
o kern.veriexec.verbose controls verbosity levels. Value: 0, 1.
o kern.veriexec.strict controls strict level. Values: 0, 1, 2. See
documentation in sysctl(3) for details.
o kern.veriexec.algorithms returns a string with a space separated
list of supported hashing algorithms in veriexec.
- Updated documentation in man pages for sysctl(3) and sysctl(8).

Bug fixes:

- veriexec_removechk(): Code cleanup + handle FINGERPRINT_NOTEVAL
correctly.
- exec_script(): Don't pass 0 as flag when executing a script; use the
defined VERIEXEC_INDIRECT - which is 1. Makes indirect execution
enforcement work.
- Fix some printing formats and types..
 1.118 26-Dec-2004  christos branches: 1.118.2;
PR/28782: OBATA Akio: Document that kern.rtc_offset is writable.
 1.117 21-Nov-2004  jdolecek add vfs.cd9660.utf8_joliet, and couple other vfs.* entries while here

bump date and add TNF copyright
 1.116 15-Oct-2004  daniel Add vm.bufcache, vm.bufmem, vm.bufmem_lowater, m.bufmem_hiwater (PR misc/27247, misc/27233).
 1.115 27-Aug-2004  wiz Bump date for removal of net.key.random_int.
 1.114 27-Aug-2004  itojun remove net.key.random_int
 1.113 28-Apr-2004  snj Bump date for last.
 1.112 28-Apr-2004  ragge Note net.inet.arp.* entries.
 1.111 24-Mar-2004  wiz branches: 1.111.2;
Remove duplicate and superfluous words.
 1.110 24-Mar-2004  snj Bump date for last.
 1.109 24-Mar-2004  atatat Bring sysctl man pages up to date (wrt new query interface, the
versioning, and descriptions).
 1.108 22-Jan-2004  wiz Bump date for previous.
 1.107 22-Jan-2004  jonathan Document net.bpf.maxbufsize in sysctl(8).
NB: bpf isn't a PF_, so where to list it in sysctl(3)?
 1.106 08-Jan-2004  atatat Used to say "type=", but now says "size=" since that's what it's
supposed to say.
 1.105 31-Dec-2003  wiz Simplify Oo/Oc to Op, since it has only one simple short argument.
 1.104 30-Dec-2003  atatat Update sysctl.8 man page to cover all the new stuff.
 1.103 15-Oct-2003  wiz Slight option ordering change.
 1.102 27-Sep-2003  dsl Forgot the date....
 1.101 27-Sep-2003  dsl Add kern.drivers and kern.root_partition to match recent kern_sysctl.c
Add kern.root_device which was absent.
 1.100 21-Sep-2003  wiz Combine multiple single-letter options.
 1.99 20-Sep-2003  grant add -e flag to set the separator to '=' where the default is ' = '.
this allows sysctl output to fed back into itself. inspired by
FreeBSD's sysctl(8).

ok'd by atatat.
 1.98 17-Sep-2003  grant put flags in a list with descriptions. add proper description of -w.
 1.97 07-Aug-2003  wiz Mention /etc/sysctl.conf. Bump date. Closes PR 22213.
 1.96 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.95 04-Jul-2003  wiz Bump date for last, and replace some \*[Lt]/\*[Gt] with .Aq.
 1.94 03-Jul-2003  ragge Add somaxkva.
 1.93 19-Apr-2003  christos add tcp.ident.
 1.92 12-Apr-2003  christos add checkinterface
 1.91 17-Mar-2003  wiz Consistent tab usage.
 1.90 15-Mar-2003  wiz Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
 1.89 06-Mar-2003  thorpej hw.physpages -> hw.physmem64, hw.userpages -> hw.usermem64
 1.88 01-Mar-2003  thorpej Document net.inet.tcp.init_win_local.
 1.87 27-Feb-2003  thorpej Document hw.physpages and hw.userpages.
 1.86 02-Feb-2003  kleink Add sysconf(3) knobs for recent additions.
 1.85 01-Feb-2003  kleink Add several missing items, and be less rageous about memory locking.
 1.84 11-Dec-2002  jdolecek Add kern.forkfsleep sysctl - set/get time (in miliseconds) for which
process would be forced to sleep in fork() if it hits either global
or user maxproc limit. Default is zero (no forced sleep).
Maximum is 20 seconds.
 1.83 11-Dec-2002  scw Add two sysctls: kern.labelsector and kern.labeloffset.
These are of use to userland code which previously depended on the
hard-coded values of LABELSECTOR and LABELOFFSET to figure out the
location of the disklabel for a particular platform.

With the introduction of umbrella ports such as evbarm, evbmips, etc,
the location of the disklabel may vary between kernels for the same
MACHINE. This sysctl will allow userland programs to remain independent
of the particular flavour of MACHINE in such cases.
 1.82 07-Nov-2002  manu Added two sysctl-able flags: proc.curproc.stopfork and proc.curproc.stopexec
that can be used to block a process after fork(2) or exec(2) calls. The
new process is created in the SSTOP state and is never scheduled for running.

This feature is designed so that it is esay to attach the process using gdb
before it has done anything.

It works also with sproc, kthread_create, clone...
 1.81 03-Oct-2002  wiz New sentence, new line. From Robert Elz.
 1.80 01-Oct-2002  wiz Replace some \*[Lt]...\*[Gt] with .Aq ...
 1.79 29-May-2002  msaitoh document vfs.nfs.iothreads
 1.78 28-May-2002  itojun document net.inet6.ip6.maxfrags
 1.77 19-May-2002  itojun branches: 1.77.2;
document net.key.* sysctl. provide sysctl MIB for controlling
proposal payload on ACQUIRE message. sync w/kame
 1.76 14-May-2002  itojun rename: net.inet6.ip6.bindv6only -> net.inet6.ip6.v6only
sync w/kame.
 1.75 24-Mar-2002  sommerfeld Add -q flag, for use with -w and -f, which suppresses output after a set.
 1.74 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.73 28-Jan-2002  simonb Document the new kern.tkstat.* sysctls.
 1.72 27-Jan-2002  simonb Prod from lukem - remember to add hw.disk* here too.
 1.71 24-Dec-2001  chs update for changed vm knobs.
 1.70 30-Oct-2001  wiz Sort sections, whitespace nits.
 1.69 30-Oct-2001  kml Added descriptions of the new sysctls for controlling the disposition
of IPv4 routes added via redirects, rediraccept and redirtimeout.
 1.68 20-Aug-2001  hubertf Remove duplicate listing of "net.inet.tcp.init_win" system variable as
reported in PR 13760 by Don Yuniskis <auryn@gci-net.com>
 1.67 16-Jun-2001  jdolecek Add port of high performance pipe implementation written by John S. Dyson
for FreeBSD project. Besides huge speed boost compared with socketpair-based
pipes, this implementation also uses pagable kernel memory instead of mbufs.

Significant differences to FreeBSD version:
* uses uvm_loan() facility for direct write
* async/SIGIO handling correct also for sync writer, async reader
* limits settable via sysctl, amountpipekva and nbigpipes available via sysctl
* pipes are unidirectional - this is enforced on file descriptor level
for now only, the code would be updated to take advantage of it
eventually
* uses lockmgr(9)-based locks instead of home brew variant
* scatter-gather write is handled correctly for direct write case, data
is transferred by PIPE_DIRECT_CHUNK bytes maximum, to avoid running out of kva

All FreeBSD/NetBSD specific code is within appropriate #ifdef, in preparation
to feed changes back to FreeBSD tree.

This pipe implementation is optional for now, add 'options NEW_PIPE'
to your kernel config to use it.
 1.66 27-Mar-2001  itojun net.inet.ip.maxfragpackets defines the maximum size of ip reass queue
(prevents fragment flood from chewing up mbuf memory space).
derived from KAME net.inet6.ip6.maxfragpackets.
 1.65 09-Mar-2001  chs add UBC memory-usage balancing. we track the number of pages in use for
each of the basic types (anonymous data, executable image, cached files)
and prevent the pagedaemon from reusing a given page if that would reduce
the count of that type of page below a sysctl-setable minimum threshold.
the thresholds are controlled via three new sysctl tunables:
vm.anonmin, vm.vnodemin, and vm.vtextmin. these tunables are the
percentages of pageable memory reserved for each usage, and we do not allow
the sum of the minimums to be more than 95% so that there's always some
memory that can be reused.
 1.64 07-Feb-2001  itojun during ip6/icmp6 inbound packet processing, do not call log() nor printf() in
normal operation (/var can get filled up by flodding bogus packets).
sysctl net.inet6.icmp6.nd6_debug will turn on diagnostic messages.
(#define ND6_DEBUG will turn it on by default)

improve stats in ND6 code.

lots of synchronziation with kame (including comments and cometic ones).
 1.63 26-Jan-2001  hubertf Document that there's currently no registry for vendor sysctls.
After discussion with John Hawkinson and Frank van der Linden.
 1.62 10-Jan-2001  hubertf * Document the vendor.* sysctl branch
* in sysctl.3, sort the list of CTL_ prefixes and sync with sysctl.h
 1.61 21-Dec-2000  itojun document net.inet6.icmp6.mtudisc_{lo,hi}wat.
 1.60 08-Nov-2000  eeh Document new hw.cnmagic sysctl(8) variable.
 1.59 26-Oct-2000  jdolecek add couple of missing entries, update kern.maxptys entry - it is not raise only
 1.58 15-Oct-2000  bjh21 Ah, so _that_'s how you get a backslash in a macro argument.
Thanks to itojun for pointing it out.
 1.57 15-Oct-2000  bjh21 Various formatting cleanups (mostly to use .Ql).
Note that getting a single backslash inside Ql seems to need SIXTEEN
of them in the source!
 1.56 26-Sep-2000  jdolecek fix typo (remplaced --> replaced)
 1.55 09-Sep-2000  jdolecek document kern.maxptys/KERN_MAXPTYS
note that kern.maxvnodes is raise only
 1.54 26-Aug-2000  itojun implement net.inet6.ip6.{anon,low}port{min,max} sysctl variable.
 1.53 26-Aug-2000  itojun document net.inet.ip.lowport{min,max}
 1.52 28-Jul-2000  itojun nuke net.inet*.ip*.*ratelimit.
 1.51 27-Jul-2000  itojun add net.inet.tcp.rstppslimit
 1.50 10-Jul-2000  itojun document sysctl variable "net.inet.icmp.errppslimit".
 1.49 09-Jul-2000  itojun add description for net.inet6.icmp6.{errppslimit,nd6_maxnudhint}
 1.48 27-Jun-2000  mrg <vm/vm_param.h> is now <uvm/uvm_param.h>
 1.47 23-May-2000  itojun branches: 1.47.4;
correct FILES section. mention IPv6/IPsec headers.
 1.46 08-Apr-2000  soren Update usage with -f.
 1.45 12-Mar-2000  tsarna Add a "-f file" flag to process directives from a file.
 1.44 27-Feb-2000  itojun add hw.alignbytes sysctl mib. this gives you the value of ALIGNBYTES
at the kernel compilation time (ALIGNBYTES that the kernel uses).
 1.43 26-Feb-2000  itojun remove net.inet6.ip6.nd6_proxyall sysctl.
support "ndp -s <ip6> <mac> proxy" for proxy NDP.
 1.42 17-Feb-2000  fvdl List vfs.generic.usermount in manpage. Don't try to handle machdep.diskinfo
for the i386, thus avoiding a warning message in 'sysctl -a'.
 1.41 15-Feb-2000  thorpej Note net.inet.icmp.errratelimit and net.inet.tcp.rstratelimit.
 1.40 09-Feb-2000  jdolecek Add reference to the include file with TCP sysctl constants. Fixes bin/9378.
 1.39 06-Feb-2000  fair Document KERN_LOGSIGEXIT.
sort sysctl variable list in sysctl.8
 1.38 17-Jan-2000  itojun Moved from usr.sbin/sysctl/sysctl.8,v
 1.37 06-Jan-2000  itojun make IPV6_BINDV6ONLY setsockopt available. it controls behavior of
AF_INET6 wildcard listening socket. heavily documented in ip6(4).
net.inet6.ip6.bindv6only defines default value. default is 1.

"options INET6_BINDV6ONLY" removes any code fragment that supports
IPV6_BINDV6ONLY == 0 case (not defopt'ed as use of this is rare).
 1.36 06-Jan-2000  itojun add missing variables under net.inet6.ip6.
 1.35 02-Jan-2000  itojun add net.inet6.icmp6.nodeinfo sysctl.
this allows you to disable/enable ICMPv6 node information query/reply
processing (which tells remote end the gethostname(3) setting, interface
addresses on the node, and some other things - documented in
draft-ietf-ipngwg-icmp-name-lookup* or something alike).

to test it, try ping6 -w ::1 with nodeinfo=0 and nodeinfo=1.
(sync with kame change)
 1.34 17-Dec-1999  garbled Fix some minor typos and word usage nits.
 1.33 18-Nov-1999  kristerw Typos (from OpenBSD)
 1.32 14-Oct-1999  jdolecek document ddb.fromconsole & DBCTL_FROMCONSOLE, description taken from options(4)
 1.31 28-Sep-1999  bouyer Add handling of the proc hierarchy. Document it, as well as kern.defcorename.
 1.30 02-Jul-1999  itojun branches: 1.30.2;
IPv6/IPsec sysctl MIB support.
 1.29 23-May-1999  ad Add new sysctl (net.inet.tcp.log_refused) that when set, causes refused TCP
connections to be logged.
 1.28 26-Apr-1999  thorpej Add support for kern.mbuf.*
 1.27 28-Mar-1999  kleink Forgot to add these a while ago.
 1.26 10-Sep-1998  mouse Create tcp.keepidle, tcp.keepintvl, tcp.keepcnt, tcp.slowhz sysctls.
 1.25 28-Jun-1998  nathanw Document shortcorename support and control.
 1.24 24-May-1998  kleink Permit checking the availability of the POSIX File Synchronization Option
(a/k/a fsync(2)), System V style message queues, semaphores and shared memory
at runtime by adding a sysctl variable for each.
 1.23 02-May-1998  thorpej Note net.inet.tcp.ack_on_push.
 1.22 30-Apr-1998  thorpej Note the existence of net.inet.ip.mtudisctimeout.
 1.21 30-Apr-1998  thorpej Note the presence of net.inet.tcp.: mssdflt, sack, win_scale, timestamps,
compat_42, cwm, cwm_burstsize.
 1.20 13-Apr-1998  kml Fix to ensure that the correct MSS is advertised for loopback
TCP connections by using the MTU of the interface. Also added
a knob, mss_ifmtu, to force all connections to use the MTU of
the interface to calculate the advertised MSS.
 1.19 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.18 05-Jan-1998  lukem document net.inet.ip.anonport{min,max}
 1.17 11-Dec-1997  thorpej Mention net.inet.tcp.init_win.
 1.16 11-Dec-1997  thorpej Fix a paste-o.
 1.15 18-Oct-1997  kml branches: 1.15.2;
change sysctl net.inet.icmp.mtudisc to net.inet.ip.mtudisc
 1.14 17-Oct-1997  thorpej Note net.inet.ip.subnetsarelocal.
 1.13 19-Sep-1997  leo Commit userland part of pr-1891.
 1.12 28-Jul-1997  thorpej Document new UDP and TCP tunables.
 1.11 06-Jun-1997  veego Update the manpage for hw.machine_arch.
 1.10 29-May-1997  cgd Fix broken uses of Dd. Both the mdoc and mdoc.samples pages agree:
.Dd is supposed to be invoked like:
.Dd month day, year
e.g. ".Dd January 25, 1989", rather than:
.Dd "month day, year"
which is what these pages did.
 1.9 23-Apr-1997  cjs added net.inet.ip.allowsrcrt
 1.8 09-Jan-1997  thorpej Grok and document CTL_DDB.
 1.7 17-Jul-1996  explorer Document the new autonice sysctls
 1.6 16-Jan-1996  thorpej Add a net.inet.ip.directed-broadcast sysctl as suggested by
Darren Reed <darrenr@vitruvius.arbld.unimelb.edu.au> in PR #1227.
This change is slightly different than the one submitted by Darren in
that the DIRECTED_BROADCAST compile-time option will behave like it used
to so that existing configurations utilizing it won't have to change.
 1.5 15-Jan-1996  thorpej Add net.inet.ip.forwsrcrt: if zero, the system will not forward
source-routed packets. Note this value is protected by kernel security
level; it can only be changed if securelevel < 1.
 1.4 30-Sep-1995  thorpej New-style RCS ids.
 1.3 30-Sep-1995  thorpej Add support for the net.inet.tcp sysctl group and document. From
John Kohl <jtk@kolvir.blrc.ma.us>.
 1.2 04-Aug-1995  thorpej Mention the `kern.maxpartitions' and `kern.rawpartition' variables.
 1.1 09-May-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.1 09-May-1994  cgd sysctl-of-fish
 1.15.2.1 11-Dec-1997  thorpej Pull up from trunk: fix paste-o.
 1.30.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.47.4.9 15-Mar-2003  he Pull up revision 1.79 (via patch, requested by msaitoh in ticket #18):
Document vfs.nfs.iothreads.
 1.47.4.8 07-Jun-2001  he Apply patch (requested by he):
Typo correction; add a plural ``s'' to ``maxfragpacket''.
 1.47.4.7 24-Apr-2001  he Pull up revision 1.66 (requested by itojun):
Introduce net.inet.ip.maxfragpackets, which controls the maximum
number of IPv4 fragment reassembly queue entries. Defends against
certain DoS attacks.
 1.47.4.6 26-Feb-2001  he Um, undo one more commit done in error.
 1.47.4.5 26-Feb-2001  he Pull up revisions 1.62-1.63 (requested by hubertf):
Document the vendor.* sysctl branch, and note that we currently
have no registry for these sysctl values.
 1.47.4.4 26-Sep-2000  jdolecek pullup rev. 1.56 (approved by thorpej):
fix typo (remplaced --> replaced)
 1.47.4.3 27-Aug-2000  itojun pullup (approved by releng-1-5)

> implement net.inet6.ip6.{anon,low}port{min,max} sysctl variable.

> cvs rdiff -r1.67 -r1.68 basesrc/lib/libc/gen/sysctl.3
> cvs rdiff -r1.53 -r1.54 basesrc/sbin/sysctl/sysctl.8
> cvs rdiff -r1.18 -r1.19 syssrc/sys/netinet6/in6.h
> cvs rdiff -r1.29 -r1.30 syssrc/sys/netinet6/in6_pcb.c
> cvs rdiff -r1.3 -r1.4 syssrc/sys/netinet6/in6_src.c
> cvs rdiff -r1.25 -r1.26 syssrc/sys/netinet6/ip6_input.c
> cvs rdiff -r1.14 -r1.15 syssrc/sys/netinet6/ip6_var.h
 1.47.4.2 27-Aug-2000  itojun pullup (approved by releng-1-5)
> document net.inet.ip.lowport{min,max}
> cvs rdiff -r1.66 -r1.67 basesrc/lib/libc/gen/sysctl.3
> cvs rdiff -r1.52 -r1.53 basesrc/sbin/sysctl/sysctl.8
 1.47.4.1 16-Aug-2000  itojun pullup (approved by releng-1-5)

document *ppslimit.

sbin/sysctl/sysctl.8 1.48 -> 1.52
lib/libc/gen/sysctl.3 1.60 -> 1.63, 1.64 -> 1.65
 1.77.2.1 30-May-2002  tv Pull up revision 1.79 (requested by msaitoh in ticket #81):
document vfs.nfs.iothreads
 1.111.2.2 04-Jun-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11330):
sys/netinet6/ip6_input.c: revision 1.102 via patch
sys/netinet6/route6.c: revision 1.18 via patch
sys/netinet6/ip6_var.h: revisions 1.41-1.42 via patch
sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
 1.111.2.1 12-Nov-2004  jmc branches: 1.111.2.1.2;
Pullup rev 1.116 (requested by daniel in ticket #926)

Add vm.bufcache, vm.bufmem, vm.bufmem_lowater, m.bufmem_hiwater
 1.111.2.1.2.2 04-Jun-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11330):
sys/netinet6/ip6_input.c: revision 1.102 via patch
sys/netinet6/route6.c: revision 1.18 via patch
sys/netinet6/ip6_var.h: revisions 1.41-1.42 via patch
sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
 1.111.2.1.2.1 18-Jun-2005  riz branches: 1.111.2.1.2.1.2;
Pull up revision 1.118 (requested by peter in ticket #1998):
PR/28782: OBATA Akio: Document that kern.rtc_offset is writable.
 1.111.2.1.2.1.2.1 04-Jun-2007  bouyer Pull up following revision(s) (requested by adrianp in ticket #11330):
sys/netinet6/ip6_input.c: revision 1.102 via patch
sys/netinet6/route6.c: revision 1.18 via patch
sys/netinet6/ip6_var.h: revisions 1.41-1.42 via patch
sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
 1.118.2.5 26-Apr-2007  ghen Pull up following revision(s) (requested by christos in ticket #1766):
sys/netinet6/ip6_input.c: revision 1.102 via patch
sys/netinet6/route6.c: revision 1.18 via patch
sys/netinet6/ip6_var.h: revision 1.41 via patch
sys/netinet6/ip6_var.h: revision 1.42 via patch
sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
fix typo.
 1.118.2.4 10-Jun-2005  tron branches: 1.118.2.4.2; 1.118.2.4.4;
Pull up revision 1.122 (requested by elad in ticket #389):
Bump date for previous. <> -> *[Lt]*[Gt].
 1.118.2.3 10-Jun-2005  tron Pull up revision 1.121 (requested by elad in ticket #389):
Add man-page bits about the 'count' node.
 1.118.2.2 10-Jun-2005  tron Pull up revision 1.120 (requested by elad in ticket #389):
Remove common code for returning supported fingerprints. This is done now
via sysctl(8) using kern.veriexec.algorithms.
Also add an entry for the 'algorithms' variable in sysctl.8 forgotten in
the last commit.
 1.118.2.1 10-Jun-2005  tron Pull up revision 1.119 (requested by elad in ticket #389):
Some changes in veriexec.
New features:
- Add a veriexec_report() routine to make most reporting consistent and
remove some common code.
- Add 'strict' mode that controls how veriexec behaves.
- Add sysctl knobs:
o kern.veriexec.verbose controls verbosity levels. Value: 0, 1.
o kern.veriexec.strict controls strict level. Values: 0, 1, 2. See
documentation in sysctl(3) for details.
o kern.veriexec.algorithms returns a string with a space separated
list of supported hashing algorithms in veriexec.
- Updated documentation in man pages for sysctl(3) and sysctl(8).
Bug fixes:
- veriexec_removechk(): Code cleanup + handle FINGERPRINT_NOTEVAL
correctly.
- exec_script(): Don't pass 0 as flag when executing a script; use the
defined VERIEXEC_INDIRECT - which is 1. Makes indirect execution
enforcement work.
- Fix some printing formats and types..
 1.118.2.4.4.1 26-Apr-2007  ghen Pull up following revision(s) (requested by christos in ticket #1766):
sys/netinet6/ip6_input.c: revision 1.102 via patch
sys/netinet6/route6.c: revision 1.18 via patch
sys/netinet6/ip6_var.h: revision 1.41 via patch
sys/netinet6/ip6_var.h: revision 1.42 via patch
sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
fix typo.
 1.118.2.4.2.1 26-Apr-2007  ghen Pull up following revision(s) (requested by christos in ticket #1766):
sys/netinet6/ip6_input.c: revision 1.102 via patch
sys/netinet6/route6.c: revision 1.18 via patch
sys/netinet6/ip6_var.h: revision 1.41 via patch
sys/netinet6/ip6_var.h: revision 1.42 via patch
sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
fix typo.
 1.149.2.2 08-Sep-2006  rpaulo Pull up following revision(s) (requested by liamjfoy in ticket #127):
lib/libc/gen/sysctl.3: revision 1.181
sbin/sysctl/sysctl.8: revision 1.152
add net.inet.ip.maxflows. Bump date.
document net.inet.ip.maxflows. dump date.
 1.149.2.1 12-Aug-2006  riz Pull up following revision(s) (requested by kardel in ticket #14):
sbin/sysctl/sysctl.8: revision 1.150 - 1.151
document timecounter sysctls
Bump date for previous.
 1.156.2.1 28-Apr-2007  bouyer Pull up following revision(s) (requested by christos in ticket #587):
sys/netinet6/ip6_input.c: revision 1.102
sys/netinet6/route6.c: revision 1.18
sys/netinet6/ip6_var.h: revision 1.41
sys/netinet6/ip6_var.h: revision 1.42
sbin/sysctl/sysctl.8: patch
Disable processing of routing header type 0 packets since they can be used
of DoS attacks. Provide a sysctl to re-enable them (net.inet6.ip6.rht0).
Information from:
http://www.secdev.org/conf/IPv6_RH_security-csw07.pdf
fix typo.
 1.157.14.1 18-May-2008  yamt sync with head.
 1.157.12.2 17-Jan-2009  mjf Sync with HEAD.
 1.157.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.158.4.2 01-Apr-2009  snj Pull up following revision(s) (requested by christos in ticket #635):
sbin/sysctl/sysctl.8: revision 1.160
sbin/sysctl/sysctl.c: revision 1.129
Don't print an error with sysctl -w name?=value if name does not exist.
Should be pulled up to 5.0
 1.158.4.1 12-Nov-2008  snj Pull up following revision(s) (requested by reed in ticket #46):
sbin/sysctl/sysctl.8: revision 1.159
lib/libc/gen/sysctl.3: revision 1.195
Reference secmodel_securelevel(9) manual page.
 1.159.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.165 02-Apr-2023  ryo commonize case block
 1.164 02-Apr-2023  ryo don't pass add=1 to print_tree() when displaying by specifying nodes.

For example, "sysctl -w kern.mbuf=" had been displayed extra node names in the MIB.
# sysctl -w kern.mbuf=
kern.mbuf.mbuf.msize = 512
kern.mbuf.mbuf.mclbytes = 2048
:
 1.163 28-Dec-2021  christos kern.hashstat takes too long and it is meaningless here.
 1.162 18-Aug-2019  kamil sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.161 30-Oct-2018  kre branches: 1.161.2;
kern.boottime was changed from a struct timeval to a struct timespec
in January 2009 (the Christos' time merge, when time_t went to 64 bits).

sysctl needs to catch up. (So do other progs, which will happen, eventually,
but most of them are unaffected in any practical way.)

If you are running a system (NetBSD 6 or later) without this change, try
sysctl -nn kern.boottime
and marvel at the result (in theory, seconds.microseconds) most
probably being something like:
jinx$ sysctl -nn kern.boottime
1540801874.999995564
(There is a 1 in 1000 chance your system will have booted
in the interval [0 , 999999] nanoseconds after some second,
in which case this will not be observed. You should get
(almost) the same value after this change - just now it is as
it should be (there should now always be 9 digits after the '.').

On the other hand, if you're on a big-endian 64 bit host (running
64 bit sysctl) you would have always seen 0 for the microseconds field.
That should be fixed by this.

In sysctl(7) also document what we mean by "the time the system booted".

XXX Pullup -8
XXX Pullup -7
XXX Pullup -6 (oops, missed that one...)
 1.160 04-Feb-2018  mrg branches: 1.160.2; 1.160.4;
updates for GCC 6.4:

identd has aliasing violations, use -fno-strict-aliasing.

newfs_msdos's getbpbinfo() has missing {} issues.

sysctl's kern_cp_id() has missing {} issues.
 1.159 13-Apr-2017  christos say ipsec stats are viewable with netstat.
 1.158 31-Jul-2016  dholland branches: 1.158.2;
Apply patch from PR 43587, mostly from martin and kre. When writing a
sysctl variable using ?= fails with EPERM, don't print an error
message.

Ideally setting a sysctl to the same value it already has should also
not fail regardless of permissions, but this would need to be done in
the kernel.
 1.157 13-Dec-2015  christos branches: 1.157.2;
mention ip6addrctl
 1.156 17-Aug-2015  knakahara Add intrctl(8).
 1.155 09-Nov-2014  christos remove debugging
 1.154 09-Nov-2014  christos add handler for /kern/evcnt and print the actual error when failing.
 1.153 16-May-2014  martin Get rid of all sysc_init_field uses - initialize fields directly in C99
notation.
 1.152 16-May-2014  martin Do not loop over children if a node is not marked as CTLTYPE_NODE.
 1.151 10-Jan-2014  christos branches: 1.151.2;
use __func__, EXIT_{SUCCESS,FAILURE}
 1.150 10-Jan-2014  pooka give err() some reason to avoid:
sysctl.c:2713:5: error: zero-length gnu_printf format string [-Werror=format-zero-length]
 1.149 13-Dec-2012  msaitoh Add missing free() in error path.
 1.148 07-Dec-2012  christos use __BITMAP_TYPE
 1.147 05-Dec-2012  christos fix bug found by clang.
 1.146 01-Dec-2012  christos switch from fd_set to bitmap macros, by popular demand.
 1.145 29-Nov-2012  christos put back line I accidentally deleted.
 1.144 29-Nov-2012  christos add a handler for the reserved port sysctl variable.
 1.143 02-Jun-2012  dsl branches: 1.143.2;
Add support for unsigned decimal values.
 1.142 15-Mar-2012  joerg Add __printflike attribution to use vprintf and friends with an argument
as format string.
 1.141 11-Mar-2012  christos PR/44961: Jukka Ruohonen: for sysctl's with built-in handlers, return OPNOTSUPP
if we don't have handlers instead of using the handler we have and silently
failing on attempts to write a node that cannot be written.
 1.140 12-Feb-2012  christos branches: 1.140.2;
Only print errors when -A or required. Fix the error message to match others.
 1.139 04-Jan-2012  drochner include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland
where possible, for consistency and compatibility to FreeBSD
(exception: KAME specific statistics gathering in netstat(1) and systat(1))
 1.138 29-Aug-2011  joerg branches: 1.138.2;
Use __dead
 1.137 24-Aug-2011  christos Instead of using strncat and re-scanning the strings all the time, use and
append printf function.
 1.136 03-Aug-2011  christos no -A or -a with -q
 1.135 03-Aug-2011  christos allow -q flag to work for reads.
 1.134 16-Apr-2011  christos PR/44864: Paul Ripke: Compile regular expressions on demand and only once.
 1.133 13-Dec-2010  pooka RUMP_ACTION -> RUMPPRG
 1.132 05-Nov-2010  pooka make sysctl(8) work as a rump client
 1.131 11-Apr-2010  mrg implement CTLTYPE_BOOL support. it was entirely missing. HI MATT!
 1.130 30-Sep-2009  elad Remove stale references to the "read only at securelevel [12]" flags in
the documentation and code comments.
 1.129 01-Apr-2009  christos Don't print an error with sysctl -w name?=value if name does not exist.
Should be pulled up to 5.0
 1.128 20-Mar-2009  lukem fix sign-compare issues
 1.127 18-Mar-2009  pgoyette Format the address/offset of hexdump in hex, not decimal.

Addresses my PR bin/41035
 1.126 05-Mar-2009  njoly Add missing free() in machdep_diskinfo().
 1.125 28-Dec-2008  christos branches: 1.125.2;
fix dev_t format.
 1.124 20-Jul-2008  lukem branches: 1.124.2;
Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
 1.123 29-Apr-2008  martin branches: 1.123.2;
Convert to new 2 clause license
 1.122 21-Dec-2006  elad branches: 1.122.12; 1.122.14;
PR/35304: C J Coleman: Off-by-one nul byte overwrite in mode_bits routine
of sbin/sysctl
 1.121 18-Dec-2006  christos Exit with non-zero on errors.
 1.120 02-Nov-2006  christos branches: 1.120.2;
PR/34965: Nicolas Joly: sysctl(1) small memory leak
 1.119 01-Nov-2006  christos prefix name in kern.drivers
 1.118 15-Oct-2006  christos support printing kern.drivers
 1.117 30-Jul-2006  elad CTLFLAG_READONLY1 and CTLFLAG_READONLY2 were deprecated in earlier commit, remove them here too
 1.116 14-Jul-2006  elad move security.setid_core.* to kern.coredump.setid.*, as requested by yamt@.
 1.115 30-Mar-2006  jnemeth Coverity CID 2784: Add more checks for value==NULL.
 1.114 26-Mar-2006  christos Coverity CID 2763: Add more checks for value==NULL.
 1.113 26-Mar-2006  christos Coverity CID 2764: Avoid null reference
 1.112 22-Mar-2006  christos Coverity CID 786: Avoid NULL dereference.
 1.111 08-Feb-2006  christos detect integer overflow differently. previous change broke negative sysctl
values.
 1.110 05-Feb-2006  christos PR/17441: John F. Woods: integer sysctl does not accept numbers > 0x7fffffff
Use unsigned int in the range comparison, and use strerror() instead of
home brewed error strings.
 1.109 02-Feb-2006  elad - make use of the recently added mode_bits for security.setid_core.mode;
- document setid_core variables.
 1.108 02-Feb-2006  elad add support for parsing file mode bits.

when printed, you'll see something like "0600 (rw-------)", like the
ls output. when reading input you can either specify octal mode (0600)
or chmod-like (u=rw).

ideas from atatat@ and kjk@; okay and lots of help from atatat@.
 1.107 06-Sep-2005  rpaulo Handle net.inet.tcp.debug, net.inet.tcp.debx, net.ns.spp.debug and
net.ns.spp.debx. Bump man page date.
 1.106 28-Aug-2005  rpaulo net.inet?.*.stats are viewable with netstat(1).
 1.105 04-Aug-2005  rpaulo Inform the user that net.bpf.stats and net.bpf.peers are viewable with
netstat(1).
 1.104 27-Jun-2005  christos Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
 1.103 16-Jun-2005  christos Add code to handle cp_id. From atatat.
 1.102 06-Apr-2005  christos PPR/29909: Manuel Bouyer: sysctl dumps core if kern.consdev returns unknown
device. If we cannot determine the device name of the console, print the
console dev_t in hex.
 1.101 28-Mar-2005  christos make sysctl -n print the real console tty name and -nn print the numeric
value.
XXX: -n means don't print name, not numeric. We should stop overloading
it and use a different flag.
 1.100 23-Mar-2005  atatat If a "create" or "destroy" operation succeeds, mark the cached tree as
"stale" so that the next time we try to read or write to it, we can
purge (and refresh) it.

Addresses PR 29222.
 1.99 19-Mar-2005  atatat Fix possible segmentation fault when retrieving descriptions. Thought
I committed this a while ago. I guess the fact that no one filed a pr
meant no one else found it. :)
 1.98 18-Mar-2005  atatat Use regexes instead of static lists of annoying numbers to recognize
sysctl nodes that have "helpers". This is more concise, imho more
easy to understand, and has the added bonus of making it *possible* to
assign helpers to dynamically numbered nodes.
 1.97 15-Mar-2005  atatat branches: 1.97.2;
Make requestors of kern.file2 be referred to pstat (the same as
kern.file) and add EINVAL to the list of errno values which are
silently ignored when walking the tree.
 1.96 17-Dec-2004  atatat Pass dynamic buffer pointer to display_string(), not static buffer
pointer. Causes...misfunction if the kernel says the buffer needs to
be too much larger.
 1.95 17-Oct-2004  jdolecek constify handlers[]
 1.94 25-Apr-2004  atatat When converting a string to a number, also make sure that you didn't
convert an empty string to a zero.

Follow on to PR bin/25115 in private email.
 1.93 23-Apr-2004  atatat Allocate adjusted size, not fixed size.
 1.92 22-Apr-2004  atatat Some lint cleaning, strip leading (and sometimes trailing) whitespace
from values to be assigned when processing a file. Clean up error
reporting (print the name of the file and the line number), and tidy
some numeric conversions. Continue after most "errors" when
processing a -f argument.

Addresses PR bin/25115.
 1.91 14-Apr-2004  atatat If the node was specifically requested but has no description, print
the "no description" message instead of skipping (as happens when
recursing into a subtree). This does not apply to non-node-type
nodes.
 1.90 08-Apr-2004  atatat Don't copy the size that sysctl gave back directly, copy the size of
the description. *thwap*
 1.89 08-Apr-2004  atatat Don't copy the size that sysctl gave back directly, copy the size of
the description.
 1.88 08-Apr-2004  atatat Do nothing else for nodes with no children if -d is used (dflag is
set). Otherwise, some nodes (those with "printers") will also print
the "use foo ..." message.
 1.87 06-Apr-2004  atatat Add -d flag to usage message(s).
 1.86 26-Mar-2004  he branches: 1.86.2;
Make this too gcc2-compileable.
 1.85 25-Mar-2004  atatat Move sysctlbyname(), sysctlnametomib(), and sysctlgetmibinfo() from
sysctl(8) into libc, making the minor number jump. Add prototypes to
sys/sysctl.h, fix sets, modify man pages, etc. That oughta cover it.
 1.84 24-Mar-2004  atatat Implement sysctl descriptions. Now all that remains is actually to
write them.
 1.83 24-Mar-2004  atatat Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.82 20-Mar-2004  atatat A little syntactic sugar
 1.81 20-Feb-2004  atatat Make this:

% sysctl -A kern.cp_time

(and also "sysctl -A" without the kern.cp_time argument) print this:

kern.cp_time: user = 851648, nice = 683496, sys = 69383, ...
kern.cp_time.0: user = 85648, nice = 68496, sys = 6983, ...
...

instead of just:

kern.cp_time.0: user = 85648, nice = 68496, sys = 6983, ...
...
 1.80 19-Feb-2004  atatat More better display of kern.cp_time for MP machines. Now we use one
sysctl() call to query for each of three different display modes:

(1) sum across all cpus

% sysctl kern.cp_time
kern.cp_time: user = 93240, nice = 1507, sys = 17252, ...

(2) data for just cpu 0

% sysctl kern.cp_time.0
kern.cp_time.0: user = 93282, nice = 1507, sys = 17264, ...

(3) each cpu individually up to hw.ncpu

% sysctl -A kern.cp_time
kern.cp_time.0: user = 93349, nice = 1507, sys = 17280, ...
kern.cp_time.1: user = 93403, nice = 1507, sys = 17291, ...
...
 1.79 19-Feb-2004  atatat Miscellaneous display bugfixes.
 1.78 19-Feb-2004  atatat Rename sysctlnametomib() to sysctlgetmibinfo() and add FreeBSD
compatible sysctlnametomib() and sysctlbyname() functions.

These are intended to move to libc real soon now.
 1.77 05-Jan-2004  jmmv Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
 1.76 04-Dec-2003  atatat sysctlnametomib() is a private function for the moment.
 1.75 04-Dec-2003  atatat New sysctl(8) binary. Performs auto-discovery and can add/remove
nodes from the tree. Never needs to be recompiled again.
 1.74 10-Nov-2003  jonathan Make per-protocol network input queue stats visible to userland via
sysctl. Add a protocol-independent sysctl handler to show the per-protocol
"struct ifq' statistics. Add IP(v4) specific call to the handler.
Other protocols can show their per-protocol input statistics by
allocating a sysclt node and calling sysctl_ifq() with their own struct ifq *.

As posted to tech-kern plus improvements/cleanup suggested by Andrew Brown.
 1.73 21-Sep-2003  wiz Combine multiple single-letter options.
 1.72 20-Sep-2003  grant add -e flag to set the separator to '=' where the default is ' = '.
this allows sysctl output to fed back into itself. inspired by
FreeBSD's sysctl(8).

ok'd by atatat.
 1.71 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.70 17-Jun-2003  simonb Remove the KERN_DRIVERS case handler (prototype code?).
 1.69 16-Jun-2003  dsl Print hw.cnmagic as escaped hex bytes (unless -n given).
Change 'special' to be a numeral not a bit, it isn't ever used as a bit
and I can't see why it should ever be used that way.
 1.68 31-May-2003  thorpej Avoid a strict-alias warning in gcc 3.3.
 1.67 18-May-2003  itojun simplify more
 1.66 18-May-2003  itojun simplify by strlcpy/cat
 1.65 06-Apr-2003  lukem Tweak behaviour introduced in rev 1.50;
* by default, warning messages go to stderr
* if -A or -a is used, send warning messages to stdout instead.

The behaviour in 1.50 meant that
somevar=`sysctl -n machdep.booted_kernel 2>/dev/null`
could end up with $somevar="machdep.booted_kernel: the value is not available"
rather than the more useful $somevar="".

(This way, "sysctl -A | grep ..." is still useful.)
 1.64 07-Mar-2003  fvdl Quell formwat warning for LP64 for the diskinfo printf.
 1.63 22-Jan-2003  dsl display machdep.diskinfo for i386 and x86_84
(agreed by christos)
 1.62 24-Dec-2002  manu On Darwin, mach_init is the system bootstrap process. It is responsible
for forking the traditional UNIX init(8) and it does the Mach port naming
service. We need mach_init for the naming service, but unfortunately, it
will only act as such if its PID is 1. We introduce a sysctl
(emul.darwin.init_pid) to fool a given process into thinking its PID is 1.
That way we can get mach_init into behaving as the name server.

Typical use:
/sbin/sysctl -w emul.darwin.init_pid=$$ ; exec /emul/darwin/sbin/mach_init
 1.61 30-Nov-2002  lukem tweaks for fparseln(3) move from libutil to libc:
- remove #include <util.h> if nothing else needed it
- remove LDFLAGS+=-lutil if nothing else needed it
 1.60 09-Nov-2002  manu Added sysctl to change all IRIX kernel values reported by uname and systeminfo:
OS name, hw name, kernel version, and so forth.
 1.59 03-Nov-2002  simonb When printing out nodes of type "string", don't print anything if
sysctl() reports that 0 bytes were returned.

Reported by Matt Green with "sysctl hw.disknames" on a system with no
disks.
 1.58 24-Mar-2002  sommerfeld branches: 1.58.2;
Add -q flag, for use with -w and -f, which suppresses output after a set.
 1.57 20-Mar-2002  christos remove debugging line.
 1.56 20-Mar-2002  christos handle new emulation sysctls, and cleanup function duplication.
 1.55 31-Jan-2002  christos fix inconsistencies with USEAPP; centralize the flags check so that we
don't have to deal with it in the future.
 1.54 28-Jan-2002  simonb Descend into kern.tkstat.
 1.53 28-Jan-2002  simonb ANSIfy.
 1.52 27-Jan-2002  simonb Fix a tyop in a comment.
 1.51 27-Jan-2002  simonb Teach sysctl(8) that hw.diskstats is a structure.
 1.50 24-Dec-2001  lukem change a lot of the "error" messages to display to stdout instead of
stderr, so that "sysctl -A" output is actually usable. requested by perry
 1.49 27-Jul-2001  itojun show net.inet6.tcp6.* as mirror image of net.inet.tcp. better for future
INET-less kernels.
 1.48 02-Jul-2001  jdolecek pipe sysctl stuff is now in <sys/pipe.h>
 1.47 16-Jun-2001  jdolecek Add port of high performance pipe implementation written by John S. Dyson
for FreeBSD project. Besides huge speed boost compared with socketpair-based
pipes, this implementation also uses pagable kernel memory instead of mbufs.

Significant differences to FreeBSD version:
* uses uvm_loan() facility for direct write
* async/SIGIO handling correct also for sync writer, async reader
* limits settable via sysctl, amountpipekva and nbigpipes available via sysctl
* pipes are unidirectional - this is enforced on file descriptor level
for now only, the code would be updated to take advantage of it
eventually
* uses lockmgr(9)-based locks instead of home brew variant
* scatter-gather write is handled correctly for direct write case, data
is transferred by PIPE_DIRECT_CHUNK bytes maximum, to avoid running out of kva

All FreeBSD/NetBSD specific code is within appropriate #ifdef, in preparation
to feed changes back to FreeBSD tree.

This pipe implementation is optional for now, add 'options NEW_PIPE'
to your kernel config to use it.
 1.46 09-Mar-2001  chs add UBC memory-usage balancing. we track the number of pages in use for
each of the basic types (anonymous data, executable image, cached files)
and prevent the pagedaemon from reusing a given page if that would reduce
the count of that type of page below a sysctl-setable minimum threshold.
the thresholds are controlled via three new sysctl tunables:
vm.anonmin, vm.vnodemin, and vm.vtextmin. these tunables are the
percentages of pageable memory reserved for each usage, and we do not allow
the sum of the minimums to be more than 95% so that there's always some
memory that can be reused.
 1.45 19-Feb-2001  cgd convert to use getprogname()
 1.44 04-Feb-2001  christos fix nested extern.
 1.43 09-Jan-2001  fvdl Number of toplevel names grew by one, account for it.
 1.42 05-Jan-2001  lukem use %ll_ instead of the less standard %q_
 1.41 19-Jul-2000  enami Free storage allocated by fparseln.
 1.40 15-Jul-2000  simonb Handle KERN_MSGBUF and KERN_CONSDEV gracefully.
 1.39 15-Jul-2000  itojun sync with sys/sysctl.h change (is it the right way to workaround this?)
 1.38 26-Jun-2000  mrg we now need <uvm/uvm_param.h>
 1.37 07-Jun-2000  itojun branches: 1.37.2;
s/PIMCTL/PIM6CTL/ to avoid future confusion.
 1.36 29-May-2000  matt LP64 format problems. u_int64_t on alpha != %llu
 1.35 29-May-2000  simonb cp_time[] is an array of u_int64_t's now.
 1.34 27-May-2000  simonb branches: 1.34.2;
Handle kern.proc_args as well.
 1.33 27-May-2000  simonb s/fprintf(stdout/printf(/
 1.32 27-May-2000  simonb Deal with new structure returning sysctl()s.
 1.31 21-Apr-2000  simonb Fix minor annoyance - when showing the boottime, the ctime() result
already has a trailing newline, so don't add an extra one.
 1.30 14-Apr-2000  simonb Don't declare 'extern opt*' getopt variables.
 1.29 08-Apr-2000  soren Update usage with -f.
 1.28 12-Mar-2000  tsarna Fix warning.
 1.27 12-Mar-2000  tsarna Add a "-f file" flag to process directives from a file.
 1.26 17-Feb-2000  fvdl List vfs.generic.usermount in manpage. Don't try to handle machdep.diskinfo
for the i386, thus avoiding a warning message in 'sysctl -a'.
 1.25 12-Feb-2000  thorpej Support vm.nkmempages.
 1.24 06-Feb-2000  itojun fix include file path.
 1.23 17-Jan-2000  itojun Moved from usr.sbin/sysctl/sysctl.c,v
 1.22 28-Sep-1999  bouyer Add handling of the proc hierarchy. Document it, as well as kern.defcorename.
 1.21 30-Jul-1999  itojun branches: 1.21.2;
do not include sys/netinet6/in6_systm.h, this has been empty.
 1.20 02-Jul-1999  itojun IPv6/IPsec sysctl MIB support.
 1.19 26-Apr-1999  thorpej Add support for kern.mbuf.*
 1.18 13-Nov-1998  thorpej Direct the user to use nfsstat to print nfs statistics.
 1.17 13-Nov-1998  thorpej Implement support for the vfs. toplevel.
 1.16 11-Mar-1998  thorpej Fix typos lossage on the Alpha.
 1.15 05-Mar-1998  tron Include unistd.h to import declaration of getopt(3)
 1.14 05-Mar-1998  christos WARNSify
 1.13 01-Mar-1998  fvdl Merge with Lite2 + local changes
 1.12 06-Feb-1998  jonathan Tell user to use xnptdc to view kern.ntptime, as a workaround until
sysctl and libntp agree about "progname".
Based on a patch suggested by Soren S. Jorvang <soren@t.dk> in PR bin/4433.
 1.11 01-Nov-1997  lukem getopt returns -1 not EOF
 1.10 09-Jan-1997  thorpej Grok and document CTL_DDB.
 1.9 30-Sep-1995  thorpej New-style RCS ids.
 1.8 30-Sep-1995  thorpej Add support for the net.inet.tcp sysctl group and document. From
John Kohl <jtk@kolvir.blrc.ma.us>.
 1.7 07-Jun-1995  cgd typeof(timeval.tv_sec) != time_t
 1.6 02-Jun-1995  pk Correct argument in error msg. (PR #1087)
 1.5 23-Dec-1994  cgd be safe with types
 1.4 18-Sep-1994  mycroft Print tickadj.
 1.3 13-May-1994  cgd re-enable net sysctl code
 1.2 09-May-1994  cgd punt networking goo for now
 1.1 09-May-1994  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 01-Mar-1998  fvdl Import 4.4BSD-Lite2
 1.1.1.1 09-May-1994  cgd sysctl-of-fish
 1.21.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.34.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.37.2.4 10-Nov-2002  itojun sbin/sysctl/sysctl.c 1.59

When printing out nodes of type "string", don't print anything if
sysctl() reports that 0 bytes were returned. Reported by Matt Green.

(simonb)
 1.37.2.3 22-Jul-2000  simonb Pull up rev 1.40:
Handle KERN_MSGBUF and KERN_CONSDEV gracefully.
 1.37.2.2 22-Jul-2000  enami Pullup revision 1.41 (requested by thorpej):
Free storage allocated by fparseln.
 1.37.2.1 15-Jul-2000  itojun pullup 1.38 -> 1.39 (requested by releng-1-5)
sync with sys/sysctl.h change (constify)
 1.58.2.1 15-Nov-2002  lukem Pull up revision 1.59 (requested by simon in ticket #958):
When printing out nodes of type "string", don't print anything if
sysctl() reports that 0 bytes were returned.
Reported by Matt Green with "sysctl hw.disknames" on a system with no
disks.
--
 1.86.2.10 28-Apr-2004  jmc branches: 1.86.2.10.2;
Pullup rev 1.94 (requested by atatat in ticket #192)

When converting a string to a number, also make sure that you didn't
convert an empty string to a zero. PR#25115
 1.86.2.9 26-Apr-2004  jdc Pull up revision 1.93 (requested by atatat in ticket #181)

Allocate adjusted size, not fixed size.
 1.86.2.8 22-Apr-2004  tron Pull up revision 1.92 (requested by atatat in ticket #174):
Some lint cleaning, strip leading (and sometimes trailing) whitespace
from values to be assigned when processing a file. Clean up error
reporting (print the name of the file and the line number), and tidy
some numeric conversions. Continue after most "errors" when
processing a -f argument.
Addresses PR bin/25115.
 1.86.2.7 16-Apr-2004  tron Pull up revision 1.91 (requested by atatat in ticket #136):
If the node was specifically requested but has no description, print
the "no description" message instead of skipping (as happens when
recursing into a subtree). This does not apply to non-node-type
nodes.
 1.86.2.6 08-Apr-2004  jdc Pull up revision 1.90 (requested by atatat in ticket #94)

Don't copy the size that sysctl gave back directly, copy the size of
the description. *thwap*
 1.86.2.5 08-Apr-2004  jdc Pull up revision 1.89 (requested by atatat in ticket #92)

Don't copy the size that sysctl gave back directly, copy the size of
the description.
 1.86.2.4 08-Apr-2004  jdc Backout previous. It contained the changes for both
tickets #92 and #94 (instead of just #92).
 1.86.2.3 08-Apr-2004  jdc Pull up revision 1.89 (requested by atatat in ticket #92)

Don't copy the size that sysctl gave back directly, copy the size of
the description.
 1.86.2.2 08-Apr-2004  jdc Pull up revision 1.88 (requested by atatat in ticket #88)

Do nothing else for nodes with no children if -d is used (dflag is
set). Otherwise, some nodes (those with "printers") will also print
the "use foo ..." message.
 1.86.2.1 07-Apr-2004  jmc Pullup rev 1.87 (requested by atatat in ticket #81)

Add -d flag to usage message(s).
 1.86.2.10.2.1 06-Apr-2005  he Pull up revision 1.96 (requested by atatat in ticket #1048):
Pass dynamic buffer pointer to display_string(), not static
buffer pointer. This fixes a problem if the kernel says the
buffer needs to be too much larger.
 1.97.2.3 23-Mar-2005  tron Pull up revision 1.100 (requested by atatat in ticket #52):
If a "create" or "destroy" operation succeeds, mark the cached tree as
"stale" so that the next time we try to read or write to it, we can
purge (and refresh) it.
Addresses PR 29222.
 1.97.2.2 20-Mar-2005  tron Pull up revision 1.99 (requested by atatat in ticket #36):
Fix possible segmentation fault when retrieving descriptions. Thought
I committed this a while ago. I guess the fact that no one filed a pr
meant no one else found it. :)
 1.97.2.1 19-Mar-2005  tron Pull up revision 1.98 (requested by atatat in ticket #11):
Use regexes instead of static lists of annoying numbers to recognize
sysctl nodes that have "helpers". This is more concise, imho more
easy to understand, and has the added bonus of making it *possible* to
assign helpers to dynamically numbered nodes.
 1.120.2.1 30-Dec-2006  riz Pull up following revision(s) (requested by elad in ticket #298):
sbin/sysctl/sysctl.c: revision 1.122
PR/35304: C J Coleman: Off-by-one nul byte overwrite in mode_bits routine
of sbin/sysctl
 1.122.14.1 18-May-2008  yamt sync with head.
 1.122.12.3 17-Jan-2009  mjf Sync with HEAD.
 1.122.12.2 28-Sep-2008  mjf Sync with HEAD.
 1.122.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.123.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.124.2.2 13-Jan-2013  bouyer Pull up following revision(s) (requested by msaitoh in ticket #1832):
sbin/sysctl/sysctl.c: revision 1.149 via patch
Add missing free() in error path.
 1.124.2.1 01-Apr-2009  snj Pull up following revision(s) (requested by christos in ticket #635):
sbin/sysctl/sysctl.8: revision 1.160
sbin/sysctl/sysctl.c: revision 1.129
Don't print an error with sysctl -w name?=value if name does not exist.
Should be pulled up to 5.0
 1.125.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.138.2.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.138.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.138.2.2 30-Oct-2012  yamt sync with head
 1.138.2.1 17-Apr-2012  yamt sync with head
 1.140.2.1 25-Dec-2012  snj Pull up following revision(s) (requested by msaitoh in ticket #757):
sbin/sysctl/sysctl.c: revision 1.149
Add missing free() in error path.
 1.143.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.143.2.1 25-Feb-2013  tls resync with head
 1.151.2.1 10-Aug-2014  tls Rebase.
 1.157.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.157.2.1 06-Aug-2016  pgoyette Sync with HEAD
 1.158.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.160.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.160.4.1 10-Jun-2019  christos Sync with HEAD
 1.160.2.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.161.2.1 19-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #95):

sbin/sysctl/prog_ops.h: revision 1.3
sbin/sysctl/sysctl_rumpops.c: revision 1.2
sbin/sysctl/sysctl_hostops.c: revision 1.2
sbin/sysctl/Makefile: revision 1.22
sbin/sysctl/sysctl.c: revision 1.162

sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.2 18-Aug-2019  kamil sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.1 13-Dec-2010  pooka branches: 1.1.46; 1.1.48;
RUMP_ACTION -> RUMPPRG
 1.1.48.1 19-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #95):

sbin/sysctl/prog_ops.h: revision 1.3
sbin/sysctl/sysctl_rumpops.c: revision 1.2
sbin/sysctl/sysctl_hostops.c: revision 1.2
sbin/sysctl/Makefile: revision 1.22
sbin/sysctl/sysctl.c: revision 1.162

sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.1.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2 18-Aug-2019  kamil sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.1 13-Dec-2010  pooka branches: 1.1.46; 1.1.48;
RUMP_ACTION -> RUMPPRG
 1.1.48.1 19-Aug-2019  martin Pull up following revision(s) (requested by kamil in ticket #95):

sbin/sysctl/prog_ops.h: revision 1.3
sbin/sysctl/sysctl_rumpops.c: revision 1.2
sbin/sysctl/sysctl_hostops.c: revision 1.2
sbin/sysctl/Makefile: revision 1.22
sbin/sysctl/sysctl.c: revision 1.162

sysctl: Add indirection of symbols to remove clash with sanitizers

Add indirection and symbol renaming under MKSANITIZER for the linked in
version of sysctlbyname and sysctlgetmibinfo.
 1.1.46.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10 25-Mar-2004  atatat Move sysctlbyname(), sysctlnametomib(), and sysctlgetmibinfo() from
sysctl(8) into libc, making the minor number jump. Add prototypes to
sys/sysctl.h, fix sets, modify man pages, etc. That oughta cover it.
 1.9 24-Mar-2004  atatat Remove #define of __USE_NEW_SYSCTL. I'm not even sure I remember what
I used it for, but we certainly don't need it now.
 1.8 24-Mar-2004  atatat This file should have a copyright notice on it.
 1.7 24-Mar-2004  atatat New node version and layout. This should take care of the netbsd32
emulation problem, formalizes the versioning (should it ever be needed
again), and provides a slot for descriptions.
 1.6 24-Mar-2004  atatat The new sysctl query interface returns the same information as the old
one, but you must pass in an empty node that indicates the version
you're using.
 1.5 24-Mar-2004  atatat Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
 1.4 19-Feb-2004  atatat Rename sysctlnametomib() to sysctlgetmibinfo() and add FreeBSD
compatible sysctlnametomib() and sysctlbyname() functions.

These are intended to move to libc real soon now.
 1.3 19-Feb-2004  atatat Avoid using things that don't smell like they're the right size (the
size should be a multiple of sizeof(struct sysctlnode)), and avoid
leaking memory in the case of things that don't have children.
 1.2 04-Dec-2003  atatat sysctlnametomib() is a private function for the moment.
 1.1 04-Dec-2003  atatat New sysctl(8) binary. Performs auto-discovery and can add/remove
nodes from the tree. Never needs to be recompiled again.

RSS XML Feed