Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sysctl.h
Go to the documentation of this file.
1 /*
2  * sysctl.h: General linux system control interface
3  *
4  * Begun 24 March 1995, Stephen Tweedie
5  *
6  ****************************************************************
7  ****************************************************************
8  **
9  ** WARNING:
10  ** The values in this file are exported to user space via
11  ** the sysctl() binary interface. Do *NOT* change the
12  ** numbering of any existing values here, and do not change
13  ** any numbers within any one set of values. If you have to
14  ** redefine an existing interface, use a new number for it.
15  ** The kernel will then return -ENOTDIR to any application using
16  ** the old binary interface.
17  **
18  ****************************************************************
19  ****************************************************************
20  */
21 
22 #ifndef _UAPI_LINUX_SYSCTL_H
23 #define _UAPI_LINUX_SYSCTL_H
24 
25 #include <linux/kernel.h>
26 #include <linux/types.h>
27 #include <linux/compiler.h>
28 
29 struct completion;
30 
31 #define CTL_MAXNAME 10 /* how many path components do we allow in a
32  call to sysctl? In other words, what is
33  the largest acceptable value for the nlen
34  member of a struct __sysctl_args to have? */
35 
36 struct __sysctl_args {
37  int __user *name;
38  int nlen;
39  void __user *oldval;
40  size_t __user *oldlenp;
41  void __user *newval;
42  size_t newlen;
43  unsigned long __unused[4];
44 };
45 
46 /* Define sysctl names first */
47 
48 /* Top-level names: */
49 
50 enum
51 {
52  CTL_KERN=1, /* General kernel info and control */
53  CTL_VM=2, /* VM management */
54  CTL_NET=3, /* Networking */
55  CTL_PROC=4, /* removal breaks strace(1) compilation */
56  CTL_FS=5, /* Filesystems */
57  CTL_DEBUG=6, /* Debugging */
58  CTL_DEV=7, /* Devices */
59  CTL_BUS=8, /* Busses */
60  CTL_ABI=9, /* Binary emulation */
61  CTL_CPU=10, /* CPU stuff (speed scaling, etc) */
62  CTL_ARLAN=254, /* arlan wireless driver */
63  CTL_S390DBF=5677, /* s390 debug */
64  CTL_SUNRPC=7249, /* sunrpc debug */
65  CTL_PM=9899, /* frv power management */
66  CTL_FRV=9898, /* frv specific sysctls */
67 };
68 
69 /* CTL_BUS names: */
70 enum
71 {
72  CTL_BUS_ISA=1 /* ISA */
73 };
74 
75 /* /proc/sys/fs/inotify/ */
76 enum
77 {
78  INOTIFY_MAX_USER_INSTANCES=1, /* max instances per user */
79  INOTIFY_MAX_USER_WATCHES=2, /* max watches per user */
80  INOTIFY_MAX_QUEUED_EVENTS=3 /* max queued events per instance */
81 };
82 
83 /* CTL_KERN names: */
84 enum
85 {
86  KERN_OSTYPE=1, /* string: system version */
87  KERN_OSRELEASE=2, /* string: system release */
88  KERN_OSREV=3, /* int: system revision */
89  KERN_VERSION=4, /* string: compile time info */
90  KERN_SECUREMASK=5, /* struct: maximum rights mask */
91  KERN_PROF=6, /* table: profiling information */
92  KERN_NODENAME=7, /* string: hostname */
93  KERN_DOMAINNAME=8, /* string: domainname */
94 
95  KERN_PANIC=15, /* int: panic timeout */
96  KERN_REALROOTDEV=16, /* real root device to mount after initrd */
97 
98  KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
99  KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
100  KERN_PRINTK=23, /* struct: control printk logging parameters */
101  KERN_NAMETRANS=24, /* Name translation */
102  KERN_PPC_HTABRECLAIM=25, /* turn htab reclaimation on/off on PPC */
103  KERN_PPC_ZEROPAGED=26, /* turn idle page zeroing on/off on PPC */
104  KERN_PPC_POWERSAVE_NAP=27, /* use nap mode for power saving */
105  KERN_MODPROBE=28, /* string: modprobe path */
106  KERN_SG_BIG_BUFF=29, /* int: sg driver reserved buffer size */
107  KERN_ACCT=30, /* BSD process accounting parameters */
108  KERN_PPC_L2CR=31, /* l2cr register on PPC */
109 
110  KERN_RTSIGNR=32, /* Number of rt sigs queued */
111  KERN_RTSIGMAX=33, /* Max queuable */
112 
113  KERN_SHMMAX=34, /* long: Maximum shared memory segment */
114  KERN_MSGMAX=35, /* int: Maximum size of a messege */
115  KERN_MSGMNB=36, /* int: Maximum message queue size */
116  KERN_MSGPOOL=37, /* int: Maximum system message pool size */
117  KERN_SYSRQ=38, /* int: Sysreq enable */
118  KERN_MAX_THREADS=39, /* int: Maximum nr of threads in the system */
119  KERN_RANDOM=40, /* Random driver */
120  KERN_SHMALL=41, /* int: Maximum size of shared memory */
121  KERN_MSGMNI=42, /* int: msg queue identifiers */
122  KERN_SEM=43, /* struct: sysv semaphore limits */
123  KERN_SPARC_STOP_A=44, /* int: Sparc Stop-A enable */
124  KERN_SHMMNI=45, /* int: shm array identifiers */
125  KERN_OVERFLOWUID=46, /* int: overflow UID */
126  KERN_OVERFLOWGID=47, /* int: overflow GID */
127  KERN_SHMPATH=48, /* string: path to shm fs */
128  KERN_HOTPLUG=49, /* string: path to uevent helper (deprecated) */
129  KERN_IEEE_EMULATION_WARNINGS=50, /* int: unimplemented ieee instructions */
130  KERN_S390_USER_DEBUG_LOGGING=51, /* int: dumps of user faults */
131  KERN_CORE_USES_PID=52, /* int: use core or core.%pid */
132  KERN_TAINTED=53, /* int: various kernel tainted flags */
133  KERN_CADPID=54, /* int: PID of the process to notify on CAD */
134  KERN_PIDMAX=55, /* int: PID # limit */
135  KERN_CORE_PATTERN=56, /* string: pattern for core-file names */
136  KERN_PANIC_ON_OOPS=57, /* int: whether we will panic on an oops */
137  KERN_HPPA_PWRSW=58, /* int: hppa soft-power enable */
138  KERN_HPPA_UNALIGNED=59, /* int: hppa unaligned-trap enable */
139  KERN_PRINTK_RATELIMIT=60, /* int: tune printk ratelimiting */
140  KERN_PRINTK_RATELIMIT_BURST=61, /* int: tune printk ratelimiting */
141  KERN_PTY=62, /* dir: pty driver */
142  KERN_NGROUPS_MAX=63, /* int: NGROUPS_MAX */
143  KERN_SPARC_SCONS_PWROFF=64, /* int: serial console power-off halt */
144  KERN_HZ_TIMER=65, /* int: hz timer on or off */
145  KERN_UNKNOWN_NMI_PANIC=66, /* int: unknown nmi panic flag */
146  KERN_BOOTLOADER_TYPE=67, /* int: boot loader type */
147  KERN_RANDOMIZE=68, /* int: randomize virtual address space */
148  KERN_SETUID_DUMPABLE=69, /* int: behaviour of dumps for setuid core */
149  KERN_SPIN_RETRY=70, /* int: number of spinlock retries */
150  KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */
151  KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
152  KERN_COMPAT_LOG=73, /* int: print compat layer messages */
153  KERN_MAX_LOCK_DEPTH=74, /* int: rtmutex's maximum lock depth */
154  KERN_NMI_WATCHDOG=75, /* int: enable/disable nmi watchdog */
155  KERN_PANIC_ON_NMI=76, /* int: whether we will panic on an unrecovered */
156 };
157 
158 
159 
160 /* CTL_VM names: */
161 enum
162 {
163  VM_UNUSED1=1, /* was: struct: Set vm swapping control */
164  VM_UNUSED2=2, /* was; int: Linear or sqrt() swapout for hogs */
165  VM_UNUSED3=3, /* was: struct: Set free page thresholds */
166  VM_UNUSED4=4, /* Spare */
167  VM_OVERCOMMIT_MEMORY=5, /* Turn off the virtual memory safety limit */
168  VM_UNUSED5=6, /* was: struct: Set buffer memory thresholds */
169  VM_UNUSED7=7, /* was: struct: Set cache memory thresholds */
170  VM_UNUSED8=8, /* was: struct: Control kswapd behaviour */
171  VM_UNUSED9=9, /* was: struct: Set page table cache parameters */
172  VM_PAGE_CLUSTER=10, /* int: set number of pages to swap together */
173  VM_DIRTY_BACKGROUND=11, /* dirty_background_ratio */
174  VM_DIRTY_RATIO=12, /* dirty_ratio */
175  VM_DIRTY_WB_CS=13, /* dirty_writeback_centisecs */
176  VM_DIRTY_EXPIRE_CS=14, /* dirty_expire_centisecs */
177  VM_NR_PDFLUSH_THREADS=15, /* nr_pdflush_threads */
178  VM_OVERCOMMIT_RATIO=16, /* percent of RAM to allow overcommit in */
179  VM_PAGEBUF=17, /* struct: Control pagebuf parameters */
180  VM_HUGETLB_PAGES=18, /* int: Number of available Huge Pages */
181  VM_SWAPPINESS=19, /* Tendency to steal mapped memory */
182  VM_LOWMEM_RESERVE_RATIO=20,/* reservation ratio for lower memory zones */
183  VM_MIN_FREE_KBYTES=21, /* Minimum free kilobytes to maintain */
184  VM_MAX_MAP_COUNT=22, /* int: Maximum number of mmaps/address-space */
185  VM_LAPTOP_MODE=23, /* vm laptop mode */
186  VM_BLOCK_DUMP=24, /* block dump mode */
187  VM_HUGETLB_GROUP=25, /* permitted hugetlb group */
188  VM_VFS_CACHE_PRESSURE=26, /* dcache/icache reclaim pressure */
189  VM_LEGACY_VA_LAYOUT=27, /* legacy/compatibility virtual address space layout */
190  VM_SWAP_TOKEN_TIMEOUT=28, /* default time for token time out */
191  VM_DROP_PAGECACHE=29, /* int: nuke lots of pagecache */
192  VM_PERCPU_PAGELIST_FRACTION=30,/* int: fraction of pages in each percpu_pagelist */
193  VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */
194  VM_MIN_UNMAPPED=32, /* Set min percent of unmapped pages */
195  VM_PANIC_ON_OOM=33, /* panic at out-of-memory */
196  VM_VDSO_ENABLED=34, /* map VDSO into new processes? */
197  VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */
198 };
199 
200 
201 /* CTL_NET names: */
202 enum
203 {
217  NET_TR=14,
222  NET_NETFILTER=19,
223  NET_DCCP=20,
224  NET_IRDA=412,
225 };
226 
227 /* /proc/sys/kernel/random */
228 enum
229 {
234  RANDOM_BOOT_ID=5,
235  RANDOM_UUID=6
236 };
237 
238 /* /proc/sys/kernel/pty */
239 enum
240 {
241  PTY_MAX=1,
242  PTY_NR=2
243 };
244 
245 /* /proc/sys/bus/isa */
246 enum
247 {
251 };
252 
253 /* /proc/sys/net/core */
254 enum
255 {
260 /* was NET_CORE_DESTROY_DELAY */
278 };
279 
280 /* /proc/sys/net/ethernet */
281 
282 /* /proc/sys/net/802 */
283 
284 /* /proc/sys/net/unix */
286 enum
287 {
291 };
292 
293 /* /proc/sys/net/netfilter */
294 enum
295 {
328 };
329 
330 /* /proc/sys/net/ipv4 */
331 enum
332 {
333  /* v2.0 compatibile variables */
339  NET_IPV4_ROUTE=18,
428 };
430 enum {
432  NET_IPV4_ROUTE_MIN_DELAY=2, /* obsolete since 2.6.25 */
433  NET_IPV4_ROUTE_MAX_DELAY=3, /* obsolete since 2.6.25 */
438  NET_IPV4_ROUTE_GC_INTERVAL=8, /* obsolete since 2.6.38 */
450 };
452 enum
453 {
456 
457  /* And device ifindices ... */
458 };
460 enum
461 {
484 };
485 
486 /* /proc/sys/net/ipv4/netfilter */
487 enum
488 {
517 };
518 
519 /* /proc/sys/net/ipv6 */
520 enum {
531 };
533 enum {
544 };
546 enum {
572 };
574 /* /proc/sys/net/ipv6/icmp */
575 enum {
577 };
579 /* /proc/sys/net/<protocol>/neigh/<dev> */
580 enum {
599 };
601 /* /proc/sys/net/dccp */
602 enum {
604 };
606 /* /proc/sys/net/ipx */
607 enum {
610 };
612 /* /proc/sys/net/llc */
613 enum {
614  NET_LLC2=1,
615  NET_LLC_STATION=2,
616 };
618 /* /proc/sys/net/llc/llc2 */
619 enum {
621 };
623 /* /proc/sys/net/llc/station */
624 enum {
626 };
628 /* /proc/sys/net/llc/llc2/timeout */
629 enum {
634 };
636 /* /proc/sys/net/appletalk */
637 enum {
642 };
643 
645 /* /proc/sys/net/netrom */
646 enum {
659 };
661 /* /proc/sys/net/ax25 */
662 enum {
674  NET_AX25_PACLEN=12,
677 };
679 /* /proc/sys/net/rose */
680 enum {
691 };
693 /* /proc/sys/net/x25 */
694 enum {
701 };
702 
703 /* /proc/sys/net/token-ring */
704 enum
705 {
707 };
709 /* /proc/sys/net/decnet/ */
710 enum {
723  NET_DECNET_RMEM = 13,
724  NET_DECNET_WMEM = 14,
726 };
728 /* /proc/sys/net/decnet/conf/<dev> */
729 enum {
733  NET_DECNET_CONF_X25 = -5,
734  NET_DECNET_CONF_GRE = -6,
736 
737  /* ... and ifindex of devices */
738 };
740 /* /proc/sys/net/decnet/conf/<dev>/ */
741 enum {
749 };
751 /* /proc/sys/net/sctp */
752 enum {
770 };
772 /* /proc/sys/net/bridge */
773 enum {
779 };
781 /* proc/sys/net/irda */
782 enum {
797 };
798 
799 
800 /* CTL_FS names: */
801 enum
802 {
803  FS_NRINODE=1, /* int:current number of allocated inodes */
805  FS_MAXINODE=3, /* int:maximum number of inodes that can be allocated */
806  FS_NRDQUOT=4, /* int:current number of allocated dquots */
807  FS_MAXDQUOT=5, /* int:maximum number of dquots that can be allocated */
808  FS_NRFILE=6, /* int:current number of allocated filedescriptors */
809  FS_MAXFILE=7, /* int:maximum number of filedescriptors that can be allocated */
811  FS_NRSUPER=9, /* int:current number of allocated super_blocks */
812  FS_MAXSUPER=10, /* int:maximum number of super_blocks that can be allocated */
813  FS_OVERFLOWUID=11, /* int: overflow UID */
814  FS_OVERFLOWGID=12, /* int: overflow GID */
815  FS_LEASES=13, /* int: leases enabled */
816  FS_DIR_NOTIFY=14, /* int: directory notification enabled */
817  FS_LEASE_TIME=15, /* int: maximum time to wait for a lease break */
818  FS_DQSTATS=16, /* disc quota usage statistics and control */
819  FS_XFS=17, /* struct: control xfs parameters */
820  FS_AIO_NR=18, /* current system-wide number of aio requests */
821  FS_AIO_MAX_NR=19, /* system-wide maximum number of aio requests */
822  FS_INOTIFY=20, /* inotify submenu */
823  FS_OCFS2=988, /* ocfs2 */
824 };
826 /* /proc/sys/fs/quota/ */
827 enum {
834  FS_DQ_FREE = 7,
835  FS_DQ_SYNCS = 8,
836  FS_DQ_WARNINGS = 9,
837 };
838 
839 /* CTL_DEBUG names: */
841 /* CTL_DEV names: */
842 enum {
847  DEV_MAC_HID=5,
848  DEV_SCSI=6,
849  DEV_IPMI=7,
850 };
852 /* /proc/sys/dev/cdrom */
853 enum {
857  DEV_CDROM_DEBUG=4,
858  DEV_CDROM_LOCK=5,
860 };
862 /* /proc/sys/dev/parport */
863 enum {
865 };
867 /* /proc/sys/dev/raid */
868 enum {
871 };
873 /* /proc/sys/dev/parport/default */
874 enum {
877 };
879 /* /proc/sys/dev/parport/parport n */
880 enum {
888 };
890 /* /proc/sys/dev/parport/parport n/devices/ */
891 enum {
893 };
895 /* /proc/sys/dev/parport/parport n/devices/device n */
896 enum {
898 };
900 /* /proc/sys/dev/mac_hid */
901 enum {
908 };
910 /* /proc/sys/dev/scsi */
911 enum {
913 };
915 /* /proc/sys/dev/ipmi */
916 enum {
918 };
919 
920 /* /proc/sys/abi */
921 enum
922 {
923  ABI_DEFHANDLER_COFF=1, /* default handler for coff binaries */
924  ABI_DEFHANDLER_ELF=2, /* default handler for ELF binaries */
925  ABI_DEFHANDLER_LCALL7=3,/* default handler for procs using lcall7 */
926  ABI_DEFHANDLER_LIBCSO=4,/* default handler for an libc.so ELF interp */
927  ABI_TRACE=5, /* tracing flags */
928  ABI_FAKE_UTSNAME=6, /* fake target utsname information */
929 };
930 
931 
932 #endif /* _UAPI_LINUX_SYSCTL_H */