History log of /src/sbin/sysctl/
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
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.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7 tls-maxphys-base
1.21 29-Nov-2012 christos

branches: 1.21.30; 1.21.32;
use the proper variable


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
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


Revision tags: matt-premerge-20091211 jym-xensuspend-nbase jym-xensuspend-base
1.18 13-Feb-2009 uebayasi

Comment out CFLAGS+=-g.


Revision tags: netbsd-5-1-5-RELEASE netbsd-5-1-4-RELEASE netbsd-5-1-3-RELEASE netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base mjf-devfs2-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base mjf-devfs-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-4-base
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.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
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.


Revision tags: fvdl_fs64_base
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


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
1.12 20-Mar-2002 christos

handle new emulation sysctls, and cleanup function duplication.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
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


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base mjf-devfs2-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base mjf-devfs-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE wrstuden-fixsa-base abandoned-netbsd-4-base netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-4-base netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
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.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 fvdl_fs64_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
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


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
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.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
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


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
1.162 03-Aug-2011 christos

allow -q flag to work for reads.


Revision tags: cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-premerge-20091211
1.161 30-Sep-2009 elad

Remove stale references to the "read only at securelevel [12]" flags in
the documentation and code comments.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
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


Revision tags: mjf-devfs2-base
1.159 11-Nov-2008 reed

branches: 1.159.2;
Reference secmodel_securelevel(9) manual page.


Revision tags: netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
1.158 02-May-2008 martin

branches: 1.158.4;
Move TNF licenses to 2 clause form


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking cube-autoconf-base mjf-devfs-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
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.


Revision tags: netbsd-4-base
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


Revision tags: abandoned-netbsd-4-base
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..


Revision tags: netbsd-3-base
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.


Revision tags: netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
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.


Revision tags: fvdl_fs64_base
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


Revision tags: netbsd-1-6-base
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>


Revision tags: netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
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


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
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
:


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
1.163 28-Dec-2021 christos

kern.hashstat takes too long and it is meaningless here.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
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.


Revision tags: netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
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...)


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
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.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
1.159 13-Apr-2017 christos

say ipsec stats are viewable with netstat.


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806
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.


Revision tags: pgoyette-localcount-20160726 pgoyette-localcount-base
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.


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base tls-earlyentropy-base tls-maxphys-base
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.


Revision tags: yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
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]


Revision tags: riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base agc-symver-base yamt-pagecache-base8 yamt-pagecache-base7
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.


Revision tags: yamt-pagecache-base6
1.143 02-Jun-2012 dsl

branches: 1.143.2;
Add support for unsigned decimal values.


Revision tags: yamt-pagecache-base5 yamt-pagecache-base4
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.


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-0-5-RELEASE netbsd-6-0-4-RELEASE netbsd-6-0-3-RELEASE netbsd-6-0-2-RELEASE netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 netbsd-6-base
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))


Revision tags: yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base
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.


Revision tags: cherry-xenmp-base
1.134 16-Apr-2011 christos

PR/44864: Paul Ripke: Compile regular expressions on demand and only once.


Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
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!


Revision tags: matt-premerge-20091211
1.130 30-Sep-2009 elad

Remove stale references to the "read only at securelevel [12]" flags in
the documentation and code comments.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
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().


Revision tags: mjf-devfs2-base
1.125 28-Dec-2008 christos

branches: 1.125.2;
fix dev_t format.


Revision tags: netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2
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.)


Revision tags: wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
1.123 29-Apr-2008 martin

branches: 1.123.2;
Convert to new 2 clause license


Revision tags: yamt-pf42-baseX yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking cube-autoconf-base mjf-devfs-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
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.


Revision tags: netbsd-4-base
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


Revision tags: abandoned-netbsd-4-base
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.


Revision tags: netbsd-3-base
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).


Revision tags: netbsd-2-0-base
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)


Revision tags: fvdl_fs64_base
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.


Revision tags: netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
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>


Revision tags: netbsd-1-5-base
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.


Revision tags: minoura-xpg4dl-base
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


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
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.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.1 13-Dec-2010 pooka

branches: 1.1.46; 1.1.48;
RUMP_ACTION -> RUMPPRG


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 phil-wifi-20191119
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.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-7-base yamt-pagecache-base9 yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 tls-maxphys-base matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
1.1 13-Dec-2010 pooka

branches: 1.1.46; 1.1.48;
RUMP_ACTION -> RUMPPRG


Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base phil-wifi-20200421 phil-wifi-20200411 phil-wifi-20200406 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE yamt-pagecache-base9 yamt-pagecache-tag8 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE agc-symver-base tls-maxphys-base yamt-pagecache-base8 yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 yamt-pagecache-base6 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base bouyer-quota2-nbase bouyer-quota2-base matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 yamt-pf42-base mjf-devfs2-base keiichi-mipv6-base cube-autoconf-base mjf-devfs-base hpcarm-cleanup-base
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.