Subject: Re: where are docs for adding a new sysctl?
To: Jeremy C. Reed <reed@reedmedia.net>
From: Quentin Garnier <cube@cubidou.net>
List: current-users
Date: 02/19/2005 11:09:55
--iK/wEI4vkfDmI6Zw
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Feb 18, 2005 at 04:36:03PM -0800, Jeremy C. Reed wrote:
> On Sat, 19 Feb 2005, Martin Husemann wrote:
>=20
> > On Fri, Feb 18, 2005 at 03:51:56PM -0800, Jeremy C. Reed wrote:
> > > Where are the docs for adding a new sysctl using the new dynamic sysc=
tl?
> >
> > man 9 sysctl
>=20
> I was looking for step-by-step docs that say: add ... to sys/sys/sysctl.h,
> create (or modify) ...., rebuild your kernel, rebuild sbin/sysctl, reboot,
> etc.

That's 1.6 stuff.  No need for that any more.

I should also point out that if you expected to recompile everything and
its mother to add a sysctl node, it wouldn't have qualified as dynamic :)

> I see in source mention of "vendor", but don't see any examples of adding
> a vendor sysctl. sysctl(9)

Again, 1.6 stuff.

> I also see code examples of SYSCTL_NODE() and SYSCTL_INT() macros but
> don't see documented. (In fact, I don't even find it defined.)

I'm not even sure it has ever been NetBSD stuff.  Are you sure you're not
reading FreeBSD documentation?

> As I figure this out, I will documented it (unless someone points me to
> existing howto).

NetBSD 2.0 manual pages are documented enough.  sysctl(9) for the kernel
part, sysctl(3) and sysctl(8) for the userland.  And there are plenty of
examples in the source tree (look for SYSCTL_SETUP).

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"When I find the controls, I'll go where I like, I'll know where I want
to be, but maybe for now I'll stay right here on a silent sea."
KT Tunstall, Silent Sea, Eye to the Telescope, 2004.

--iK/wEI4vkfDmI6Zw
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQEVAwUBQhcQc9goQloHrPnoAQKkqgf/ReLmmmgm3lvr1j6aWodJqaPHbWmX9TPv
a8bAPjIt+Qq6aNA6J6MeJ8kGZKSDZRwdUhdRUPMMc9tWFkliBmjFL/xoLreK6Ymd
ii/5wehAVXLKbnovQEF/JhSLCSAJPO4VP4Zg4VM5SsDJAlejdp4gOfPqpG0UWSZj
uDK4XxIfcdYbxgXFYg+f5i/iBS/cN7la7HhiT1+lpmcRJbn99PpFRdyi0AO2gw/I
sMvg0Qv6a5olvbpDNOjtdKaLDuQ8Uv7aubkwMiCRdOLlyYB1p0vQeItJ5un19rlG
Ykoh4sqVlySs9OyPs5TZSCoUOKWmXre26zx5mKjFsAklP6qG0bJYag==
=e+xs
-----END PGP SIGNATURE-----

--iK/wEI4vkfDmI6Zw--