sysctl.h (12623) | sysctl.h (12705) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Mike Karels at Berkeley Software Design, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)sysctl.h 8.1 (Berkeley) 6/2/93 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Mike Karels at Berkeley Software Design, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)sysctl.h 8.1 (Berkeley) 6/2/93 |
37 * $Id: sysctl.h,v 1.36 1995/12/02 20:40:20 phk Exp $ | 37 * $Id: sysctl.h,v 1.37 1995/12/04 16:48:52 phk Exp $ |
38 */ 39 40#ifndef _SYS_SYSCTL_H_ 41#define _SYS_SYSCTL_H_ 42 43/* 44 * Definitions for sysctl call. The sysctl call uses a hierarchical name 45 * for objects that can be examined or modified. The name is expressed as --- 93 unchanged lines hidden (view full) --- 139 arg, len, sysctl_handle_string, "A", descr); 140 141/* This is a integer, if ptr is NULL, val is returned */ 142#define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ 143 SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \ 144 ptr, val, sysctl_handle_int, "I", descr); 145 146/* This is anything, specified by a pointer and a lenth */ | 38 */ 39 40#ifndef _SYS_SYSCTL_H_ 41#define _SYS_SYSCTL_H_ 42 43/* 44 * Definitions for sysctl call. The sysctl call uses a hierarchical name 45 * for objects that can be examined or modified. The name is expressed as --- 93 unchanged lines hidden (view full) --- 139 arg, len, sysctl_handle_string, "A", descr); 140 141/* This is a integer, if ptr is NULL, val is returned */ 142#define SYSCTL_INT(parent, nbr, name, access, ptr, val, descr) \ 143 SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|access, \ 144 ptr, val, sysctl_handle_int, "I", descr); 145 146/* This is anything, specified by a pointer and a lenth */ |
147#define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, descr) \ | 147#define SYSCTL_OPAQUE(parent, nbr, name, access, ptr, len, fmt, descr) \ |
148 SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|access, \ | 148 SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|access, \ |
149 ptr, len, sysctl_handle_opaque, "O", descr); | 149 ptr, len, sysctl_handle_opaque, fmt, descr); |
150 151/* This is a struct, specified by a pointer and type */ 152#define SYSCTL_STRUCT(parent, nbr, name, access, ptr, type, descr) \ 153 SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|access, \ 154 ptr, sizeof(struct type), sysctl_handle_opaque, \ 155 "S," #type, descr); 156 157/* Needs a proc. Specify by pointer and arg */ --- 227 unchanged lines hidden --- | 150 151/* This is a struct, specified by a pointer and type */ 152#define SYSCTL_STRUCT(parent, nbr, name, access, ptr, type, descr) \ 153 SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|access, \ 154 ptr, sizeof(struct type), sysctl_handle_opaque, \ 155 "S," #type, descr); 156 157/* Needs a proc. Specify by pointer and arg */ --- 227 unchanged lines hidden --- |