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 14 ** to 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 ** --sct 19 ** 20 **************************************************************** 21 **************************************************************** 22 */ 23 24 #ifndef _LINUX_SYSCTL_H 25 #define _LINUX_SYSCTL_H 26 27 #include <linux/kernel.h> 28 #include <linux/types.h> 29 #include <linux/list.h> 30 31 struct file; 32 struct completion; 33 34 #define CTL_MAXNAME 10 35 36 struct __sysctl_args { 37 int *name; 38 int nlen; 39 void *oldval; 40 size_t *oldlenp; 41 void *newval; 42 size_t newlen; 43 unsigned long __unused[4]; 44 }; 45 46 /* Define sysctl names first */ 47 48 /* Top-level names: */ 49 50 /* For internal pattern-matching use only: */ 51 #ifdef __KERNEL__ 52 #define CTL_ANY -1 /* Matches any name */ 53 #define CTL_NONE 0 54 #endif 55 56 enum 57 { 58 CTL_KERN=1, /* General kernel info and control */ 59 CTL_VM=2, /* VM management */ 60 CTL_NET=3, /* Networking */ 61 CTL_PROC=4, /* Process info */ 62 CTL_FS=5, /* Filesystems */ 63 CTL_DEBUG=6, /* Debugging */ 64 CTL_DEV=7, /* Devices */ 65 CTL_BUS=8, /* Busses */ 66 CTL_ABI=9, /* Binary emulation */ 67 CTL_CPU=10 /* CPU stuff (speed scaling, etc) */ 68 }; 69 70 /* CTL_BUS names: */ 71 enum 72 { 73 CTL_BUS_ISA=1 /* ISA */ 74 }; 75 76 /* CTL_KERN names: */ 77 enum 78 { 79 KERN_OSTYPE=1, /* string: system version */ 80 KERN_OSRELEASE=2, /* string: system release */ 81 KERN_OSREV=3, /* int: system revision */ 82 KERN_VERSION=4, /* string: compile time info */ 83 KERN_SECUREMASK=5, /* struct: maximum rights mask */ 84 KERN_PROF=6, /* table: profiling information */ 85 KERN_NODENAME=7, 86 KERN_DOMAINNAME=8, 87 88 KERN_CAP_BSET=14, /* int: capability bounding set */ 89 KERN_PANIC=15, /* int: panic timeout */ 90 KERN_REALROOTDEV=16, /* real root device to mount after initrd */ 91 92 KERN_SPARC_REBOOT=21, /* reboot command on Sparc */ 93 KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */ 94 KERN_PRINTK=23, /* struct: control printk logging parameters */ 95 KERN_NAMETRANS=24, /* Name translation */ 96 KERN_PPC_HTABRECLAIM=25, /* turn htab reclaimation on/off on PPC */ 97 KERN_PPC_ZEROPAGED=26, /* turn idle page zeroing on/off on PPC */ 98 KERN_PPC_POWERSAVE_NAP=27, /* use nap mode for power saving */ 99 KERN_MODPROBE=28, 100 KERN_SG_BIG_BUFF=29, 101 KERN_ACCT=30, /* BSD process accounting parameters */ 102 KERN_PPC_L2CR=31, /* l2cr register on PPC */ 103 104 KERN_RTSIGNR=32, /* Number of rt sigs queued */ 105 KERN_RTSIGMAX=33, /* Max queuable */ 106 107 KERN_SHMMAX=34, /* long: Maximum shared memory segment */ 108 KERN_MSGMAX=35, /* int: Maximum size of a messege */ 109 KERN_MSGMNB=36, /* int: Maximum message queue size */ 110 KERN_MSGPOOL=37, /* int: Maximum system message pool size */ 111 KERN_SYSRQ=38, /* int: Sysreq enable */ 112 KERN_MAX_THREADS=39, /* int: Maximum nr of threads in the system */ 113 KERN_RANDOM=40, /* Random driver */ 114 KERN_SHMALL=41, /* int: Maximum size of shared memory */ 115 KERN_MSGMNI=42, /* int: msg queue identifiers */ 116 KERN_SEM=43, /* struct: sysv semaphore limits */ 117 KERN_SPARC_STOP_A=44, /* int: Sparc Stop-A enable */ 118 KERN_SHMMNI=45, /* int: shm array identifiers */ 119 KERN_OVERFLOWUID=46, /* int: overflow UID */ 120 KERN_OVERFLOWGID=47, /* int: overflow GID */ 121 KERN_SHMPATH=48, /* string: path to shm fs */ 122 KERN_HOTPLUG=49, /* string: path to hotplug policy agent */ 123 KERN_IEEE_EMULATION_WARNINGS=50, /* int: unimplemented ieee instructions */ 124 KERN_S390_USER_DEBUG_LOGGING=51, /* int: dumps of user faults */ 125 KERN_CORE_USES_PID=52, /* int: use core or core.%pid */ 126 KERN_TAINTED=53, /* int: various kernel tainted flags */ 127 KERN_CADPID=54, /* int: PID of the process to notify on CAD */ 128 KERN_CORE_PATTERN=56, /* string: pattern for core-files */ 129 KERN_PPC_L3CR=57, /* l3cr register on PPC */ 130 KERN_EXCEPTION_TRACE=58, /* boolean: exception trace */ 131 KERN_CORE_SETUID=59, /* int: set to allow core dumps of setuid apps */ 132 KERN_SPARC_SCONS_PWROFF=64, /* int: serial console power-off halt */ 133 }; 134 135 136 /* CTL_VM names: */ 137 enum 138 { 139 VM_SWAPCTL=1, /* struct: Set vm swapping control */ 140 VM_SWAPOUT=2, /* int: Linear or sqrt() swapout for hogs */ 141 VM_FREEPG=3, /* struct: Set free page thresholds */ 142 VM_BDFLUSH=4, /* struct: Control buffer cache flushing */ 143 VM_OVERCOMMIT_MEMORY=5, /* Turn off the virtual memory safety limit */ 144 VM_BUFFERMEM=6, /* struct: Set buffer memory thresholds */ 145 VM_PAGECACHE=7, /* struct: Set cache memory thresholds */ 146 VM_PAGERDAEMON=8, /* struct: Control kswapd behaviour */ 147 VM_PGT_CACHE=9, /* struct: Set page table cache parameters */ 148 VM_PAGE_CLUSTER=10, /* int: set number of pages to swap together */ 149 VM_MAX_MAP_COUNT=11, /* int: Maximum number of active map areas */ 150 VM_MIN_READAHEAD=12, /* Min file readahead */ 151 VM_MAX_READAHEAD=13, /* Max file readahead */ 152 VM_VFS_SCAN_RATIO=14, /* part of the inactive vfs lists to scan */ 153 VM_LRU_BALANCE_RATIO=15,/* balance active and inactive caches */ 154 VM_PASSES=16, /* number of vm passes before failing */ 155 VM_PAGEBUF=17, /* struct: Control pagebuf parameters */ 156 VM_GFP_DEBUG=18, /* debug GFP failures */ 157 VM_CACHE_SCAN_RATIO=19, /* part of the inactive cache list to scan */ 158 VM_MAPPED_RATIO=20, /* amount of unfreeable pages that triggers swapout */ 159 VM_LAPTOP_MODE=21, /* kernel in laptop flush mode */ 160 VM_BLOCK_DUMP=22, /* dump fs activity to log */ 161 VM_ANON_LRU=23, /* immediatly insert anon pages in the vm page lru */ 162 VM_MMAP_MIN_ADDR=24, /* prevent mapping of low addresses by mmap() */ 163 }; 164 165 166 /* CTL_NET names: */ 167 enum 168 { 169 NET_CORE=1, 170 NET_ETHER=2, 171 NET_802=3, 172 NET_UNIX=4, 173 NET_IPV4=5, 174 NET_IPX=6, 175 NET_ATALK=7, 176 NET_NETROM=8, 177 NET_AX25=9, 178 NET_BRIDGE=10, 179 NET_ROSE=11, 180 NET_IPV6=12, 181 NET_X25=13, 182 NET_TR=14, 183 NET_DECNET=15, 184 NET_ECONET=16, 185 NET_KHTTPD=17, 186 NET_SCTP=18 187 }; 188 189 /* /proc/sys/kernel/random */ 190 enum 191 { 192 RANDOM_POOLSIZE=1, 193 RANDOM_ENTROPY_COUNT=2, 194 RANDOM_READ_THRESH=3, 195 RANDOM_WRITE_THRESH=4, 196 RANDOM_BOOT_ID=5, 197 RANDOM_UUID=6 198 }; 199 200 /* /proc/sys/bus/isa */ 201 enum 202 { 203 BUS_ISA_MEM_BASE=1, 204 BUS_ISA_PORT_BASE=2, 205 BUS_ISA_PORT_SHIFT=3 206 }; 207 208 /* /proc/sys/net/core */ 209 enum 210 { 211 NET_CORE_WMEM_MAX=1, 212 NET_CORE_RMEM_MAX=2, 213 NET_CORE_WMEM_DEFAULT=3, 214 NET_CORE_RMEM_DEFAULT=4, 215 /* was NET_CORE_DESTROY_DELAY */ 216 NET_CORE_MAX_BACKLOG=6, 217 NET_CORE_FASTROUTE=7, 218 NET_CORE_MSG_COST=8, 219 NET_CORE_MSG_BURST=9, 220 NET_CORE_OPTMEM_MAX=10, 221 NET_CORE_HOT_LIST_LENGTH=11, 222 NET_CORE_DIVERT_VERSION=12, 223 NET_CORE_NO_CONG_THRESH=13, 224 NET_CORE_NO_CONG=14, 225 NET_CORE_LO_CONG=15, 226 NET_CORE_MOD_CONG=16, 227 NET_CORE_DEV_WEIGHT=17, 228 NET_CORE_SOMAXCONN=18, 229 }; 230 231 /* /proc/sys/net/ethernet */ 232 233 /* /proc/sys/net/802 */ 234 235 /* /proc/sys/net/unix */ 236 237 enum 238 { 239 NET_UNIX_DESTROY_DELAY=1, 240 NET_UNIX_DELETE_DELAY=2, 241 NET_UNIX_MAX_DGRAM_QLEN=3, 242 }; 243 244 /* /proc/sys/net/ipv4 */ 245 enum 246 { 247 /* v2.0 compatibile variables */ 248 NET_IPV4_FORWARD=8, 249 NET_IPV4_DYNADDR=9, 250 251 NET_IPV4_CONF=16, 252 NET_IPV4_NEIGH=17, 253 NET_IPV4_ROUTE=18, 254 NET_IPV4_FIB_HASH=19, 255 NET_IPV4_NETFILTER=20, 256 257 NET_IPV4_TCP_TIMESTAMPS=33, 258 NET_IPV4_TCP_WINDOW_SCALING=34, 259 NET_IPV4_TCP_SACK=35, 260 NET_IPV4_TCP_RETRANS_COLLAPSE=36, 261 NET_IPV4_DEFAULT_TTL=37, 262 NET_IPV4_AUTOCONFIG=38, 263 NET_IPV4_NO_PMTU_DISC=39, 264 NET_IPV4_TCP_SYN_RETRIES=40, 265 NET_IPV4_IPFRAG_HIGH_THRESH=41, 266 NET_IPV4_IPFRAG_LOW_THRESH=42, 267 NET_IPV4_IPFRAG_TIME=43, 268 NET_IPV4_TCP_MAX_KA_PROBES=44, 269 NET_IPV4_TCP_KEEPALIVE_TIME=45, 270 NET_IPV4_TCP_KEEPALIVE_PROBES=46, 271 NET_IPV4_TCP_RETRIES1=47, 272 NET_IPV4_TCP_RETRIES2=48, 273 NET_IPV4_TCP_FIN_TIMEOUT=49, 274 NET_IPV4_IP_MASQ_DEBUG=50, 275 NET_TCP_SYNCOOKIES=51, 276 NET_TCP_STDURG=52, 277 NET_TCP_RFC1337=53, 278 NET_TCP_SYN_TAILDROP=54, 279 NET_TCP_MAX_SYN_BACKLOG=55, 280 NET_IPV4_LOCAL_PORT_RANGE=56, 281 NET_IPV4_ICMP_ECHO_IGNORE_ALL=57, 282 NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS=58, 283 NET_IPV4_ICMP_SOURCEQUENCH_RATE=59, 284 NET_IPV4_ICMP_DESTUNREACH_RATE=60, 285 NET_IPV4_ICMP_TIMEEXCEED_RATE=61, 286 NET_IPV4_ICMP_PARAMPROB_RATE=62, 287 NET_IPV4_ICMP_ECHOREPLY_RATE=63, 288 NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES=64, 289 NET_IPV4_IGMP_MAX_MEMBERSHIPS=65, 290 NET_TCP_TW_RECYCLE=66, 291 NET_IPV4_ALWAYS_DEFRAG=67, 292 NET_IPV4_TCP_KEEPALIVE_INTVL=68, 293 NET_IPV4_INET_PEER_THRESHOLD=69, 294 NET_IPV4_INET_PEER_MINTTL=70, 295 NET_IPV4_INET_PEER_MAXTTL=71, 296 NET_IPV4_INET_PEER_GC_MINTIME=72, 297 NET_IPV4_INET_PEER_GC_MAXTIME=73, 298 NET_TCP_ORPHAN_RETRIES=74, 299 NET_TCP_ABORT_ON_OVERFLOW=75, 300 NET_TCP_SYNACK_RETRIES=76, 301 NET_TCP_MAX_ORPHANS=77, 302 NET_TCP_MAX_TW_BUCKETS=78, 303 NET_TCP_FACK=79, 304 NET_TCP_REORDERING=80, 305 NET_TCP_ECN=81, 306 NET_TCP_DSACK=82, 307 NET_TCP_MEM=83, 308 NET_TCP_WMEM=84, 309 NET_TCP_RMEM=85, 310 NET_TCP_APP_WIN=86, 311 NET_TCP_ADV_WIN_SCALE=87, 312 NET_IPV4_NONLOCAL_BIND=88, 313 NET_IPV4_ICMP_RATELIMIT=89, 314 NET_IPV4_ICMP_RATEMASK=90, 315 NET_TCP_TW_REUSE=91, 316 NET_TCP_FRTO=92, 317 NET_TCP_LOW_LATENCY=93, 318 NET_IPV4_IPFRAG_SECRET_INTERVAL=94, 319 NET_TCP_WESTWOOD=95, 320 NET_IPV4_IGMP_MAX_MSF=96, 321 NET_TCP_NO_METRICS_SAVE=97, 322 NET_TCP_VEGAS=98, 323 NET_TCP_VEGAS_ALPHA=99, 324 NET_TCP_VEGAS_BETA=100, 325 NET_TCP_VEGAS_GAMMA=101, 326 NET_TCP_BIC=102, 327 NET_TCP_BIC_FAST_CONVERGENCE=103, 328 NET_TCP_BIC_LOW_WINDOW=104, 329 NET_TCP_DEFAULT_WIN_SCALE=105, 330 NET_TCP_MODERATE_RCVBUF=106, 331 NET_TCP_BIC_BETA=108, 332 }; 333 334 enum { 335 NET_IPV4_ROUTE_FLUSH=1, 336 NET_IPV4_ROUTE_MIN_DELAY=2, 337 NET_IPV4_ROUTE_MAX_DELAY=3, 338 NET_IPV4_ROUTE_GC_THRESH=4, 339 NET_IPV4_ROUTE_MAX_SIZE=5, 340 NET_IPV4_ROUTE_GC_MIN_INTERVAL=6, 341 NET_IPV4_ROUTE_GC_TIMEOUT=7, 342 NET_IPV4_ROUTE_GC_INTERVAL=8, 343 NET_IPV4_ROUTE_REDIRECT_LOAD=9, 344 NET_IPV4_ROUTE_REDIRECT_NUMBER=10, 345 NET_IPV4_ROUTE_REDIRECT_SILENCE=11, 346 NET_IPV4_ROUTE_ERROR_COST=12, 347 NET_IPV4_ROUTE_ERROR_BURST=13, 348 NET_IPV4_ROUTE_GC_ELASTICITY=14, 349 NET_IPV4_ROUTE_MTU_EXPIRES=15, 350 NET_IPV4_ROUTE_MIN_PMTU=16, 351 NET_IPV4_ROUTE_MIN_ADVMSS=17, 352 NET_IPV4_ROUTE_SECRET_INTERVAL=18, 353 }; 354 355 enum 356 { 357 NET_PROTO_CONF_ALL=-2, 358 NET_PROTO_CONF_DEFAULT=-3 359 360 /* And device ifindices ... */ 361 }; 362 363 enum 364 { 365 NET_IPV4_CONF_FORWARDING=1, 366 NET_IPV4_CONF_MC_FORWARDING=2, 367 NET_IPV4_CONF_PROXY_ARP=3, 368 NET_IPV4_CONF_ACCEPT_REDIRECTS=4, 369 NET_IPV4_CONF_SECURE_REDIRECTS=5, 370 NET_IPV4_CONF_SEND_REDIRECTS=6, 371 NET_IPV4_CONF_SHARED_MEDIA=7, 372 NET_IPV4_CONF_RP_FILTER=8, 373 NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE=9, 374 NET_IPV4_CONF_BOOTP_RELAY=10, 375 NET_IPV4_CONF_LOG_MARTIANS=11, 376 NET_IPV4_CONF_TAG=12, 377 NET_IPV4_CONF_ARPFILTER=13, 378 NET_IPV4_CONF_MEDIUM_ID=14, 379 NET_IPV4_CONF_FORCE_IGMP_VERSION=17, 380 NET_IPV4_CONF_ARP_ANNOUNCE=18, 381 NET_IPV4_CONF_ARP_IGNORE=19, 382 }; 383 384 /* /proc/sys/net/ipv4/netfilter */ 385 enum 386 { 387 NET_IPV4_NF_CONNTRACK_MAX=1, 388 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_SENT=2, 389 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_SYN_RECV=3, 390 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_ESTABLISHED=4, 391 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_FIN_WAIT=5, 392 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE_WAIT=6, 393 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_LAST_ACK=7, 394 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_TIME_WAIT=8, 395 NET_IPV4_NF_CONNTRACK_TCP_TIMEOUT_CLOSE=9, 396 NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT=10, 397 NET_IPV4_NF_CONNTRACK_UDP_TIMEOUT_STREAM=11, 398 NET_IPV4_NF_CONNTRACK_ICMP_TIMEOUT=12, 399 NET_IPV4_NF_CONNTRACK_GENERIC_TIMEOUT=13, 400 NET_IPV4_NF_CONNTRACK_BUCKETS=14, 401 }; 402 403 /* /proc/sys/net/ipv6 */ 404 enum { 405 NET_IPV6_CONF=16, 406 NET_IPV6_NEIGH=17, 407 NET_IPV6_ROUTE=18, 408 NET_IPV6_ICMP=19, 409 NET_IPV6_BINDV6ONLY=20, 410 NET_IPV6_MLD_MAX_MSF=25, 411 }; 412 413 enum { 414 NET_IPV6_ROUTE_FLUSH=1, 415 NET_IPV6_ROUTE_GC_THRESH=2, 416 NET_IPV6_ROUTE_MAX_SIZE=3, 417 NET_IPV6_ROUTE_GC_MIN_INTERVAL=4, 418 NET_IPV6_ROUTE_GC_TIMEOUT=5, 419 NET_IPV6_ROUTE_GC_INTERVAL=6, 420 NET_IPV6_ROUTE_GC_ELASTICITY=7, 421 NET_IPV6_ROUTE_MTU_EXPIRES=8, 422 NET_IPV6_ROUTE_MIN_ADVMSS=9 423 }; 424 425 enum { 426 NET_IPV6_FORWARDING=1, 427 NET_IPV6_HOP_LIMIT=2, 428 NET_IPV6_MTU=3, 429 NET_IPV6_ACCEPT_RA=4, 430 NET_IPV6_ACCEPT_REDIRECTS=5, 431 NET_IPV6_AUTOCONF=6, 432 NET_IPV6_DAD_TRANSMITS=7, 433 NET_IPV6_RTR_SOLICITS=8, 434 NET_IPV6_RTR_SOLICIT_INTERVAL=9, 435 NET_IPV6_RTR_SOLICIT_DELAY=10 436 }; 437 438 /* /proc/sys/net/ipv6/icmp */ 439 enum { 440 NET_IPV6_ICMP_RATELIMIT=1 441 }; 442 443 /* /proc/sys/net/<protocol>/neigh/<dev> */ 444 enum { 445 NET_NEIGH_MCAST_SOLICIT=1, 446 NET_NEIGH_UCAST_SOLICIT=2, 447 NET_NEIGH_APP_SOLICIT=3, 448 NET_NEIGH_RETRANS_TIME=4, 449 NET_NEIGH_REACHABLE_TIME=5, 450 NET_NEIGH_DELAY_PROBE_TIME=6, 451 NET_NEIGH_GC_STALE_TIME=7, 452 NET_NEIGH_UNRES_QLEN=8, 453 NET_NEIGH_PROXY_QLEN=9, 454 NET_NEIGH_ANYCAST_DELAY=10, 455 NET_NEIGH_PROXY_DELAY=11, 456 NET_NEIGH_LOCKTIME=12, 457 NET_NEIGH_GC_INTERVAL=13, 458 NET_NEIGH_GC_THRESH1=14, 459 NET_NEIGH_GC_THRESH2=15, 460 NET_NEIGH_GC_THRESH3=16 461 }; 462 463 /* /proc/sys/net/ipx */ 464 enum { 465 NET_IPX_PPROP_BROADCASTING=1, 466 NET_IPX_FORWARDING=2 467 }; 468 469 470 /* /proc/sys/net/appletalk */ 471 enum { 472 NET_ATALK_AARP_EXPIRY_TIME=1, 473 NET_ATALK_AARP_TICK_TIME=2, 474 NET_ATALK_AARP_RETRANSMIT_LIMIT=3, 475 NET_ATALK_AARP_RESOLVE_TIME=4 476 }; 477 478 479 /* /proc/sys/net/netrom */ 480 enum { 481 NET_NETROM_DEFAULT_PATH_QUALITY=1, 482 NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER=2, 483 NET_NETROM_NETWORK_TTL_INITIALISER=3, 484 NET_NETROM_TRANSPORT_TIMEOUT=4, 485 NET_NETROM_TRANSPORT_MAXIMUM_TRIES=5, 486 NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY=6, 487 NET_NETROM_TRANSPORT_BUSY_DELAY=7, 488 NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE=8, 489 NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT=9, 490 NET_NETROM_ROUTING_CONTROL=10, 491 NET_NETROM_LINK_FAILS_COUNT=11 492 }; 493 494 /* /proc/sys/net/ax25 */ 495 enum { 496 NET_AX25_IP_DEFAULT_MODE=1, 497 NET_AX25_DEFAULT_MODE=2, 498 NET_AX25_BACKOFF_TYPE=3, 499 NET_AX25_CONNECT_MODE=4, 500 NET_AX25_STANDARD_WINDOW=5, 501 NET_AX25_EXTENDED_WINDOW=6, 502 NET_AX25_T1_TIMEOUT=7, 503 NET_AX25_T2_TIMEOUT=8, 504 NET_AX25_T3_TIMEOUT=9, 505 NET_AX25_IDLE_TIMEOUT=10, 506 NET_AX25_N2=11, 507 NET_AX25_PACLEN=12, 508 NET_AX25_PROTOCOL=13, 509 NET_AX25_DAMA_SLAVE_TIMEOUT=14 510 }; 511 512 /* /proc/sys/net/rose */ 513 enum { 514 NET_ROSE_RESTART_REQUEST_TIMEOUT=1, 515 NET_ROSE_CALL_REQUEST_TIMEOUT=2, 516 NET_ROSE_RESET_REQUEST_TIMEOUT=3, 517 NET_ROSE_CLEAR_REQUEST_TIMEOUT=4, 518 NET_ROSE_ACK_HOLD_BACK_TIMEOUT=5, 519 NET_ROSE_ROUTING_CONTROL=6, 520 NET_ROSE_LINK_FAIL_TIMEOUT=7, 521 NET_ROSE_MAX_VCS=8, 522 NET_ROSE_WINDOW_SIZE=9, 523 NET_ROSE_NO_ACTIVITY_TIMEOUT=10 524 }; 525 526 /* /proc/sys/net/x25 */ 527 enum { 528 NET_X25_RESTART_REQUEST_TIMEOUT=1, 529 NET_X25_CALL_REQUEST_TIMEOUT=2, 530 NET_X25_RESET_REQUEST_TIMEOUT=3, 531 NET_X25_CLEAR_REQUEST_TIMEOUT=4, 532 NET_X25_ACK_HOLD_BACK_TIMEOUT=5 533 }; 534 535 /* /proc/sys/net/token-ring */ 536 enum 537 { 538 NET_TR_RIF_TIMEOUT=1 539 }; 540 541 /* /proc/sys/net/decnet/ */ 542 enum { 543 NET_DECNET_NODE_TYPE = 1, 544 NET_DECNET_NODE_ADDRESS = 2, 545 NET_DECNET_NODE_NAME = 3, 546 NET_DECNET_DEFAULT_DEVICE = 4, 547 NET_DECNET_TIME_WAIT = 5, 548 NET_DECNET_DN_COUNT = 6, 549 NET_DECNET_DI_COUNT = 7, 550 NET_DECNET_DR_COUNT = 8, 551 NET_DECNET_DST_GC_INTERVAL = 9, 552 NET_DECNET_CONF = 10, 553 NET_DECNET_NO_FC_MAX_CWND = 11, 554 NET_DECNET_DEBUG_LEVEL = 255 555 }; 556 557 /* /proc/sys/net/sctp */ 558 enum { 559 NET_SCTP_RTO_INITIAL = 1, 560 NET_SCTP_RTO_MIN = 2, 561 NET_SCTP_RTO_MAX = 3, 562 NET_SCTP_RTO_ALPHA = 4, 563 NET_SCTP_RTO_BETA = 5, 564 NET_SCTP_VALID_COOKIE_LIFE = 6, 565 NET_SCTP_ASSOCIATION_MAX_RETRANS = 7, 566 NET_SCTP_PATH_MAX_RETRANS = 8, 567 NET_SCTP_MAX_INIT_RETRANSMITS = 9, 568 NET_SCTP_HB_INTERVAL = 10, 569 NET_SCTP_PRESERVE_ENABLE = 11, 570 NET_SCTP_MAX_BURST = 12, 571 NET_SCTP_ADDIP_ENABLE = 13, 572 NET_SCTP_PRSCTP_ENABLE = 14, 573 }; 574 /* /proc/sys/net/khttpd/ */ 575 enum { 576 NET_KHTTPD_DOCROOT = 1, 577 NET_KHTTPD_START = 2, 578 NET_KHTTPD_STOP = 3, 579 NET_KHTTPD_UNLOAD = 4, 580 NET_KHTTPD_CLIENTPORT = 5, 581 NET_KHTTPD_PERMREQ = 6, 582 NET_KHTTPD_PERMFORBID = 7, 583 NET_KHTTPD_LOGGING = 8, 584 NET_KHTTPD_SERVERPORT = 9, 585 NET_KHTTPD_DYNAMICSTRING= 10, 586 NET_KHTTPD_SLOPPYMIME = 11, 587 NET_KHTTPD_THREADS = 12, 588 NET_KHTTPD_MAXCONNECT = 13 589 }; 590 591 /* /proc/sys/net/decnet/conf/<dev> */ 592 enum { 593 NET_DECNET_CONF_LOOPBACK = -2, 594 NET_DECNET_CONF_DDCMP = -3, 595 NET_DECNET_CONF_PPP = -4, 596 NET_DECNET_CONF_X25 = -5, 597 NET_DECNET_CONF_GRE = -6, 598 NET_DECNET_CONF_ETHER = -7 599 600 /* ... and ifindex of devices */ 601 }; 602 603 /* /proc/sys/net/decnet/conf/<dev>/ */ 604 enum { 605 NET_DECNET_CONF_DEV_PRIORITY = 1, 606 NET_DECNET_CONF_DEV_T1 = 2, 607 NET_DECNET_CONF_DEV_T2 = 3, 608 NET_DECNET_CONF_DEV_T3 = 4, 609 NET_DECNET_CONF_DEV_FORWARDING = 5, 610 NET_DECNET_CONF_DEV_BLKSIZE = 6, 611 NET_DECNET_CONF_DEV_STATE = 7 612 }; 613 614 /* CTL_PROC names: */ 615 616 /* CTL_FS names: */ 617 enum 618 { 619 FS_NRINODE=1, /* int:current number of allocated inodes */ 620 FS_STATINODE=2, 621 FS_MAXINODE=3, /* int:maximum number of inodes that can be allocated */ 622 FS_NRDQUOT=4, /* int:current number of allocated dquots */ 623 /* was FS_MAXDQUOT */ 624 FS_NRFILE=6, /* int:current number of allocated filedescriptors */ 625 FS_MAXFILE=7, /* int:maximum number of filedescriptors that can be allocated */ 626 FS_DENTRY=8, 627 FS_NRSUPER=9, /* int:current number of allocated super_blocks */ 628 FS_MAXSUPER=10, /* int:maximum number of super_blocks that can be allocated */ 629 FS_OVERFLOWUID=11, /* int: overflow UID */ 630 FS_OVERFLOWGID=12, /* int: overflow GID */ 631 FS_LEASES=13, /* int: leases enabled */ 632 FS_DIR_NOTIFY=14, /* int: directory notification enabled */ 633 FS_LEASE_TIME=15, /* int: maximum time to wait for a lease break */ 634 FS_DQSTATS=16, /* dir: disc quota usage statistics and settings */ 635 FS_XFS=17, /* struct: control xfs parameters */ 636 }; 637 638 /* /proc/sys/fs/quota/ */ 639 enum { 640 FS_DQ_LOOKUPS = 1, 641 FS_DQ_DROPS = 2, 642 FS_DQ_READS = 3, 643 FS_DQ_WRITES = 4, 644 FS_DQ_CACHE_HITS = 5, 645 FS_DQ_ALLOCATED = 6, 646 FS_DQ_FREE = 7, 647 FS_DQ_SYNCS = 8, 648 FS_DQ_WARNINGS = 9, 649 }; 650 651 /* CTL_DEBUG names: */ 652 653 /* CTL_DEV names: */ 654 enum { 655 DEV_CDROM=1, 656 DEV_HWMON=2, 657 DEV_PARPORT=3, 658 DEV_RAID=4, 659 DEV_MAC_HID=5 660 }; 661 662 /* /proc/sys/dev/cdrom */ 663 enum { 664 DEV_CDROM_INFO=1, 665 DEV_CDROM_AUTOCLOSE=2, 666 DEV_CDROM_AUTOEJECT=3, 667 DEV_CDROM_DEBUG=4, 668 DEV_CDROM_LOCK=5, 669 DEV_CDROM_CHECK_MEDIA=6 670 }; 671 672 /* /proc/sys/dev/parport */ 673 enum { 674 DEV_PARPORT_DEFAULT=-3 675 }; 676 677 /* /proc/sys/dev/raid */ 678 enum { 679 DEV_RAID_SPEED_LIMIT_MIN=1, 680 DEV_RAID_SPEED_LIMIT_MAX=2 681 }; 682 683 /* /proc/sys/dev/parport/default */ 684 enum { 685 DEV_PARPORT_DEFAULT_TIMESLICE=1, 686 DEV_PARPORT_DEFAULT_SPINTIME=2 687 }; 688 689 /* /proc/sys/dev/parport/parport n */ 690 enum { 691 DEV_PARPORT_SPINTIME=1, 692 DEV_PARPORT_BASE_ADDR=2, 693 DEV_PARPORT_IRQ=3, 694 DEV_PARPORT_DMA=4, 695 DEV_PARPORT_MODES=5, 696 DEV_PARPORT_DEVICES=6, 697 DEV_PARPORT_AUTOPROBE=16 698 }; 699 700 /* /proc/sys/dev/parport/parport n/devices/ */ 701 enum { 702 DEV_PARPORT_DEVICES_ACTIVE=-3, 703 }; 704 705 /* /proc/sys/dev/parport/parport n/devices/device n */ 706 enum { 707 DEV_PARPORT_DEVICE_TIMESLICE=1, 708 }; 709 710 /* /proc/sys/dev/mac_hid */ 711 enum { 712 DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES=1, 713 DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES=2, 714 DEV_MAC_HID_MOUSE_BUTTON_EMULATION=3, 715 DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4, 716 DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5, 717 DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6 718 }; 719 720 /* /proc/sys/abi */ 721 enum 722 { 723 ABI_DEFHANDLER_COFF=1, /* default handler for coff binaries */ 724 ABI_DEFHANDLER_ELF=2, /* default handler for ELF binaries */ 725 ABI_DEFHANDLER_LCALL7=3,/* default handler for procs using lcall7 */ 726 ABI_DEFHANDLER_LIBCSO=4,/* default handler for an libc.so ELF interp */ 727 ABI_TRACE=5, /* tracing flags */ 728 ABI_FAKE_UTSNAME=6, /* fake target utsname information */ 729 }; 730 731 #ifdef __KERNEL__ 732 733 extern asmlinkage long sys_sysctl(struct __sysctl_args *); 734 extern void sysctl_init(void); 735 736 typedef struct ctl_table ctl_table; 737 738 typedef int ctl_handler (ctl_table *table, int *name, int nlen, 739 void *oldval, size_t *oldlenp, 740 void *newval, size_t newlen, 741 void **context); 742 743 typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, 744 void *buffer, size_t *lenp); 745 746 extern int proc_dostring(ctl_table *, int, struct file *, 747 void *, size_t *); 748 extern int proc_dointvec(ctl_table *, int, struct file *, 749 void *, size_t *); 750 extern int proc_dointvec_bset(ctl_table *, int, struct file *, 751 void *, size_t *); 752 extern int proc_dointvec_minmax(ctl_table *, int, struct file *, 753 void *, size_t *); 754 extern int proc_dointvec_jiffies(ctl_table *, int, struct file *, 755 void *, size_t *); 756 extern int proc_doulongvec_minmax(ctl_table *, int, struct file *, 757 void *, size_t *); 758 extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int, 759 struct file *, void *, size_t *); 760 761 extern int do_sysctl (int *name, int nlen, 762 void *oldval, size_t *oldlenp, 763 void *newval, size_t newlen); 764 765 extern int do_sysctl_strategy (ctl_table *table, 766 int *name, int nlen, 767 void *oldval, size_t *oldlenp, 768 void *newval, size_t newlen, void ** context); 769 770 extern ctl_handler sysctl_string; 771 extern ctl_handler sysctl_intvec; 772 extern ctl_handler sysctl_jiffies; 773 774 775 /* 776 * Register a set of sysctl names by calling register_sysctl_table 777 * with an initialised array of ctl_table's. An entry with zero 778 * ctl_name terminates the table. table->de will be set up by the 779 * registration and need not be initialised in advance. 780 * 781 * sysctl names can be mirrored automatically under /proc/sys. The 782 * procname supplied controls /proc naming. 783 * 784 * The table's mode will be honoured both for sys_sysctl(2) and 785 * proc-fs access. 786 * 787 * Leaf nodes in the sysctl tree will be represented by a single file 788 * under /proc; non-leaf nodes will be represented by directories. A 789 * null procname disables /proc mirroring at this node. 790 * 791 * sysctl(2) can automatically manage read and write requests through 792 * the sysctl table. The data and maxlen fields of the ctl_table 793 * struct enable minimal validation of the values being written to be 794 * performed, and the mode field allows minimal authentication. 795 * 796 * More sophisticated management can be enabled by the provision of a 797 * strategy routine with the table entry. This will be called before 798 * any automatic read or write of the data is performed. 799 * 800 * The strategy routine may return: 801 * <0: Error occurred (error is passed to user process) 802 * 0: OK - proceed with automatic read or write. 803 * >0: OK - read or write has been done by the strategy routine, so 804 * return immediately. 805 * 806 * There must be a proc_handler routine for any terminal nodes 807 * mirrored under /proc/sys (non-terminals are handled by a built-in 808 * directory handler). Several default handlers are available to 809 * cover common cases. 810 */ 811 812 /* A sysctl table is an array of struct ctl_table: */ 813 struct ctl_table 814 { 815 int ctl_name; /* Binary ID */ 816 const char *procname; /* Text ID for /proc/sys, or zero */ 817 void *data; 818 int maxlen; 819 mode_t mode; 820 ctl_table *child; 821 proc_handler *proc_handler; /* Callback for text formatting */ 822 ctl_handler *strategy; /* Callback function for all r/w */ 823 struct proc_dir_entry *de; /* /proc control block */ 824 void *extra1; 825 void *extra2; 826 }; 827 828 /* struct ctl_table_header is used to maintain dynamic lists of 829 ctl_table trees. */ 830 struct ctl_table_header 831 { 832 ctl_table *ctl_table; 833 struct list_head ctl_entry; 834 int used; 835 struct completion *unregistering; 836 }; 837 838 struct ctl_table_header * register_sysctl_table(ctl_table * table, 839 int insert_at_head); 840 void unregister_sysctl_table(struct ctl_table_header * table); 841 842 #else /* __KERNEL__ */ 843 844 #endif /* __KERNEL__ */ 845 846 #endif /* _LINUX_SYSCTL_H */ 847