| 1 |
// SPDX-License-Identifier: MPL-2.0 |
| 2 |
// (c) Hare authors <https://harelang.org> |
| 3 |
|
| 4 |
// Taken from DragonFly's sys/sysctl.h |
| 5 |
|
| 6 |
export def CTL_MAXNAME: int = 12; // largest number of components supported |
| 7 |
export def CTL_SYSCTL: int = 0; // "magic" numbers |
| 8 |
export def CTL_KERN: int = 1; // "high kernel": proc, limits |
| 9 |
export def CTL_VM: int = 2; // virtual memory |
| 10 |
export def CTL_VFS: int = 3; // file system, mount type is next |
| 11 |
export def CTL_NET: int = 4; // network, see socket.h |
| 12 |
export def CTL_DEBUG: int = 5; // debugging parameters |
| 13 |
export def CTL_HW: int = 6; // generic cpu/io |
| 14 |
export def CTL_MACHDEP: int = 7; // machine dependent |
| 15 |
export def CTL_USER: int = 8; // user-level |
| 16 |
export def CTL_P1003_1B: int = 9; // POSIX 1003.1B |
| 17 |
export def CTL_LWKT: int = 10; // light weight kernel threads |
| 18 |
export def CTL_MAXID: int = 11; // number of valid top-level ids |
| 19 |
export def CTL_SYSCTL_DEBUG: int = 0; // printf all nodes |
| 20 |
export def CTL_SYSCTL_NAME: int = 1; // string name of OID |
| 21 |
export def CTL_SYSCTL_NEXT: int = 2; // next OID |
| 22 |
export def CTL_SYSCTL_NAME2OID: int = 3; // int array of name |
| 23 |
export def CTL_SYSCTL_OIDFMT: int = 4; // OID's kind and format |
| 24 |
export def CTL_SYSCTL_OIDDESCR: int = 5; // OID's description |
| 25 |
|
| 26 |
export def KERN_OSTYPE: int = 1; // string: system version |
| 27 |
export def KERN_OSRELEASE: int = 2; // string: system release |
| 28 |
export def KERN_OSREV: int = 3; // int: system revision |
| 29 |
export def KERN_VERSION: int = 4; // string: compile time info |
| 30 |
export def KERN_MAXVNODES: int = 5; // int: max vnodes |
| 31 |
export def KERN_MAXPROC: int = 6; // int: max processes |
| 32 |
export def KERN_MAXFILES: int = 7; // int: max open files |
| 33 |
export def KERN_ARGMAX: int = 8; // int: max arguments to exec |
| 34 |
export def KERN_SECURELVL: int = 9; // int: system security level |
| 35 |
export def KERN_HOSTNAME: int = 10; // string: hostname |
| 36 |
export def KERN_HOSTID: int = 11; // int: host identifier |
| 37 |
export def KERN_CLOCKRATE: int = 12; // struct: struct clockrate |
| 38 |
export def KERN_VNODE: int = 13; // struct: vnode structures |
| 39 |
export def KERN_PROC: int = 14; // struct: process entries |
| 40 |
export def KERN_FILE: int = 15; // struct: file entries |
| 41 |
export def KERN_UNUSED16: int = 16; // was: node: kernel profiling info |
| 42 |
export def KERN_POSIX1: int = 17; // int: POSIX.1 version |
| 43 |
export def KERN_NGROUPS: int = 18; // int: # of supplemental group ids |
| 44 |
export def KERN_JOB_CONTROL: int = 19; // int: is job control available |
| 45 |
export def KERN_SAVED_IDS: int = 20; // int: saved set-user/group-ID |
| 46 |
export def KERN_BOOTTIME: int = 21; // struct: time kernel was booted |
| 47 |
export def KERN_NISDOMAINNAME: int = 22; // string: YP domain name |
| 48 |
export def KERN_UPDATEINTERVAL: int = 23; // int: update process sleep time |
| 49 |
export def KERN_OSRELDATE: int = 24; // int: OS release date |
| 50 |
export def KERN_NTP_PLL: int = 25; // node: NTP PLL control |
| 51 |
export def KERN_BOOTFILE: int = 26; // string: name of booted kernel |
| 52 |
export def KERN_MAXFILESPERPROC: int = 27; // int: max open files per proc |
| 53 |
export def KERN_MAXPROCPERUID: int = 28; // int: max processes per uid |
| 54 |
export def KERN_DUMPDEV: int = 29; // dev_t: device to dump on |
| 55 |
export def KERN_IPC: int = 30; // node: anything related to IPC |
| 56 |
export def KERN_DUMMY: int = 31; // unused |
| 57 |
export def KERN_PS_STRINGS: int = 32; // int: address of PS_STRINGS |
| 58 |
export def KERN_USRSTACK: int = 33; // int: address of USRSTACK |
| 59 |
export def KERN_LOGSIGEXIT: int = 34; // int: do we log sigexit procs? |
| 60 |
export def KERN_IOV_MAX: int = 35; // int: value of UIO_MAXIOV |
| 61 |
export def KERN_MAXPOSIXLOCKSPERUID: int= 36; // int: max POSIX locks per uid |
| 62 |
export def KERN_STATIC_TLS_EXTRA: int = 37; // int: extra tls space for rtld |
| 63 |
export def KERN_MAXID: int = 38; // number of valid kern ids |
| 64 |
export def KERN_PROC_ALL: int = 0; // everything |
| 65 |
export def KERN_PROC_PID: int = 1; // by process id |
| 66 |
export def KERN_PROC_PGRP: int = 2; // by process group id |
| 67 |
export def KERN_PROC_SESSION: int = 3; // by session of pid |
| 68 |
export def KERN_PROC_TTY: int = 4; // by controlling tty |
| 69 |
export def KERN_PROC_UID: int = 5; // by effective uid |
| 70 |
export def KERN_PROC_RUID: int = 6; // by real uid |
| 71 |
export def KERN_PROC_ARGS: int = 7; // get/set arguments/proctitle |
| 72 |
export def KERN_PROC_CWD: int = 8; // get cwd |
| 73 |
export def KERN_PROC_PATHNAME: int = 9; // path to executable |
| 74 |
export def KERN_PROC_SIGTRAMP: int = 10; // addr[2]: sigtramp addr range |
| 75 |
export def KERN_PROC_FLAGMASK: int = 0; // xF0 |
| 76 |
export def KERN_PROC_FLAG_LWP: int = 0; // x10 |
| 77 |
export def KERN_PROC_FLAG_LWKT: int = 0; // x20 |
| 78 |
export def KIPC_MAXSOCKBUF: int = 1; // int: max size of a socket buffer |
| 79 |
export def KIPC_SOCKBUF_WASTE: int = 2; // int: wastage factor in sockbuf |
| 80 |
export def KIPC_SOMAXCONN: int = 3; // int: max length of connection q |
| 81 |
export def KIPC_MAX_LINKHDR: int = 4; // int: max length of link header |
| 82 |
export def KIPC_MAX_PROTOHDR: int = 5; // int: max length of network header |
| 83 |
export def KIPC_MAX_HDR: int = 6; // int: max total length of headers |
| 84 |
export def KIPC_MAX_DATALEN: int = 7; // int: max length of data? |
| 85 |
export def KIPC_MBSTAT: int = 8; // struct: mbuf usage statistics |
| 86 |
export def KIPC_NMBCLUSTERS: int = 9; // int: maximum mbuf clusters |
| 87 |
export def HW_MACHINE: int = 1; // string: machine class |
| 88 |
export def HW_MODEL: int = 2; // string: specific machine model |
| 89 |
export def HW_NCPU: int = 3; // int: number of cpus |
| 90 |
export def HW_BYTEORDER: int = 4; // int: machine byte order |
| 91 |
export def HW_PHYSMEM: int = 5; // int: total memory |
| 92 |
export def HW_USERMEM: int = 6; // int: non-kernel memory |
| 93 |
export def HW_PAGESIZE: int = 7; // int: software page size |
| 94 |
export def HW_DISKNAMES: int = 8; // strings: disk drive names |
| 95 |
export def HW_DISKSTATS: int = 9; // struct: diskstats[] |
| 96 |
export def HW_FLOATINGPT: int = 10; // int: has HW floating point? |
| 97 |
export def HW_MACHINE_ARCH: int = 11; // string: machine architecture |
| 98 |
export def HW_MACHINE_PLATFORM: int = 12; // string: platform architecture |
| 99 |
export def HW_SENSORS: int = 13; // node: hardware sensors |
| 100 |
export def HW_MAXID: int = 14; // number of valid hw ids |
| 101 |
export def USER_CS_PATH: int = 1; // string: _CS_PATH |
| 102 |
export def USER_BC_BASE_MAX: int = 2; // int: BC_BASE_MAX |
| 103 |
export def USER_BC_DIM_MAX: int = 3; // int: BC_DIM_MAX |
| 104 |
export def USER_BC_SCALE_MAX: int = 4; // int: BC_SCALE_MAX |
| 105 |
export def USER_BC_STRING_MAX: int = 5; // int: BC_STRING_MAX |
| 106 |
export def USER_COLL_WEIGHTS_MAX: int = 6; // int: COLL_WEIGHTS_MAX |
| 107 |
export def USER_EXPR_NEST_MAX: int = 7; // int: EXPR_NEST_MAX |
| 108 |
export def USER_LINE_MAX: int = 8; // int: LINE_MAX |
| 109 |
export def USER_RE_DUP_MAX: int = 9; // int: RE_DUP_MAX |
| 110 |
export def USER_POSIX2_VERSION: int = 10; // int: _POSIX2_VERSION |
| 111 |
export def USER_POSIX2_C_BIND: int = 11; // int: _POSIX2_C_BIND |
| 112 |
export def USER_POSIX2_C_DEV: int = 12; // int: _POSIX2_C_DEV |
| 113 |
export def USER_POSIX2_CHAR_TERM: int = 13; // int: _POSIX2_CHAR_TERM |
| 114 |
export def USER_POSIX2_FORT_DEV: int = 14; // int: _POSIX2_FORT_DEV |
| 115 |
export def USER_POSIX2_FORT_RUN: int = 15; // int: _POSIX2_FORT_RUN |
| 116 |
export def USER_POSIX2_LOCALEDEF: int = 16; // int: _POSIX2_LOCALEDEF |
| 117 |
export def USER_POSIX2_SW_DEV: int = 17; // int: _POSIX2_SW_DEV |
| 118 |
export def USER_POSIX2_UPE: int = 18; // int: _POSIX2_UPE |
| 119 |
export def USER_STREAM_MAX: int = 19; // int: _POSIX2_STREAM_MAX |
| 120 |
export def USER_TZNAME_MAX: int = 20; // int: _POSIX2_TZNAME_MAX |
| 121 |
export def USER_MAXID: int = 21; // number of valid user ids |
| 122 |
|
| 123 |
export def CTL_P1003_1B_ASYNCHRONOUS_IO: int = 1; // boolean |
| 124 |
export def CTL_P1003_1B_MAPPED_FILES: int = 2; // boolean |
| 125 |
export def CTL_P1003_1B_MEMLOCK: int = 3; // boolean |
| 126 |
export def CTL_P1003_1B_MEMLOCK_RANGE: int = 4; // boolean |
| 127 |
export def CTL_P1003_1B_MEMORY_PROTECTION: int = 5; // boolean |
| 128 |
export def CTL_P1003_1B_MESSAGE_PASSING: int = 6; // boolean |
| 129 |
export def CTL_P1003_1B_PRIORITIZED_IO: int = 7; // boolean |
| 130 |
export def CTL_P1003_1B_PRIORITY_SCHEDULING: int = 8; // boolean |
| 131 |
export def CTL_P1003_1B_REALTIME_SIGNALS: int = 9; // boolean |
| 132 |
export def CTL_P1003_1B_SEMAPHORES: int = 10; // boolean |
| 133 |
export def CTL_P1003_1B_FSYNC: int = 11; // boolean |
| 134 |
export def CTL_P1003_1B_SHARED_MEMORY_OBJECTS: int = 12; // boolean |
| 135 |
export def CTL_P1003_1B_SYNCHRONIZED_IO: int = 13; // boolean |
| 136 |
export def CTL_P1003_1B_TIMERS: int = 14; // boolean |
| 137 |
export def CTL_P1003_1B_AIO_LISTIO_MAX: int = 15; // int |
| 138 |
export def CTL_P1003_1B_AIO_MAX: int = 16; // int |
| 139 |
export def CTL_P1003_1B_AIO_PRIO_DELTA_MAX: int = 17; // int |
| 140 |
export def CTL_P1003_1B_DELAYTIMER_MAX: int = 18; // int |
| 141 |
export def CTL_P1003_1B_UNUSED19: int = 19; // int |
| 142 |
export def CTL_P1003_1B_PAGESIZE: int = 20; // int |
| 143 |
export def CTL_P1003_1B_RTSIG_MAX: int = 21; // int |
| 144 |
export def CTL_P1003_1B_SEM_NSEMS_MAX: int = 22; // int |
| 145 |
export def CTL_P1003_1B_UNUSED23: int = 23; // int |
| 146 |
export def CTL_P1003_1B_SIGQUEUE_MAX: int = 24; // int |
| 147 |
export def CTL_P1003_1B_TIMER_MAX: int = 25; // int |
| 148 |
export def CTL_P1003_1B_MAXID: int = 26; // |