sysctl.h 31 KB

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