Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/sysctl.h
Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
#define CTLTYPE_S8 0xc /* name describes a signed 8-bit number */ | #define CTLTYPE_S8 0xc /* name describes a signed 8-bit number */ | ||||
#define CTLTYPE_S16 0xd /* name describes a signed 16-bit number */ | #define CTLTYPE_S16 0xd /* name describes a signed 16-bit number */ | ||||
#define CTLTYPE_S32 0xe /* name describes a signed 32-bit number */ | #define CTLTYPE_S32 0xe /* name describes a signed 32-bit number */ | ||||
#define CTLTYPE_U32 0xf /* name describes an unsigned 32-bit number */ | #define CTLTYPE_U32 0xf /* name describes an unsigned 32-bit number */ | ||||
#define CTLFLAG_RD 0x80000000 /* Allow reads of variable */ | #define CTLFLAG_RD 0x80000000 /* Allow reads of variable */ | ||||
#define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */ | #define CTLFLAG_WR 0x40000000 /* Allow writes to the variable */ | ||||
#define CTLFLAG_RW (CTLFLAG_RD|CTLFLAG_WR) | #define CTLFLAG_RW (CTLFLAG_RD|CTLFLAG_WR) | ||||
#define CTLFLAG_DORMANT 0x20000000 /* This sysctl is not active yet */ | |||||
#define CTLFLAG_ANYBODY 0x10000000 /* All users can set this var */ | #define CTLFLAG_ANYBODY 0x10000000 /* All users can set this var */ | ||||
#define CTLFLAG_SECURE 0x08000000 /* Permit set only if securelevel<=0 */ | #define CTLFLAG_SECURE 0x08000000 /* Permit set only if securelevel<=0 */ | ||||
#define CTLFLAG_PRISON 0x04000000 /* Prisoned roots can fiddle */ | #define CTLFLAG_PRISON 0x04000000 /* Prisoned roots can fiddle */ | ||||
#define CTLFLAG_DYN 0x02000000 /* Dynamic oid - can be freed */ | #define CTLFLAG_DYN 0x02000000 /* Dynamic oid - can be freed */ | ||||
#define CTLFLAG_SKIP 0x01000000 /* Skip this sysctl when listing */ | #define CTLFLAG_SKIP 0x01000000 /* Skip this sysctl when listing */ | ||||
#define CTLMASK_SECURE 0x00F00000 /* Secure level */ | #define CTLMASK_SECURE 0x00F00000 /* Secure level */ | ||||
#define CTLFLAG_TUN 0x00080000 /* Default value is loaded from getenv() */ | #define CTLFLAG_TUN 0x00080000 /* Default value is loaded from getenv() */ | ||||
#define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) | #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) | ||||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | |||||
int sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS); | int sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS); | ||||
int sysctl_dpcpu_long(SYSCTL_HANDLER_ARGS); | int sysctl_dpcpu_long(SYSCTL_HANDLER_ARGS); | ||||
int sysctl_dpcpu_quad(SYSCTL_HANDLER_ARGS); | int sysctl_dpcpu_quad(SYSCTL_HANDLER_ARGS); | ||||
/* | /* | ||||
* These functions are used to add/remove an oid from the mib. | * These functions are used to add/remove an oid from the mib. | ||||
*/ | */ | ||||
void sysctl_register_oid(struct sysctl_oid *oidp); | void sysctl_register_oid(struct sysctl_oid *oidp); | ||||
void sysctl_register_disabled_oid(struct sysctl_oid *oidp); | |||||
void sysctl_enable_oid(struct sysctl_oid *oidp); | |||||
void sysctl_unregister_oid(struct sysctl_oid *oidp); | void sysctl_unregister_oid(struct sysctl_oid *oidp); | ||||
/* Declare a static oid to allow child oids to be added to it. */ | /* Declare a static oid to allow child oids to be added to it. */ | ||||
#define SYSCTL_DECL(name) \ | #define SYSCTL_DECL(name) \ | ||||
extern struct sysctl_oid sysctl__##name | extern struct sysctl_oid sysctl__##name | ||||
/* Hide these in macros. */ | /* Hide these in macros. */ | ||||
#define SYSCTL_CHILDREN(oid_ptr) (&(oid_ptr)->oid_children) | #define SYSCTL_CHILDREN(oid_ptr) (&(oid_ptr)->oid_children) | ||||
▲ Show 20 Lines • Show All 835 Lines • Show Last 20 Lines |