1 /* $NetBSD: init_sysctl.c,v 1.166 2009/09/11 18:14:58 apb Exp $ */
4 * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Brown, and by Andrew Doran.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #include <sys/cdefs.h>
33 __KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.166 2009/09/11 18:14:58 apb Exp $");
35 #include <sys/param.h>
36 #include <sys/sysctl.h>
39 * sets up the base nodes...
41 SYSCTL_SETUP(sysctl_root_setup
, "sysctl base setup")
44 sysctl_createv(clog
, 0, NULL
, NULL
,
47 SYSCTL_DESCR("High kernel"),
50 sysctl_createv(clog
, 0, NULL
, NULL
,
53 SYSCTL_DESCR("Virtual memory"),
56 sysctl_createv(clog
, 0, NULL
, NULL
,
59 SYSCTL_DESCR("Filesystem"),
62 sysctl_createv(clog
, 0, NULL
, NULL
,
65 SYSCTL_DESCR("Networking"),
68 sysctl_createv(clog
, 0, NULL
, NULL
,
70 CTLTYPE_NODE
, "debug",
71 SYSCTL_DESCR("Debugging"),
74 sysctl_createv(clog
, 0, NULL
, NULL
,
77 SYSCTL_DESCR("Generic CPU, I/O"),
80 sysctl_createv(clog
, 0, NULL
, NULL
,
82 CTLTYPE_NODE
, "machdep",
83 SYSCTL_DESCR("Machine dependent"),
85 CTL_MACHDEP
, CTL_EOL
);
87 * this node is inserted so that the sysctl nodes in libc can
90 sysctl_createv(clog
, 0, NULL
, NULL
,
93 SYSCTL_DESCR("User-level"),
96 sysctl_createv(clog
, 0, NULL
, NULL
,
99 SYSCTL_DESCR("In-kernel debugger"),
102 sysctl_createv(clog
, 0, NULL
, NULL
,
104 CTLTYPE_NODE
, "proc",
105 SYSCTL_DESCR("Per-process"),
108 sysctl_createv(clog
, 0, NULL
, NULL
,
109 CTLFLAG_PERMANENT
|CTLFLAG_READWRITE
,
110 CTLTYPE_NODE
, "vendor",
111 SYSCTL_DESCR("Vendor specific"),
113 CTL_VENDOR
, CTL_EOL
);
114 sysctl_createv(clog
, 0, NULL
, NULL
,
116 CTLTYPE_NODE
, "emul",
117 SYSCTL_DESCR("Emulation settings"),
120 sysctl_createv(clog
, 0, NULL
, NULL
,
122 CTLTYPE_NODE
, "security",
123 SYSCTL_DESCR("Security"),
125 CTL_SECURITY
, CTL_EOL
);