nc/platform/linux-types/uapi/linux/
sysctl.rs

1// Copyright (c) 2020 Xu Shaohua <shaohua@biofan.org>. All rights reserved.
2// Use of this source is governed by Apache-2.0 License that can be found
3// in the LICENSE file.
4
5//! From `include/uapi/linux/sysctl.h`
6
7use crate::size_t;
8
9/// how many path components do we allow in a call to sysctl
10/// In other words, what is the largest acceptable value for the nlen member
11/// of a struct `sysctl_args_t` to have?
12pub const CTL_MAXNAME: i32 = 10;
13
14#[allow(clippy::module_name_repetitions)]
15#[repr(C)]
16#[derive(Debug, Clone)]
17pub struct sysctl_args_t {
18    pub name: *mut i32,
19    pub nlen: i32,
20    pub oldval: usize,
21    pub oldlenp: *mut size_t,
22    pub newval: usize,
23    pub newlen: size_t,
24    unused: [usize; 4],
25}
26
27/// Top-level names:
28///
29/// General kernel info and control
30pub const CTL_KERN: i32 = 1;
31/// VM management
32pub const CTL_VM: i32 = 2;
33/// Networking
34pub const CTL_NET: i32 = 3;
35/// removal breaks strace(1) compilation
36pub const CTL_PROC: i32 = 4;
37/// Filesystems
38pub const CTL_FS: i32 = 5;
39/// Debugging
40pub const CTL_DEBUG: i32 = 6;
41/// Devices
42pub const CTL_DEV: i32 = 7;
43/// Busses
44pub const CTL_BUS: i32 = 8;
45/// Binary emulation
46pub const CTL_ABI: i32 = 9;
47/// CPU stuff (speed scaling, etc)
48pub const CTL_CPU: i32 = 10;
49/// arlan wireless driver
50pub const CTL_ARLAN: i32 = 254;
51/// s390 debug
52pub const CTL_S390DBF: i32 = 5677;
53/// sunrpc debug
54pub const CTL_SUNRPC: i32 = 7249;
55/// frv power management
56pub const CTL_PM: i32 = 9899;
57/// frv specific sysctls
58pub const CTL_FRV: i32 = 9898;
59
60/// `CTL_BUS` names:
61pub const CTL_BUS_ISA: i32 = 1;
62
63/// /proc/sys/fs/inotify/
64/// max instances per user
65pub const INOTIFY_MAX_USER_INSTANCES: i32 = 1;
66/// max watches per user
67pub const INOTIFY_MAX_USER_WATCHES: i32 = 2;
68pub const INOTIFY_MAX_QUEUED_EVENTS: i32 = 3;
69
70/// `CTL_KERN` names:
71///
72/// string: system version
73pub const KERN_OSTYPE: i32 = 1;
74/// string: system release
75pub const KERN_OSRELEASE: i32 = 2;
76/// int: system revision
77pub const KERN_OSREV: i32 = 3;
78/// string: compile time info
79pub const KERN_VERSION: i32 = 4;
80/// struct: maximum rights mask
81pub const KERN_SECUREMASK: i32 = 5;
82/// table: profiling information
83pub const KERN_PROF: i32 = 6;
84/// string: hostname
85pub const KERN_NODENAME: i32 = 7;
86/// string: domainname
87pub const KERN_DOMAINNAME: i32 = 8;
88
89/// int: panic timeout
90pub const KERN_PANIC: i32 = 15;
91/// real root device to mount after initrd
92pub const KERN_REALROOTDEV: i32 = 16;
93
94/// reboot command on Sparc
95pub const KERN_SPARC_REBOOT: i32 = 21;
96/// int: allow ctl-alt-del to reboot
97pub const KERN_CTLALTDEL: i32 = 22;
98/// struct: control printk logging parameters
99pub const KERN_PRINTK: i32 = 23;
100/// Name translation
101pub const KERN_NAMETRANS: i32 = 24;
102/// turn htab reclaimation on/off on PPC
103pub const KERN_PPC_HTABRECLAIM: i32 = 25;
104/// turn idle page zeroing on/off on PPC
105pub const KERN_PPC_ZEROPAGED: i32 = 26;
106/// use nap mode for power saving
107pub const KERN_PPC_POWERSAVE_NAP: i32 = 27;
108/// string: modprobe path
109pub const KERN_MODPROBE: i32 = 28;
110/// int: sg driver reserved buffer size
111pub const KERN_SG_BIG_BUFF: i32 = 29;
112/// BSD process accounting parameters
113pub const KERN_ACCT: i32 = 30;
114/// l2cr register on PPC
115pub const KERN_PPC_L2CR: i32 = 31;
116
117/// Number of rt sigs queued
118pub const KERN_RTSIGNR: i32 = 32;
119/// Max queuable
120pub const KERN_RTSIGMAX: i32 = 33;
121
122/// long: Maximum shared memory segment
123pub const KERN_SHMMAX: i32 = 34;
124/// int: Maximum size of a messege
125pub const KERN_MSGMAX: i32 = 35;
126/// int: Maximum message queue size
127pub const KERN_MSGMNB: i32 = 36;
128/// int: Maximum system message pool size
129pub const KERN_MSGPOOL: i32 = 37;
130/// int: Sysreq enable
131pub const KERN_SYSRQ: i32 = 38;
132/// int: Maximum nr of threads in the system
133pub const KERN_MAX_THREADS: i32 = 39;
134/// Random driver
135pub const KERN_RANDOM: i32 = 40;
136/// int: Maximum size of shared memory
137pub const KERN_SHMALL: i32 = 41;
138/// int: msg queue identifiers
139pub const KERN_MSGMNI: i32 = 42;
140/// struct: sysv semaphore limits
141pub const KERN_SEM: i32 = 43;
142/// int: Sparc Stop-A enable
143pub const KERN_SPARC_STOP_A: i32 = 44;
144/// int: shm array identifiers
145pub const KERN_SHMMNI: i32 = 45;
146/// int: overflow UID
147pub const KERN_OVERFLOWUID: i32 = 46;
148/// int: overflow GID
149pub const KERN_OVERFLOWGID: i32 = 47;
150/// string: path to shm fs
151pub const KERN_SHMPATH: i32 = 48;
152/// string: path to uevent helper (deprecated)
153pub const KERN_HOTPLUG: i32 = 49;
154/// int: unimplemented ieee instructions
155pub const KERN_IEEE_EMULATION_WARNINGS: i32 = 50;
156/// int: dumps of user faults
157pub const KERN_S390_USER_DEBUG_LOGGING: i32 = 51;
158/// int: use core or core.%pid
159pub const KERN_CORE_USES_PID: i32 = 52;
160/// int: various kernel tainted flags
161pub const KERN_TAINTED: i32 = 53;
162/// int: PID of the process to notify on CAD
163pub const KERN_CADPID: i32 = 54;
164/// int: PID # limit
165pub const KERN_PIDMAX: i32 = 55;
166/// string: pattern for core-file names
167pub const KERN_CORE_PATTERN: i32 = 56;
168/// int: whether we will panic on an oops
169pub const KERN_PANIC_ON_OOPS: i32 = 57;
170/// int: hppa soft-power enable
171pub const KERN_HPPA_PWRSW: i32 = 58;
172/// int: hppa unaligned-trap enable
173pub const KERN_HPPA_UNALIGNED: i32 = 59;
174/// int: tune printk ratelimiting
175pub const KERN_PRINTK_RATELIMIT: i32 = 60;
176/// int: tune printk ratelimiting
177pub const KERN_PRINTK_RATELIMIT_BURST: i32 = 61;
178/// dir: pty driver
179pub const KERN_PTY: i32 = 62;
180/// int: `NGROUPS_MAX`
181pub const KERN_NGROUPS_MAX: i32 = 63;
182/// int: serial console power-off halt
183pub const KERN_SPARC_SCONS_PWROFF: i32 = 64;
184/// int: hz timer on or off
185pub const KERN_HZ_TIMER: i32 = 65;
186/// int: unknown nmi panic flag
187pub const KERN_UNKNOWN_NMI_PANIC: i32 = 66;
188/// int: boot loader type
189pub const KERN_BOOTLOADER_TYPE: i32 = 67;
190/// int: randomize virtual address space
191pub const KERN_RANDOMIZE: i32 = 68;
192/// int: behaviour of dumps for setuid core
193pub const KERN_SETUID_DUMPABLE: i32 = 69;
194/// int: number of spinlock retries
195pub const KERN_SPIN_RETRY: i32 = 70;
196/// int: flags for setting up video after ACPI sleep
197pub const KERN_ACPI_VIDEO_FLAGS: i32 = 71;
198/// int: ia64 unaligned userland trap enable
199pub const KERN_IA64_UNALIGNED: i32 = 72;
200/// int: print compat layer  messages
201pub const KERN_COMPAT_LOG: i32 = 73;
202/// int: rtmutex's maximum lock depth
203pub const KERN_MAX_LOCK_DEPTH: i32 = 74;
204/// int: enable/disable nmi watchdog
205pub const KERN_NMI_WATCHDOG: i32 = 75;
206/// int: whether we will panic on an unrecovered
207pub const KERN_PANIC_ON_NMI: i32 = 76;
208/// int: call `panic()` in `WARN()` functions
209pub const KERN_PANIC_ON_WARN: i32 = 77;
210/// ulong: bitmask to print system info on panic
211pub const KERN_PANIC_PRINT: i32 = 78;
212
213/// `CTL_VM` names:
214///
215/// was: struct: Set vm swapping control
216pub const VM_UNUSED1: i32 = 1;
217/// was; int: Linear or `sqrt()` swapout for hogs
218pub const VM_UNUSED2: i32 = 2;
219/// was: struct: Set free page thresholds
220pub const VM_UNUSED3: i32 = 3;
221/// Spare
222pub const VM_UNUSED4: i32 = 4;
223/// Turn off the virtual memory safety limit
224pub const VM_OVERCOMMIT_MEMORY: i32 = 5;
225/// was: struct: Set buffer memory thresholds
226pub const VM_UNUSED5: i32 = 6;
227/// was: struct: Set cache memory thresholds
228pub const VM_UNUSED7: i32 = 7;
229/// was: struct: Control kswapd behaviour
230pub const VM_UNUSED8: i32 = 8;
231/// was: struct: Set page table cache parameters
232pub const VM_UNUSED9: i32 = 9;
233/// int: set number of pages to swap together
234pub const VM_PAGE_CLUSTER: i32 = 10;
235/// `dirty_background_ratio`
236pub const VM_DIRTY_BACKGROUND: i32 = 11;
237/// `dirty_ratio`
238pub const VM_DIRTY_RATIO: i32 = 12;
239/// `dirty_writeback_centisecs`
240pub const VM_DIRTY_WB_CS: i32 = 13;
241/// `dirty_expire_centisecs`
242pub const VM_DIRTY_EXPIRE_CS: i32 = 14;
243/// `nr_pdflush_threads`
244pub const VM_NR_PDFLUSH_THREADS: i32 = 15;
245/// percent of RAM to allow overcommit in
246pub const VM_OVERCOMMIT_RATIO: i32 = 16;
247/// struct: Control pagebuf parameters
248pub const VM_PAGEBUF: i32 = 17;
249/// int: Number of available Huge Pages
250pub const VM_HUGETLB_PAGES: i32 = 18;
251/// Tendency to steal mapped memory
252pub const VM_SWAPPINESS: i32 = 19;
253/// reservation ratio for lower memory zones
254pub const VM_LOWMEM_RESERVE_RATIO: i32 = 20;
255/// Minimum free kilobytes to maintain
256pub const VM_MIN_FREE_KBYTES: i32 = 21;
257/// int: Maximum number of mmaps/address-space
258pub const VM_MAX_MAP_COUNT: i32 = 22;
259/// vm laptop mode
260pub const VM_LAPTOP_MODE: i32 = 23;
261/// block dump mode
262pub const VM_BLOCK_DUMP: i32 = 24;
263/// permitted hugetlb group
264pub const VM_HUGETLB_GROUP: i32 = 25;
265/// dcache/icache reclaim pressure
266pub const VM_VFS_CACHE_PRESSURE: i32 = 26;
267/// legacy/compatibility virtual address space layout
268pub const VM_LEGACY_VA_LAYOUT: i32 = 27;
269/// default time for token time out
270pub const VM_SWAP_TOKEN_TIMEOUT: i32 = 28;
271/// int: nuke lots of pagecache
272pub const VM_DROP_PAGECACHE: i32 = 29;
273/// int: fraction of pages in each `percpu_pagelist`
274pub const VM_PERCPU_PAGELIST_FRACTION: i32 = 30;
275/// reclaim local zone memory before going off node
276pub const VM_ZONE_RECLAIM_MODE: i32 = 31;
277/// Set min percent of unmapped pages
278pub const VM_MIN_UNMAPPED: i32 = 32;
279/// panic at out-of-memory
280pub const VM_PANIC_ON_OOM: i32 = 33;
281/// map VDSO into new processes?
282pub const VM_VDSO_ENABLED: i32 = 34;
283/// Percent pages ignored by zone reclaim
284pub const VM_MIN_SLAB: i32 = 35;
285
286/// `CTL_NET` names:
287pub const NET_CORE: i32 = 1;
288pub const NET_ETHER: i32 = 2;
289pub const NET_802: i32 = 3;
290pub const NET_UNIX: i32 = 4;
291pub const NET_IPV4: i32 = 5;
292pub const NET_IPX: i32 = 6;
293pub const NET_ATALK: i32 = 7;
294pub const NET_NETROM: i32 = 8;
295pub const NET_AX25: i32 = 9;
296pub const NET_BRIDGE: i32 = 10;
297pub const NET_ROSE: i32 = 11;
298pub const NET_IPV6: i32 = 12;
299pub const NET_X25: i32 = 13;
300pub const NET_TR: i32 = 14;
301pub const NET_DECNET: i32 = 15;
302pub const NET_ECONET: i32 = 16;
303pub const NET_SCTP: i32 = 17;
304pub const NET_LLC: i32 = 18;
305pub const NET_NETFILTER: i32 = 19;
306pub const NET_DCCP: i32 = 20;
307pub const NET_IRDA: i32 = 412;
308
309/// `/proc/sys/kernel/random`
310pub const RANDOM_POOLSIZE: i32 = 1;
311pub const RANDOM_ENTROPY_COUNT: i32 = 2;
312pub const RANDOM_READ_THRESH: i32 = 3;
313pub const RANDOM_WRITE_THRESH: i32 = 4;
314pub const RANDOM_BOOT_ID: i32 = 5;
315pub const RANDOM_UUID: i32 = 6;
316
317/// `/proc/sys/kernel/pty`
318pub const PTY_MAX: i32 = 1;
319pub const PTY_NR: i32 = 2;
320
321/// `/proc/sys/bus/isa`
322pub const BUS_ISA_MEM_BASE: i32 = 1;
323pub const BUS_ISA_PORT_BASE: i32 = 2;
324pub const BUS_ISA_PORT_SHIFT: i32 = 3;
325
326/// `/proc/sys/net/core`
327pub const NET_CORE_WMEM_MAX: i32 = 1;
328pub const NET_CORE_RMEM_MAX: i32 = 2;
329pub const NET_CORE_WMEM_DEFAULT: i32 = 3;
330pub const NET_CORE_RMEM_DEFAULT: i32 = 4;
331/// was `NET_CORE_DESTROY_DELAY`
332pub const NET_CORE_MAX_BACKLOG: i32 = 6;
333pub const NET_CORE_FASTROUTE: i32 = 7;
334pub const NET_CORE_MSG_COST: i32 = 8;
335pub const NET_CORE_MSG_BURST: i32 = 9;
336pub const NET_CORE_OPTMEM_MAX: i32 = 10;
337pub const NET_CORE_HOT_LIST_LENGTH: i32 = 11;
338pub const NET_CORE_DIVERT_VERSION: i32 = 12;
339pub const NET_CORE_NO_CONG_THRESH: i32 = 13;
340pub const NET_CORE_NO_CONG: i32 = 14;
341pub const NET_CORE_LO_CONG: i32 = 15;
342pub const NET_CORE_MOD_CONG: i32 = 16;
343pub const NET_CORE_DEV_WEIGHT: i32 = 17;
344pub const NET_CORE_SOMAXCONN: i32 = 18;
345pub const NET_CORE_BUDGET: i32 = 19;
346pub const NET_CORE_AEVENT_ETIME: i32 = 20;
347pub const NET_CORE_AEVENT_RSEQTH: i32 = 21;
348pub const NET_CORE_WARNINGS: i32 = 22;
349
350// /proc/sys/net/ethernet
351
352// /proc/sys/net/802
353
354/// `/proc/sys/net/unix`
355pub const NET_UNIX_DESTROY_DELAY: i32 = 1;
356pub const NET_UNIX_DELETE_DELAY: i32 = 2;
357pub const NET_UNIX_MAX_DGRAM_QLEN: i32 = 3;
358
359/// `/proc/sys/net/netfilter`
360pub const NET_NF_CONNTRACK_MAX: i32 = 1;
361pub const NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT: i32 = 2;
362pub const NET_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV: i32 = 3;
363pub const NET_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED: i32 = 4;
364pub const NET_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT: i32 = 5;
365pub const NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT: i32 = 6;
366pub const NET_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK: i32 = 7;
367pub const NET_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT: i32 = 8;
368pub const NET_NF_CONNTRACK_TCP_TIMEOUT_CLOSE: i32 = 9;
369pub const NET_NF_CONNTRACK_UDP_TIMEOUT: i32 = 10;
370pub const NET_NF_CONNTRACK_UDP_TIMEOUT_STREAM: i32 = 11;
371pub const NET_NF_CONNTRACK_ICMP_TIMEOUT: i32 = 12;
372pub const NET_NF_CONNTRACK_GENERIC_TIMEOUT: i32 = 13;
373pub const NET_NF_CONNTRACK_BUCKETS: i32 = 14;
374pub const NET_NF_CONNTRACK_LOG_INVALID: i32 = 15;
375pub const NET_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS: i32 = 16;
376pub const NET_NF_CONNTRACK_TCP_LOOSE: i32 = 17;
377pub const NET_NF_CONNTRACK_TCP_BE_LIBERAL: i32 = 18;
378pub const NET_NF_CONNTRACK_TCP_MAX_RETRANS: i32 = 19;
379pub const NET_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED: i32 = 20;
380pub const NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT: i32 = 21;
381pub const NET_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED: i32 = 22;
382pub const NET_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED: i32 = 23;
383pub const NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT: i32 = 24;
384pub const NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD: i32 = 25;
385pub const NET_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT: i32 = 26;
386pub const NET_NF_CONNTRACK_COUNT: i32 = 27;
387pub const NET_NF_CONNTRACK_ICMPV6_TIMEOUT: i32 = 28;
388pub const NET_NF_CONNTRACK_FRAG6_TIMEOUT: i32 = 29;
389pub const NET_NF_CONNTRACK_FRAG6_LOW_THRESH: i32 = 30;
390pub const NET_NF_CONNTRACK_FRAG6_HIGH_THRESH: i32 = 31;
391pub const NET_NF_CONNTRACK_CHECKSUM: i32 = 32;
392
393/// `/proc/sys/net/ipv4`
394///
395/// v2.0 compatibile variables
396pub const NET_IPV4_FORWARD: i32 = 8;
397pub const NET_IPV4_DYNADDR: i32 = 9;
398
399pub const NET_IPV4_CONF: i32 = 16;
400pub const NET_IPV4_NEIGH: i32 = 17;
401pub const NET_IPV4_ROUTE: i32 = 18;
402pub const NET_IPV4_FIB_HASH: i32 = 19;
403pub const NET_IPV4_NETFILTER: i32 = 20;
404
405pub const NET_IPV4_TCP_TIMESTAMPS: i32 = 33;
406pub const NET_IPV4_TCP_WINDOW_SCALING: i32 = 34;
407pub const NET_IPV4_TCP_SACK: i32 = 35;
408pub const NET_IPV4_TCP_RETRANS_COLLAPSE: i32 = 36;
409pub const NET_IPV4_DEFAULT_TTL: i32 = 37;
410pub const NET_IPV4_AUTOCONFIG: i32 = 38;
411pub const NET_IPV4_NO_PMTU_DISC: i32 = 39;
412pub const NET_IPV4_TCP_SYN_RETRIES: i32 = 40;
413pub const NET_IPV4_IPFRAG_HIGH_THRESH: i32 = 41;
414pub const NET_IPV4_IPFRAG_LOW_THRESH: i32 = 42;
415pub const NET_IPV4_IPFRAG_TIME: i32 = 43;
416pub const NET_IPV4_TCP_MAX_KA_PROBES: i32 = 44;
417pub const NET_IPV4_TCP_KEEPALIVE_TIME: i32 = 45;
418pub const NET_IPV4_TCP_KEEPALIVE_PROBES: i32 = 46;
419pub const NET_IPV4_TCP_RETRIES1: i32 = 47;
420pub const NET_IPV4_TCP_RETRIES2: i32 = 48;
421pub const NET_IPV4_TCP_FIN_TIMEOUT: i32 = 49;
422pub const NET_IPV4_IP_MASQ_DEBUG: i32 = 50;
423pub const NET_TCP_SYNCOOKIES: i32 = 51;
424pub const NET_TCP_STDURG: i32 = 52;
425pub const NET_TCP_RFC1337: i32 = 53;
426pub const NET_TCP_SYN_TAILDROP: i32 = 54;
427pub const NET_TCP_MAX_SYN_BACKLOG: i32 = 55;
428pub const NET_IPV4_LOCAL_PORT_RANGE: i32 = 56;
429pub const NET_IPV4_ICMP_ECHO_IGNORE_ALL: i32 = 57;
430pub const NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS: i32 = 58;
431pub const NET_IPV4_ICMP_SOURCEQUENCH_RATE: i32 = 59;
432pub const NET_IPV4_ICMP_DESTUNREACH_RATE: i32 = 60;
433pub const NET_IPV4_ICMP_TIMEEXCEED_RATE: i32 = 61;
434pub const NET_IPV4_ICMP_PARAMPROB_RATE: i32 = 62;
435pub const NET_IPV4_ICMP_ECHOREPLY_RATE: i32 = 63;
436pub const NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES: i32 = 64;
437pub const NET_IPV4_IGMP_MAX_MEMBERSHIPS: i32 = 65;
438pub const NET_TCP_TW_RECYCLE: i32 = 66;
439pub const NET_IPV4_ALWAYS_DEFRAG: i32 = 67;
440pub const NET_IPV4_TCP_KEEPALIVE_INTVL: i32 = 68;
441pub const NET_IPV4_INET_PEER_THRESHOLD: i32 = 69;
442pub const NET_IPV4_INET_PEER_MINTTL: i32 = 70;
443pub const NET_IPV4_INET_PEER_MAXTTL: i32 = 71;
444pub const NET_IPV4_INET_PEER_GC_MINTIME: i32 = 72;
445pub const NET_IPV4_INET_PEER_GC_MAXTIME: i32 = 73;
446pub const NET_TCP_ORPHAN_RETRIES: i32 = 74;
447pub const NET_TCP_ABORT_ON_OVERFLOW: i32 = 75;
448pub const NET_TCP_SYNACK_RETRIES: i32 = 76;
449pub const NET_TCP_MAX_ORPHANS: i32 = 77;
450pub const NET_TCP_MAX_TW_BUCKETS: i32 = 78;
451pub const NET_TCP_FACK: i32 = 79;
452pub const NET_TCP_REORDERING: i32 = 80;
453pub const NET_TCP_ECN: i32 = 81;
454pub const NET_TCP_DSACK: i32 = 82;
455pub const NET_TCP_MEM: i32 = 83;
456pub const NET_TCP_WMEM: i32 = 84;
457pub const NET_TCP_RMEM: i32 = 85;
458pub const NET_TCP_APP_WIN: i32 = 86;
459pub const NET_TCP_ADV_WIN_SCALE: i32 = 87;
460pub const NET_IPV4_NONLOCAL_BIND: i32 = 88;
461pub const NET_IPV4_ICMP_RATELIMIT: i32 = 89;
462pub const NET_IPV4_ICMP_RATEMASK: i32 = 90;
463pub const NET_TCP_TW_REUSE: i32 = 91;
464pub const NET_TCP_FRTO: i32 = 92;
465pub const NET_TCP_LOW_LATENCY: i32 = 93;
466pub const NET_IPV4_IPFRAG_SECRET_INTERVAL: i32 = 94;
467pub const NET_IPV4_IGMP_MAX_MSF: i32 = 96;
468pub const NET_TCP_NO_METRICS_SAVE: i32 = 97;
469pub const NET_TCP_DEFAULT_WIN_SCALE: i32 = 105;
470pub const NET_TCP_MODERATE_RCVBUF: i32 = 106;
471pub const NET_TCP_TSO_WIN_DIVISOR: i32 = 107;
472pub const NET_TCP_BIC_BETA: i32 = 108;
473pub const NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR: i32 = 109;
474pub const NET_TCP_CONG_CONTROL: i32 = 110;
475pub const NET_TCP_ABC: i32 = 111;
476pub const NET_IPV4_IPFRAG_MAX_DIST: i32 = 112;
477pub const NET_TCP_MTU_PROBING: i32 = 113;
478pub const NET_TCP_BASE_MSS: i32 = 114;
479pub const NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS: i32 = 115;
480pub const NET_TCP_DMA_COPYBREAK: i32 = 116;
481pub const NET_TCP_SLOW_START_AFTER_IDLE: i32 = 117;
482pub const NET_CIPSOV4_CACHE_ENABLE: i32 = 118;
483pub const NET_CIPSOV4_CACHE_BUCKET_SIZE: i32 = 119;
484pub const NET_CIPSOV4_RBM_OPTFMT: i32 = 120;
485pub const NET_CIPSOV4_RBM_STRICTVALID: i32 = 121;
486pub const NET_TCP_AVAIL_CONG_CONTROL: i32 = 122;
487pub const NET_TCP_ALLOWED_CONG_CONTROL: i32 = 123;
488pub const NET_TCP_MAX_SSTHRESH: i32 = 124;
489pub const NET_TCP_FRTO_RESPONSE: i32 = 125;
490
491pub const NET_IPV4_ROUTE_FLUSH: i32 = 1;
492/// obsolete since 2.6.25
493pub const NET_IPV4_ROUTE_MIN_DELAY: i32 = 2;
494/// obsolete since 2.6.25
495pub const NET_IPV4_ROUTE_MAX_DELAY: i32 = 3;
496pub const NET_IPV4_ROUTE_GC_THRESH: i32 = 4;
497pub const NET_IPV4_ROUTE_MAX_SIZE: i32 = 5;
498pub const NET_IPV4_ROUTE_GC_MIN_INTERVAL: i32 = 6;
499pub const NET_IPV4_ROUTE_GC_TIMEOUT: i32 = 7;
500/// obsolete since 2.6.38
501pub const NET_IPV4_ROUTE_GC_INTERVAL: i32 = 8;
502pub const NET_IPV4_ROUTE_REDIRECT_LOAD: i32 = 9;
503pub const NET_IPV4_ROUTE_REDIRECT_NUMBER: i32 = 10;
504pub const NET_IPV4_ROUTE_REDIRECT_SILENCE: i32 = 11;
505pub const NET_IPV4_ROUTE_ERROR_COST: i32 = 12;
506pub const NET_IPV4_ROUTE_ERROR_BURST: i32 = 13;
507pub const NET_IPV4_ROUTE_GC_ELASTICITY: i32 = 14;
508pub const NET_IPV4_ROUTE_MTU_EXPIRES: i32 = 15;
509pub const NET_IPV4_ROUTE_MIN_PMTU: i32 = 16;
510pub const NET_IPV4_ROUTE_MIN_ADVMSS: i32 = 17;
511pub const NET_IPV4_ROUTE_SECRET_INTERVAL: i32 = 18;
512pub const NET_IPV4_ROUTE_GC_MIN_INTERVAL_MS: i32 = 19;
513
514pub const NET_PROTO_CONF_ALL: i32 = -2;
515pub const NET_PROTO_CONF_DEFAULT: i32 = -3;
516
517pub const NET_IPV4_CONF_FORWARDING: i32 = 1;
518pub const NET_IPV4_CONF_MC_FORWARDING: i32 = 2;
519pub const NET_IPV4_CONF_PROXY_ARP: i32 = 3;
520pub const NET_IPV4_CONF_ACCEPT_REDIRECTS: i32 = 4;
521pub const NET_IPV4_CONF_SECURE_REDIRECTS: i32 = 5;
522pub const NET_IPV4_CONF_SEND_REDIRECTS: i32 = 6;
523pub const NET_IPV4_CONF_SHARED_MEDIA: i32 = 7;
524pub const NET_IPV4_CONF_RP_FILTER: i32 = 8;
525pub const NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE: i32 = 9;
526pub const NET_IPV4_CONF_BOOTP_RELAY: i32 = 10;
527pub const NET_IPV4_CONF_LOG_MARTIANS: i32 = 11;
528pub const NET_IPV4_CONF_TAG: i32 = 12;
529pub const NET_IPV4_CONF_ARPFILTER: i32 = 13;
530pub const NET_IPV4_CONF_MEDIUM_ID: i32 = 14;
531pub const NET_IPV4_CONF_NOXFRM: i32 = 15;
532pub const NET_IPV4_CONF_NOPOLICY: i32 = 16;
533pub const NET_IPV4_CONF_FORCE_IGMP_VERSION: i32 = 17;
534pub const NET_IPV4_CONF_ARP_ANNOUNCE: i32 = 18;
535pub const NET_IPV4_CONF_ARP_IGNORE: i32 = 19;
536pub const NET_IPV4_CONF_PROMOTE_SECONDARIES: i32 = 20;
537pub const NET_IPV4_CONF_ARP_ACCEPT: i32 = 21;
538pub const NET_IPV4_CONF_ARP_NOTIFY: i32 = 22;
539
540/// `/proc/sys/net/ipv4/netfilter`
541pub const NET_IPV4_NF_CONNTRACK_MAX: i32 = 1;
542pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT: i32 = 2;
543pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV: i32 = 3;
544pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED: i32 = 4;
545pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT: i32 = 5;
546pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT: i32 = 6;
547pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK: i32 = 7;
548pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT: i32 = 8;
549pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE: i32 = 9;
550pub const NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT: i32 = 10;
551pub const NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM: i32 = 11;
552pub const NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT: i32 = 12;
553pub const NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT: i32 = 13;
554pub const NET_IPV4_NF_CONNTRACK_BUCKETS: i32 = 14;
555pub const NET_IPV4_NF_CONNTRACK_LOG_INVALID: i32 = 15;
556pub const NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_MAX_RETRANS: i32 = 16;
557pub const NET_IPV4_NF_CONNTRACK_TCP_LOOSE: i32 = 17;
558pub const NET_IPV4_NF_CONNTRACK_TCP_BE_LIBERAL: i32 = 18;
559pub const NET_IPV4_NF_CONNTRACK_TCP_MAX_RETRANS: i32 = 19;
560pub const NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_CLOSED: i32 = 20;
561pub const NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_WAIT: i32 = 21;
562pub const NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_COOKIE_ECHOED: i32 = 22;
563pub const NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_ESTABLISHED: i32 = 23;
564pub const NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_SENT: i32 = 24;
565pub const NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_RECD: i32 = 25;
566pub const NET_IPV4_NF_CONNTRACK_SCTP_TIMEOUT_SHUTDOWN_ACK_SENT: i32 = 26;
567pub const NET_IPV4_NF_CONNTRACK_COUNT: i32 = 27;
568pub const NET_IPV4_NF_CONNTRACK_CHECKSUM: i32 = 28;
569
570/// `/proc/sys/net/ipv6`
571pub const NET_IPV6_CONF: i32 = 16;
572pub const NET_IPV6_NEIGH: i32 = 17;
573pub const NET_IPV6_ROUTE: i32 = 18;
574pub const NET_IPV6_ICMP: i32 = 19;
575pub const NET_IPV6_BINDV6ONLY: i32 = 20;
576pub const NET_IPV6_IP6FRAG_HIGH_THRESH: i32 = 21;
577pub const NET_IPV6_IP6FRAG_LOW_THRESH: i32 = 22;
578pub const NET_IPV6_IP6FRAG_TIME: i32 = 23;
579pub const NET_IPV6_IP6FRAG_SECRET_INTERVAL: i32 = 24;
580pub const NET_IPV6_MLD_MAX_MSF: i32 = 25;
581
582pub const NET_IPV6_ROUTE_FLUSH: i32 = 1;
583pub const NET_IPV6_ROUTE_GC_THRESH: i32 = 2;
584pub const NET_IPV6_ROUTE_MAX_SIZE: i32 = 3;
585pub const NET_IPV6_ROUTE_GC_MIN_INTERVAL: i32 = 4;
586pub const NET_IPV6_ROUTE_GC_TIMEOUT: i32 = 5;
587pub const NET_IPV6_ROUTE_GC_INTERVAL: i32 = 6;
588pub const NET_IPV6_ROUTE_GC_ELASTICITY: i32 = 7;
589pub const NET_IPV6_ROUTE_MTU_EXPIRES: i32 = 8;
590pub const NET_IPV6_ROUTE_MIN_ADVMSS: i32 = 9;
591pub const NET_IPV6_ROUTE_GC_MIN_INTERVAL_MS: i32 = 10;
592
593pub const NET_IPV6_FORWARDING: i32 = 1;
594pub const NET_IPV6_HOP_LIMIT: i32 = 2;
595pub const NET_IPV6_MTU: i32 = 3;
596pub const NET_IPV6_ACCEPT_RA: i32 = 4;
597pub const NET_IPV6_ACCEPT_REDIRECTS: i32 = 5;
598pub const NET_IPV6_AUTOCONF: i32 = 6;
599pub const NET_IPV6_DAD_TRANSMITS: i32 = 7;
600pub const NET_IPV6_RTR_SOLICITS: i32 = 8;
601pub const NET_IPV6_RTR_SOLICIT_INTERVAL: i32 = 9;
602pub const NET_IPV6_RTR_SOLICIT_DELAY: i32 = 10;
603pub const NET_IPV6_USE_TEMPADDR: i32 = 11;
604pub const NET_IPV6_TEMP_VALID_LFT: i32 = 12;
605pub const NET_IPV6_TEMP_PREFERED_LFT: i32 = 13;
606pub const NET_IPV6_REGEN_MAX_RETRY: i32 = 14;
607pub const NET_IPV6_MAX_DESYNC_FACTOR: i32 = 15;
608pub const NET_IPV6_MAX_ADDRESSES: i32 = 16;
609pub const NET_IPV6_FORCE_MLD_VERSION: i32 = 17;
610pub const NET_IPV6_ACCEPT_RA_DEFRTR: i32 = 18;
611pub const NET_IPV6_ACCEPT_RA_PINFO: i32 = 19;
612pub const NET_IPV6_ACCEPT_RA_RTR_PREF: i32 = 20;
613pub const NET_IPV6_RTR_PROBE_INTERVAL: i32 = 21;
614pub const NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN: i32 = 22;
615pub const NET_IPV6_PROXY_NDP: i32 = 23;
616pub const NET_IPV6_ACCEPT_SOURCE_ROUTE: i32 = 25;
617pub const NET_IPV6_ACCEPT_RA_FROM_LOCAL: i32 = 26;
618pub const NET_IPV6_ACCEPT_RA_RT_INFO_MIN_PLEN: i32 = 27;
619pub const NET_IPV6_MAX: i32 = 28;
620
621/// `/proc/sys/net/ipv6/icmp`
622pub const NET_IPV6_ICMP_RATELIMIT: i32 = 1;
623pub const NET_IPV6_ICMP_ECHO_IGNORE_ALL: i32 = 2;
624
625/// `/proc/sys/net/<protocol>/neigh/<dev>`
626pub const NET_NEIGH_MCAST_SOLICIT: i32 = 1;
627pub const NET_NEIGH_UCAST_SOLICIT: i32 = 2;
628pub const NET_NEIGH_APP_SOLICIT: i32 = 3;
629pub const NET_NEIGH_RETRANS_TIME: i32 = 4;
630pub const NET_NEIGH_REACHABLE_TIME: i32 = 5;
631pub const NET_NEIGH_DELAY_PROBE_TIME: i32 = 6;
632pub const NET_NEIGH_GC_STALE_TIME: i32 = 7;
633pub const NET_NEIGH_UNRES_QLEN: i32 = 8;
634pub const NET_NEIGH_PROXY_QLEN: i32 = 9;
635pub const NET_NEIGH_ANYCAST_DELAY: i32 = 10;
636pub const NET_NEIGH_PROXY_DELAY: i32 = 11;
637pub const NET_NEIGH_LOCKTIME: i32 = 12;
638pub const NET_NEIGH_GC_INTERVAL: i32 = 13;
639pub const NET_NEIGH_GC_THRESH1: i32 = 14;
640pub const NET_NEIGH_GC_THRESH2: i32 = 15;
641pub const NET_NEIGH_GC_THRESH3: i32 = 16;
642pub const NET_NEIGH_RETRANS_TIME_MS: i32 = 17;
643pub const NET_NEIGH_REACHABLE_TIME_MS: i32 = 18;
644
645/// `/proc/sys/net/dccp`
646pub const NET_DCCP_DEFAULT: i32 = 1;
647
648/// `/proc/sys/net/ipx`
649pub const NET_IPX_PPROP_BROADCASTING: i32 = 1;
650pub const NET_IPX_FORWARDING: i32 = 2;
651
652/// `/proc/sys/net/llc`
653pub const NET_LLC2: i32 = 1;
654pub const NET_LLC_STATION: i32 = 2;
655
656/// `/proc/sys/net/llc/llc2`
657pub const NET_LLC2_TIMEOUT: i32 = 1;
658
659/// `/proc/sys/net/llc/station`
660pub const NET_LLC_STATION_ACK_TIMEOUT: i32 = 1;
661
662/// `/proc/sys/net/llc/llc2/timeout`
663pub const NET_LLC2_ACK_TIMEOUT: i32 = 1;
664pub const NET_LLC2_P_TIMEOUT: i32 = 2;
665pub const NET_LLC2_REJ_TIMEOUT: i32 = 3;
666pub const NET_LLC2_BUSY_TIMEOUT: i32 = 4;
667
668/// `/proc/sys/net/appletalk`
669pub const NET_ATALK_AARP_EXPIRY_TIME: i32 = 1;
670pub const NET_ATALK_AARP_TICK_TIME: i32 = 2;
671pub const NET_ATALK_AARP_RETRANSMIT_LIMIT: i32 = 3;
672pub const NET_ATALK_AARP_RESOLVE_TIME: i32 = 4;
673
674/// `/proc/sys/net/netrom`
675pub const NET_NETROM_DEFAULT_PATH_QUALITY: i32 = 1;
676pub const NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER: i32 = 2;
677pub const NET_NETROM_NETWORK_TTL_INITIALISER: i32 = 3;
678pub const NET_NETROM_TRANSPORT_TIMEOUT: i32 = 4;
679pub const NET_NETROM_TRANSPORT_MAXIMUM_TRIES: i32 = 5;
680pub const NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY: i32 = 6;
681pub const NET_NETROM_TRANSPORT_BUSY_DELAY: i32 = 7;
682pub const NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE: i32 = 8;
683pub const NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT: i32 = 9;
684pub const NET_NETROM_ROUTING_CONTROL: i32 = 10;
685pub const NET_NETROM_LINK_FAILS_COUNT: i32 = 11;
686pub const NET_NETROM_RESET: i32 = 12;
687
688/// `/proc/sys/net/ax25`
689pub const NET_AX25_IP_DEFAULT_MODE: i32 = 1;
690pub const NET_AX25_DEFAULT_MODE: i32 = 2;
691pub const NET_AX25_BACKOFF_TYPE: i32 = 3;
692pub const NET_AX25_CONNECT_MODE: i32 = 4;
693pub const NET_AX25_STANDARD_WINDOW: i32 = 5;
694pub const NET_AX25_EXTENDED_WINDOW: i32 = 6;
695pub const NET_AX25_T1_TIMEOUT: i32 = 7;
696pub const NET_AX25_T2_TIMEOUT: i32 = 8;
697pub const NET_AX25_T3_TIMEOUT: i32 = 9;
698pub const NET_AX25_IDLE_TIMEOUT: i32 = 10;
699pub const NET_AX25_N2: i32 = 11;
700pub const NET_AX25_PACLEN: i32 = 12;
701pub const NET_AX25_PROTOCOL: i32 = 13;
702pub const NET_AX25_DAMA_SLAVE_TIMEOUT: i32 = 14;
703
704/// `/proc/sys/net/rose`
705pub const NET_ROSE_RESTART_REQUEST_TIMEOUT: i32 = 1;
706pub const NET_ROSE_CALL_REQUEST_TIMEOUT: i32 = 2;
707pub const NET_ROSE_RESET_REQUEST_TIMEOUT: i32 = 3;
708pub const NET_ROSE_CLEAR_REQUEST_TIMEOUT: i32 = 4;
709pub const NET_ROSE_ACK_HOLD_BACK_TIMEOUT: i32 = 5;
710pub const NET_ROSE_ROUTING_CONTROL: i32 = 6;
711pub const NET_ROSE_LINK_FAIL_TIMEOUT: i32 = 7;
712pub const NET_ROSE_MAX_VCS: i32 = 8;
713pub const NET_ROSE_WINDOW_SIZE: i32 = 9;
714pub const NET_ROSE_NO_ACTIVITY_TIMEOUT: i32 = 10;
715
716/// `/proc/sys/net/x25`
717pub const NET_X25_RESTART_REQUEST_TIMEOUT: i32 = 1;
718pub const NET_X25_CALL_REQUEST_TIMEOUT: i32 = 2;
719pub const NET_X25_RESET_REQUEST_TIMEOUT: i32 = 3;
720pub const NET_X25_CLEAR_REQUEST_TIMEOUT: i32 = 4;
721pub const NET_X25_ACK_HOLD_BACK_TIMEOUT: i32 = 5;
722pub const NET_X25_FORWARD: i32 = 6;
723
724/// `/proc/sys/net/token-ring`
725pub const NET_TR_RIF_TIMEOUT: i32 = 1;
726
727/// `/proc/sys/net/decnet/`
728pub const NET_DECNET_NODE_TYPE: i32 = 1;
729pub const NET_DECNET_NODE_ADDRESS: i32 = 2;
730pub const NET_DECNET_NODE_NAME: i32 = 3;
731pub const NET_DECNET_DEFAULT_DEVICE: i32 = 4;
732pub const NET_DECNET_TIME_WAIT: i32 = 5;
733pub const NET_DECNET_DN_COUNT: i32 = 6;
734pub const NET_DECNET_DI_COUNT: i32 = 7;
735pub const NET_DECNET_DR_COUNT: i32 = 8;
736pub const NET_DECNET_DST_GC_INTERVAL: i32 = 9;
737pub const NET_DECNET_CONF: i32 = 10;
738pub const NET_DECNET_NO_FC_MAX_CWND: i32 = 11;
739pub const NET_DECNET_MEM: i32 = 12;
740pub const NET_DECNET_RMEM: i32 = 13;
741pub const NET_DECNET_WMEM: i32 = 14;
742pub const NET_DECNET_DEBUG_LEVEL: i32 = 255;
743
744/// `/proc/sys/net/decnet/conf/<dev>`
745pub const NET_DECNET_CONF_LOOPBACK: i32 = -2;
746pub const NET_DECNET_CONF_DDCMP: i32 = -3;
747pub const NET_DECNET_CONF_PPP: i32 = -4;
748pub const NET_DECNET_CONF_X25: i32 = -5;
749pub const NET_DECNET_CONF_GRE: i32 = -6;
750pub const NET_DECNET_CONF_ETHER: i32 = -7;
751
752/// `/proc/sys/net/decnet/conf/<dev>/`
753pub const NET_DECNET_CONF_DEV_PRIORITY: i32 = 1;
754pub const NET_DECNET_CONF_DEV_T1: i32 = 2;
755pub const NET_DECNET_CONF_DEV_T2: i32 = 3;
756pub const NET_DECNET_CONF_DEV_T3: i32 = 4;
757pub const NET_DECNET_CONF_DEV_FORWARDING: i32 = 5;
758pub const NET_DECNET_CONF_DEV_BLKSIZE: i32 = 6;
759pub const NET_DECNET_CONF_DEV_STATE: i32 = 7;
760
761/// `/proc/sys/net/sctp`
762pub const NET_SCTP_RTO_INITIAL: i32 = 1;
763pub const NET_SCTP_RTO_MIN: i32 = 2;
764pub const NET_SCTP_RTO_MAX: i32 = 3;
765pub const NET_SCTP_RTO_ALPHA: i32 = 4;
766pub const NET_SCTP_RTO_BETA: i32 = 5;
767pub const NET_SCTP_VALID_COOKIE_LIFE: i32 = 6;
768pub const NET_SCTP_ASSOCIATION_MAX_RETRANS: i32 = 7;
769pub const NET_SCTP_PATH_MAX_RETRANS: i32 = 8;
770pub const NET_SCTP_MAX_INIT_RETRANSMITS: i32 = 9;
771pub const NET_SCTP_HB_INTERVAL: i32 = 10;
772pub const NET_SCTP_PRESERVE_ENABLE: i32 = 11;
773pub const NET_SCTP_MAX_BURST: i32 = 12;
774pub const NET_SCTP_ADDIP_ENABLE: i32 = 13;
775pub const NET_SCTP_PRSCTP_ENABLE: i32 = 14;
776pub const NET_SCTP_SNDBUF_POLICY: i32 = 15;
777pub const NET_SCTP_SACK_TIMEOUT: i32 = 16;
778pub const NET_SCTP_RCVBUF_POLICY: i32 = 17;
779
780/// `/proc/sys/net/bridge`
781pub const NET_BRIDGE_NF_CALL_ARPTABLES: i32 = 1;
782pub const NET_BRIDGE_NF_CALL_IPTABLES: i32 = 2;
783pub const NET_BRIDGE_NF_CALL_IP6TABLES: i32 = 3;
784pub const NET_BRIDGE_NF_FILTER_VLAN_TAGGED: i32 = 4;
785pub const NET_BRIDGE_NF_FILTER_PPPOE_TAGGED: i32 = 5;
786
787/// `CTL_FS` names:
788///
789/// int:current number of allocated inodes
790pub const FS_NRINODE: i32 = 1;
791pub const FS_STATINODE: i32 = 2;
792/// int:maximum number of inodes that can be allocated
793pub const FS_MAXINODE: i32 = 3;
794/// int:current number of allocated dquots
795pub const FS_NRDQUOT: i32 = 4;
796/// int:maximum number of dquots that can be allocated
797pub const FS_MAXDQUOT: i32 = 5;
798/// int:current number of allocated filedescriptors
799pub const FS_NRFILE: i32 = 6;
800/// int:maximum number of filedescriptors that can be allocated
801pub const FS_MAXFILE: i32 = 7;
802pub const FS_DENTRY: i32 = 8;
803/// int:current number of allocated `super_blocks`
804pub const FS_NRSUPER: i32 = 9;
805/// int:maximum number of `super_blocks` that can be allocated
806pub const FS_MAXSUPER: i32 = 10;
807/// int: overflow UID
808pub const FS_OVERFLOWUID: i32 = 11;
809/// int: overflow GID
810pub const FS_OVERFLOWGID: i32 = 12;
811/// int: leases enabled
812pub const FS_LEASES: i32 = 13;
813/// int: directory notification enabled
814pub const FS_DIR_NOTIFY: i32 = 14;
815/// int: maximum time to wait for a lease break
816pub const FS_LEASE_TIME: i32 = 15;
817/// disc quota usage statistics and control
818pub const FS_DQSTATS: i32 = 16;
819/// struct: control xfs parameters
820pub const FS_XFS: i32 = 17;
821/// current system-wide number of aio requests
822pub const FS_AIO_NR: i32 = 18;
823/// system-wide maximum number of aio requests
824pub const FS_AIO_MAX_NR: i32 = 19;
825/// inotify submenu
826pub const FS_INOTIFY: i32 = 20;
827/// ocfs2
828pub const FS_OCFS2: i32 = 988;
829
830/// `/proc/sys/fs/quota/`
831pub const FS_DQ_LOOKUPS: i32 = 1;
832pub const FS_DQ_DROPS: i32 = 2;
833pub const FS_DQ_READS: i32 = 3;
834pub const FS_DQ_WRITES: i32 = 4;
835pub const FS_DQ_CACHE_HITS: i32 = 5;
836pub const FS_DQ_ALLOCATED: i32 = 6;
837pub const FS_DQ_FREE: i32 = 7;
838pub const FS_DQ_SYNCS: i32 = 8;
839pub const FS_DQ_WARNINGS: i32 = 9;
840
841/// `CTL_DEV` names:
842pub const DEV_CDROM: i32 = 1;
843pub const DEV_HWMON: i32 = 2;
844pub const DEV_PARPORT: i32 = 3;
845pub const DEV_RAID: i32 = 4;
846pub const DEV_MAC_HID: i32 = 5;
847pub const DEV_SCSI: i32 = 6;
848pub const DEV_IPMI: i32 = 7;
849
850/// `/proc/sys/dev/cdrom`
851pub const DEV_CDROM_INFO: i32 = 1;
852pub const DEV_CDROM_AUTOCLOSE: i32 = 2;
853pub const DEV_CDROM_AUTOEJECT: i32 = 3;
854pub const DEV_CDROM_DEBUG: i32 = 4;
855pub const DEV_CDROM_LOCK: i32 = 5;
856pub const DEV_CDROM_CHECK_MEDIA: i32 = 6;
857
858/// `/proc/sys/dev/parport`
859pub const DEV_PARPORT_DEFAULT: i32 = -3;
860
861/// `/proc/sys/dev/raid`
862pub const DEV_RAID_SPEED_LIMIT_MIN: i32 = 1;
863pub const DEV_RAID_SPEED_LIMIT_MAX: i32 = 2;
864
865/// `/proc/sys/dev/parport/default`
866pub const DEV_PARPORT_DEFAULT_TIMESLICE: i32 = 1;
867pub const DEV_PARPORT_DEFAULT_SPINTIME: i32 = 2;
868
869/// `/proc/sys/dev/parport/parport n`
870pub const DEV_PARPORT_SPINTIME: i32 = 1;
871pub const DEV_PARPORT_BASE_ADDR: i32 = 2;
872pub const DEV_PARPORT_IRQ: i32 = 3;
873pub const DEV_PARPORT_DMA: i32 = 4;
874pub const DEV_PARPORT_MODES: i32 = 5;
875pub const DEV_PARPORT_DEVICES: i32 = 6;
876pub const DEV_PARPORT_AUTOPROBE: i32 = 16;
877
878/// `/proc/sys/dev/parport/parport n/devices/`
879pub const DEV_PARPORT_DEVICES_ACTIVE: i32 = -3;
880
881/// `/proc/sys/dev/parport/parport n /devices/device n`
882pub const DEV_PARPORT_DEVICE_TIMESLICE: i32 = 1;
883
884/// `/proc/sys/dev/mac_hid`
885pub const DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES: i32 = 1;
886pub const DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES: i32 = 2;
887pub const DEV_MAC_HID_MOUSE_BUTTON_EMULATION: i32 = 3;
888pub const DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE: i32 = 4;
889pub const DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE: i32 = 5;
890pub const DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES: i32 = 6;
891
892/// `/proc/sys/dev/scsi`
893pub const DEV_SCSI_LOGGING_LEVEL: i32 = 1;
894
895/// `/proc/sys/dev/ipmi`
896pub const DEV_IPMI_POWEROFF_POWERCYCLE: i32 = 1;
897
898/// `/proc/sys/abi`
899///
900/// default handler for coff binaries
901pub const ABI_DEFHANDLER_COFF: i32 = 1;
902/// default handler for ELF binaries
903pub const ABI_DEFHANDLER_ELF: i32 = 2;
904/// default handler for procs using lcall7
905pub const ABI_DEFHANDLER_LCALL7: i32 = 3;
906/// default handler for an libc.so ELF interp
907pub const ABI_DEFHANDLER_LIBCSO: i32 = 4;
908/// tracing flags
909pub const ABI_TRACE: i32 = 5;
910/// fake target utsname information
911pub const ABI_FAKE_UTSNAME: i32 = 6;