# kern_sysctl.h File Reference

`#include <sys/sysproto.h>`
`#include <sys/thread.h>`

Include dependency graph for kern_sysctl.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

struct | sysctl_entry

## Defines

#define | CTL_DEBUG 5
#define | CTL_HW 6
#define | CTL_KERN 1
#define | CTL_KERN_OPENFILES 1
#define | CTL_MACHDEP 7
#define | CTL_MAXNAME 24
#define | CTL_NET 4
#define | CTL_P1003_1B 9
#define | CTL_UBIX 10
#define | CTL_UNSPEC 0
#define | CTL_USER 8
#define | CTL_VFS 3
#define | CTL_VM 2
#define | EINVAL -1

## Functions

int | kern_sysctl (int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen, size_t *retval, int flags)
int | sysctl_add (int *, int, char *, void *, int)
int | sysctl_init ()

## Variables

bool | sysctl_enabled

## Define Documentation

#define CTL_DEBUG 5

Definition at line 46 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_HW 6

Definition at line 47 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_KERN 1

Definition at line 42 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_KERN_OPENFILES 1

Definition at line 53 of file kern_sysctl.h.

#define CTL_MACHDEP 7

Definition at line 48 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_MAXNAME 24

Definition at line 36 of file kern_sysctl.h.

Referenced by def_ctls().

#define CTL_NET 4

Definition at line 45 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_P1003_1B 9

Definition at line 50 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_UBIX 10

Definition at line 51 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_UNSPEC 0

Definition at line 41 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_USER 8

Definition at line 49 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_VFS 3

Definition at line 44 of file kern_sysctl.h.

Referenced by sysctl_init().

#define CTL_VM 2

Definition at line 43 of file kern_sysctl.h.

Referenced by sysctl_init().

#define EINVAL -1

Definition at line 55 of file kern_sysctl.h.

## Function Documentation

int kern_sysctl | ( | int * | name,
|  | u_int | namelen,
|  | void * | old,
|  | size_t * | oldlenp,
|  | void * | new,
|  | size_t | newlen,
|  | size_t * | retval,
|  | int | flags |
| ) |  |  |

int sysctl_add | ( | int * | ,
|  | int | ,
|  | char * | ,
|  | void * | ,
|  | int |  |
| ) |  |  |

Definition at line 205 of file kern_sysctl.c.

References sysctl_entry::children, sysctl_entry::id, kmalloc(), kprintf(), memcpy(), sysctl_entry::name, sysctl_entry::next, sysctl_entry::prev, sprintf(), sysctl_find(), sysctl_entry::val_len, and sysctl_entry::value.

Referenced by def_ctls().

Here is the call graph for this function:

int sysctl_init | ( |  | ) |

Definition at line 65 of file kern_sysctl.c.

References sysctl_entry::children, CTL_DEBUG, CTL_HW, CTL_KERN, CTL_MACHDEP, CTL_NET, CTL_P1003_1B, CTL_UBIX, CTL_UNSPEC, CTL_USER, CTL_VFS, CTL_VM, ctls, def_ctls(), sysctl_entry::id, kmalloc(), kprintf(), sysctl_entry::name, sysctl_entry::next, sysctl_entry::prev, and sprintf().

Here is the call graph for this function:

## Variable Documentation

bool sysctl_enabled