2 * sysctl.h: General linux system control interface
4 * Begun 24 March 1995, Stephen Tweedie
6 ****************************************************************
7 ****************************************************************
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.
20 ****************************************************************
21 ****************************************************************
24 #ifndef _LINUX_SYSCTL_H
25 #define _LINUX_SYSCTL_H
27 #include <linux/kernel.h>
28 #include <linux/types.h>
29 #include <linux/list.h>
33 #define CTL_MAXNAME 10
35 struct __sysctl_args
{
42 unsigned long __unused
[4];
45 /* Define sysctl names first */
47 /* Top-level names: */
49 /* For internal pattern-matching use only: */
51 #define CTL_ANY -1 /* Matches any name */
57 CTL_KERN
=1, /* General kernel info and control */
58 CTL_VM
=2, /* VM management */
59 CTL_NET
=3, /* Networking */
60 CTL_PROC
=4, /* Process info */
61 CTL_FS
=5, /* Filesystems */
62 CTL_DEBUG
=6, /* Debugging */
63 CTL_DEV
=7, /* Devices */
76 KERN_OSTYPE
=1, /* string: system version */
77 KERN_OSRELEASE
=2, /* string: system release */
78 KERN_OSREV
=3, /* int: system revision */
79 KERN_VERSION
=4, /* string: compile time info */
80 KERN_SECUREMASK
=5, /* struct: maximum rights mask */
81 KERN_PROF
=6, /* table: profiling information */
85 KERN_CAP_BSET
=14, /* int: capability bounding set */
86 KERN_PANIC
=15, /* int: panic timeout */
87 KERN_REALROOTDEV
=16, /* real root device to mount after initrd */
89 KERN_SPARC_REBOOT
=21, /* reboot command on Sparc */
90 KERN_CTLALTDEL
=22, /* int: allow ctl-alt-del to reboot */
91 KERN_PRINTK
=23, /* struct: control printk logging parameters */
92 KERN_NAMETRANS
=24, /* Name translation */
93 KERN_PPC_HTABRECLAIM
=25, /* turn htab reclaimation on/off on PPC */
94 KERN_PPC_ZEROPAGED
=26, /* turn idle page zeroing on/off on PPC */
95 KERN_PPC_POWERSAVE_NAP
=27, /* use nap mode for power saving */
98 KERN_ACCT
=30, /* BSD process accounting parameters */
99 KERN_PPC_L2CR
=31, /* l2cr register on PPC */
101 KERN_RTSIGNR
=32, /* Number of rt sigs queued */
102 KERN_RTSIGMAX
=33, /* Max queuable */
104 KERN_SHMMAX
=34, /* long: Maximum shared memory segment */
105 KERN_MSGMAX
=35, /* int: Maximum size of a messege */
106 KERN_MSGMNB
=36, /* int: Maximum message queue size */
107 KERN_MSGPOOL
=37, /* int: Maximum system message pool size */
108 KERN_SYSRQ
=38, /* int: Sysreq enable */
109 KERN_MAX_THREADS
=39, /* int: Maximum nr of threads in the system */
110 KERN_RANDOM
=40, /* Random driver */
111 KERN_SHMALL
=41, /* int: Maximum size of shared memory */
112 KERN_MSGMNI
=42, /* int: msg queue identifiers */
113 KERN_SEM
=43, /* struct: sysv semaphore limits */
114 KERN_SPARC_STOP_A
=44, /* int: Sparc Stop-A enable */
115 KERN_SHMMNI
=45, /* int: shm array identifiers */
116 KERN_OVERFLOWUID
=46, /* int: overflow UID */
117 KERN_OVERFLOWGID
=47, /* int: overflow GID */
118 KERN_SHMPATH
=48, /* string: path to shm fs */
119 KERN_HOTPLUG
=49, /* string: path to hotplug policy agent */
126 VM_SWAPCTL
=1, /* struct: Set vm swapping control */
127 VM_SWAPOUT
=2, /* int: Linear or sqrt() swapout for hogs */
128 VM_FREEPG
=3, /* struct: Set free page thresholds */
129 VM_BDFLUSH
=4, /* struct: Control buffer cache flushing */
130 VM_OVERCOMMIT_MEMORY
=5, /* Turn off the virtual memory safety limit */
131 VM_BUFFERMEM
=6, /* struct: Set buffer memory thresholds */
132 VM_PAGECACHE
=7, /* struct: Set cache memory thresholds */
133 VM_PAGERDAEMON
=8, /* struct: Control kswapd behaviour */
134 VM_PGT_CACHE
=9, /* struct: Set page table cache parameters */
135 VM_PAGE_CLUSTER
=10 /* int: set number of pages to swap together */
161 /* /proc/sys/kernel/random */
165 RANDOM_ENTROPY_COUNT
=2,
166 RANDOM_READ_THRESH
=3,
167 RANDOM_WRITE_THRESH
=4,
172 /* /proc/sys/bus/isa */
180 /* /proc/sys/net/core */
185 NET_CORE_WMEM_DEFAULT
=3,
186 NET_CORE_RMEM_DEFAULT
=4,
187 /* was NET_CORE_DESTROY_DELAY */
188 NET_CORE_MAX_BACKLOG
=6,
189 NET_CORE_FASTROUTE
=7,
191 NET_CORE_MSG_BURST
=9,
192 NET_CORE_OPTMEM_MAX
=10,
193 NET_CORE_HOT_LIST_LENGTH
=11,
194 NET_CORE_DIVERT_VERSION
=12,
195 NET_CORE_NO_CONG_THRESH
=13,
201 /* /proc/sys/net/ethernet */
203 /* /proc/sys/net/802 */
205 /* /proc/sys/net/unix */
209 NET_UNIX_DESTROY_DELAY
=1,
210 NET_UNIX_DELETE_DELAY
=2,
211 NET_UNIX_MAX_DGRAM_QLEN
=3,
214 /* /proc/sys/net/ipv4 */
217 /* v2.0 compatibile variables */
224 NET_IPV4_FIB_HASH
=19,
226 NET_IPV4_TCP_TIMESTAMPS
=33,
227 NET_IPV4_TCP_WINDOW_SCALING
=34,
228 NET_IPV4_TCP_SACK
=35,
229 NET_IPV4_TCP_RETRANS_COLLAPSE
=36,
230 NET_IPV4_DEFAULT_TTL
=37,
231 NET_IPV4_AUTOCONFIG
=38,
232 NET_IPV4_NO_PMTU_DISC
=39,
233 NET_IPV4_TCP_SYN_RETRIES
=40,
234 NET_IPV4_IPFRAG_HIGH_THRESH
=41,
235 NET_IPV4_IPFRAG_LOW_THRESH
=42,
236 NET_IPV4_IPFRAG_TIME
=43,
237 NET_IPV4_TCP_MAX_KA_PROBES
=44,
238 NET_IPV4_TCP_KEEPALIVE_TIME
=45,
239 NET_IPV4_TCP_KEEPALIVE_PROBES
=46,
240 NET_IPV4_TCP_RETRIES1
=47,
241 NET_IPV4_TCP_RETRIES2
=48,
242 NET_IPV4_TCP_FIN_TIMEOUT
=49,
243 NET_IPV4_IP_MASQ_DEBUG
=50,
244 NET_TCP_SYNCOOKIES
=51,
247 NET_TCP_SYN_TAILDROP
=54,
248 NET_TCP_MAX_SYN_BACKLOG
=55,
249 NET_IPV4_LOCAL_PORT_RANGE
=56,
250 NET_IPV4_ICMP_ECHO_IGNORE_ALL
=57,
251 NET_IPV4_ICMP_ECHO_IGNORE_BROADCASTS
=58,
252 NET_IPV4_ICMP_SOURCEQUENCH_RATE
=59,
253 NET_IPV4_ICMP_DESTUNREACH_RATE
=60,
254 NET_IPV4_ICMP_TIMEEXCEED_RATE
=61,
255 NET_IPV4_ICMP_PARAMPROB_RATE
=62,
256 NET_IPV4_ICMP_ECHOREPLY_RATE
=63,
257 NET_IPV4_ICMP_IGNORE_BOGUS_ERROR_RESPONSES
=64,
258 NET_IPV4_IGMP_MAX_MEMBERSHIPS
=65,
259 NET_TCP_TW_RECYCLE
=66,
260 NET_IPV4_ALWAYS_DEFRAG
=67,
261 NET_IPV4_TCP_KEEPALIVE_INTVL
=68,
262 NET_IPV4_INET_PEER_THRESHOLD
=69,
263 NET_IPV4_INET_PEER_MINTTL
=70,
264 NET_IPV4_INET_PEER_MAXTTL
=71,
265 NET_IPV4_INET_PEER_GC_MINTIME
=72,
266 NET_IPV4_INET_PEER_GC_MAXTIME
=73,
267 NET_TCP_ORPHAN_RETRIES
=74,
268 NET_TCP_ABORT_ON_OVERFLOW
=75,
269 NET_TCP_SYNACK_RETRIES
=76,
270 NET_TCP_MAX_ORPHANS
=77,
271 NET_TCP_MAX_TW_BUCKETS
=78,
273 NET_TCP_REORDERING
=80,
280 NET_TCP_ADV_WIN_SCALE
=87,
281 NET_IPV4_NONLOCAL_BIND
=88,
285 NET_IPV4_ROUTE_FLUSH
=1,
286 NET_IPV4_ROUTE_MIN_DELAY
=2,
287 NET_IPV4_ROUTE_MAX_DELAY
=3,
288 NET_IPV4_ROUTE_GC_THRESH
=4,
289 NET_IPV4_ROUTE_MAX_SIZE
=5,
290 NET_IPV4_ROUTE_GC_MIN_INTERVAL
=6,
291 NET_IPV4_ROUTE_GC_TIMEOUT
=7,
292 NET_IPV4_ROUTE_GC_INTERVAL
=8,
293 NET_IPV4_ROUTE_REDIRECT_LOAD
=9,
294 NET_IPV4_ROUTE_REDIRECT_NUMBER
=10,
295 NET_IPV4_ROUTE_REDIRECT_SILENCE
=11,
296 NET_IPV4_ROUTE_ERROR_COST
=12,
297 NET_IPV4_ROUTE_ERROR_BURST
=13,
298 NET_IPV4_ROUTE_GC_ELASTICITY
=14,
299 NET_IPV4_ROUTE_MTU_EXPIRES
=15,
300 NET_IPV4_ROUTE_MIN_PMTU
=16,
301 NET_IPV4_ROUTE_MIN_ADVMSS
=17
306 NET_PROTO_CONF_ALL
=-2,
307 NET_PROTO_CONF_DEFAULT
=-3
309 /* And device ifindices ... */
314 NET_IPV4_CONF_FORWARDING
=1,
315 NET_IPV4_CONF_MC_FORWARDING
=2,
316 NET_IPV4_CONF_PROXY_ARP
=3,
317 NET_IPV4_CONF_ACCEPT_REDIRECTS
=4,
318 NET_IPV4_CONF_SECURE_REDIRECTS
=5,
319 NET_IPV4_CONF_SEND_REDIRECTS
=6,
320 NET_IPV4_CONF_SHARED_MEDIA
=7,
321 NET_IPV4_CONF_RP_FILTER
=8,
322 NET_IPV4_CONF_ACCEPT_SOURCE_ROUTE
=9,
323 NET_IPV4_CONF_BOOTP_RELAY
=10,
324 NET_IPV4_CONF_LOG_MARTIANS
=11,
328 /* /proc/sys/net/ipv6 */
336 NET_IPV6_ROUTE_FLUSH
=1,
337 NET_IPV6_ROUTE_GC_THRESH
=2,
338 NET_IPV6_ROUTE_MAX_SIZE
=3,
339 NET_IPV6_ROUTE_GC_MIN_INTERVAL
=4,
340 NET_IPV6_ROUTE_GC_TIMEOUT
=5,
341 NET_IPV6_ROUTE_GC_INTERVAL
=6,
342 NET_IPV6_ROUTE_GC_ELASTICITY
=7,
343 NET_IPV6_ROUTE_MTU_EXPIRES
=8,
344 NET_IPV6_ROUTE_MIN_ADVMSS
=9
348 NET_IPV6_FORWARDING
=1,
349 NET_IPV6_HOP_LIMIT
=2,
351 NET_IPV6_ACCEPT_RA
=4,
352 NET_IPV6_ACCEPT_REDIRECTS
=5,
354 NET_IPV6_DAD_TRANSMITS
=7,
355 NET_IPV6_RTR_SOLICITS
=8,
356 NET_IPV6_RTR_SOLICIT_INTERVAL
=9,
357 NET_IPV6_RTR_SOLICIT_DELAY
=10
360 /* /proc/sys/net/<protocol>/neigh/<dev> */
362 NET_NEIGH_MCAST_SOLICIT
=1,
363 NET_NEIGH_UCAST_SOLICIT
=2,
364 NET_NEIGH_APP_SOLICIT
=3,
365 NET_NEIGH_RETRANS_TIME
=4,
366 NET_NEIGH_REACHABLE_TIME
=5,
367 NET_NEIGH_DELAY_PROBE_TIME
=6,
368 NET_NEIGH_GC_STALE_TIME
=7,
369 NET_NEIGH_UNRES_QLEN
=8,
370 NET_NEIGH_PROXY_QLEN
=9,
371 NET_NEIGH_ANYCAST_DELAY
=10,
372 NET_NEIGH_PROXY_DELAY
=11,
373 NET_NEIGH_LOCKTIME
=12,
374 NET_NEIGH_GC_INTERVAL
=13,
375 NET_NEIGH_GC_THRESH1
=14,
376 NET_NEIGH_GC_THRESH2
=15,
377 NET_NEIGH_GC_THRESH3
=16
380 /* /proc/sys/net/ipx */
383 /* /proc/sys/net/appletalk */
385 NET_ATALK_AARP_EXPIRY_TIME
=1,
386 NET_ATALK_AARP_TICK_TIME
=2,
387 NET_ATALK_AARP_RETRANSMIT_LIMIT
=3,
388 NET_ATALK_AARP_RESOLVE_TIME
=4
392 /* /proc/sys/net/netrom */
394 NET_NETROM_DEFAULT_PATH_QUALITY
=1,
395 NET_NETROM_OBSOLESCENCE_COUNT_INITIALISER
=2,
396 NET_NETROM_NETWORK_TTL_INITIALISER
=3,
397 NET_NETROM_TRANSPORT_TIMEOUT
=4,
398 NET_NETROM_TRANSPORT_MAXIMUM_TRIES
=5,
399 NET_NETROM_TRANSPORT_ACKNOWLEDGE_DELAY
=6,
400 NET_NETROM_TRANSPORT_BUSY_DELAY
=7,
401 NET_NETROM_TRANSPORT_REQUESTED_WINDOW_SIZE
=8,
402 NET_NETROM_TRANSPORT_NO_ACTIVITY_TIMEOUT
=9,
403 NET_NETROM_ROUTING_CONTROL
=10,
404 NET_NETROM_LINK_FAILS_COUNT
=11
407 /* /proc/sys/net/ax25 */
409 NET_AX25_IP_DEFAULT_MODE
=1,
410 NET_AX25_DEFAULT_MODE
=2,
411 NET_AX25_BACKOFF_TYPE
=3,
412 NET_AX25_CONNECT_MODE
=4,
413 NET_AX25_STANDARD_WINDOW
=5,
414 NET_AX25_EXTENDED_WINDOW
=6,
415 NET_AX25_T1_TIMEOUT
=7,
416 NET_AX25_T2_TIMEOUT
=8,
417 NET_AX25_T3_TIMEOUT
=9,
418 NET_AX25_IDLE_TIMEOUT
=10,
421 NET_AX25_PROTOCOL
=13,
422 NET_AX25_DAMA_SLAVE_TIMEOUT
=14
425 /* /proc/sys/net/rose */
427 NET_ROSE_RESTART_REQUEST_TIMEOUT
=1,
428 NET_ROSE_CALL_REQUEST_TIMEOUT
=2,
429 NET_ROSE_RESET_REQUEST_TIMEOUT
=3,
430 NET_ROSE_CLEAR_REQUEST_TIMEOUT
=4,
431 NET_ROSE_ACK_HOLD_BACK_TIMEOUT
=5,
432 NET_ROSE_ROUTING_CONTROL
=6,
433 NET_ROSE_LINK_FAIL_TIMEOUT
=7,
435 NET_ROSE_WINDOW_SIZE
=9,
436 NET_ROSE_NO_ACTIVITY_TIMEOUT
=10
439 /* /proc/sys/net/x25 */
441 NET_X25_RESTART_REQUEST_TIMEOUT
=1,
442 NET_X25_CALL_REQUEST_TIMEOUT
=2,
443 NET_X25_RESET_REQUEST_TIMEOUT
=3,
444 NET_X25_CLEAR_REQUEST_TIMEOUT
=4,
445 NET_X25_ACK_HOLD_BACK_TIMEOUT
=5
448 /* /proc/sys/net/token-ring */
454 /* /proc/sys/net/decnet/ */
456 NET_DECNET_NODE_TYPE
= 1,
457 NET_DECNET_NODE_ADDRESS
= 2,
458 NET_DECNET_NODE_NAME
= 3,
459 NET_DECNET_DEFAULT_DEVICE
= 4,
460 NET_DECNET_TIME_WAIT
= 5,
461 NET_DECNET_DN_COUNT
= 6,
462 NET_DECNET_DI_COUNT
= 7,
463 NET_DECNET_DR_COUNT
= 8,
464 NET_DECNET_DST_GC_INTERVAL
= 9,
465 NET_DECNET_CONF
= 10,
466 NET_DECNET_DEBUG_LEVEL
= 255
469 /* /proc/sys/net/khttpd/ */
471 NET_KHTTPD_DOCROOT
= 1,
472 NET_KHTTPD_START
= 2,
474 NET_KHTTPD_UNLOAD
= 4,
475 NET_KHTTPD_CLIENTPORT
= 5,
476 NET_KHTTPD_PERMREQ
= 6,
477 NET_KHTTPD_PERMFORBID
= 7,
478 NET_KHTTPD_LOGGING
= 8,
479 NET_KHTTPD_SERVERPORT
= 9,
480 NET_KHTTPD_DYNAMICSTRING
= 10,
481 NET_KHTTPD_SLOPPYMIME
= 11,
482 NET_KHTTPD_THREADS
= 12,
483 NET_KHTTPD_MAXCONNECT
= 13
486 /* /proc/sys/net/decnet/conf/<dev> */
488 NET_DECNET_CONF_LOOPBACK
= -2,
489 NET_DECNET_CONF_DDCMP
= -3,
490 NET_DECNET_CONF_PPP
= -4,
491 NET_DECNET_CONF_X25
= -5,
492 NET_DECNET_CONF_GRE
= -6,
493 NET_DECNET_CONF_ETHER
= -7
495 /* ... and ifindex of devices */
498 /* /proc/sys/net/decnet/conf/<dev>/ */
500 NET_DECNET_CONF_DEV_PRIORITY
= 1,
501 NET_DECNET_CONF_DEV_T1
= 2,
502 NET_DECNET_CONF_DEV_T2
= 3,
503 NET_DECNET_CONF_DEV_T3
= 4,
504 NET_DECNET_CONF_DEV_FORWARDING
= 5,
505 NET_DECNET_CONF_DEV_BLKSIZE
= 6,
506 NET_DECNET_CONF_DEV_STATE
= 7
509 /* CTL_PROC names: */
514 FS_NRINODE
=1, /* int:current number of allocated inodes */
516 FS_MAXINODE
=3, /* int:maximum number of inodes that can be allocated */
517 FS_NRDQUOT
=4, /* int:current number of allocated dquots */
518 FS_MAXDQUOT
=5, /* int:maximum number of dquots that can be allocated */
519 FS_NRFILE
=6, /* int:current number of allocated filedescriptors */
520 FS_MAXFILE
=7, /* int:maximum number of filedescriptors that can be allocated */
522 FS_NRSUPER
=9, /* int:current number of allocated super_blocks */
523 FS_MAXSUPER
=10, /* int:maximum number of super_blocks that can be allocated */
524 FS_OVERFLOWUID
=11, /* int: overflow UID */
525 FS_OVERFLOWGID
=12, /* int: overflow GID */
526 FS_LEASES
=13, /* int: leases enabled */
527 FS_DIR_NOTIFY
=14, /* int: directory notification enabled */
528 FS_LEASE_TIME
=15, /* int: maximum time to wait for a lease break */
531 /* CTL_DEBUG names: */
542 /* /proc/sys/dev/cdrom */
545 DEV_CDROM_AUTOCLOSE
=2,
546 DEV_CDROM_AUTOEJECT
=3,
549 DEV_CDROM_CHECK_MEDIA
=6
552 /* /proc/sys/dev/parport */
554 DEV_PARPORT_DEFAULT
=-3
557 /* /proc/sys/dev/raid */
559 DEV_RAID_SPEED_LIMIT_MIN
=1,
560 DEV_RAID_SPEED_LIMIT_MAX
=2
563 /* /proc/sys/dev/parport/default */
565 DEV_PARPORT_DEFAULT_TIMESLICE
=1,
566 DEV_PARPORT_DEFAULT_SPINTIME
=2
569 /* /proc/sys/dev/parport/parport n */
571 DEV_PARPORT_SPINTIME
=1,
572 DEV_PARPORT_BASE_ADDR
=2,
576 DEV_PARPORT_DEVICES
=6,
577 DEV_PARPORT_AUTOPROBE
=16
580 /* /proc/sys/dev/parport/parport n/devices/ */
582 DEV_PARPORT_DEVICES_ACTIVE
=-3,
585 /* /proc/sys/dev/parport/parport n/devices/device n */
587 DEV_PARPORT_DEVICE_TIMESLICE
=1,
590 /* /proc/sys/dev/mac_hid */
592 DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES
=1,
593 DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES
=2,
594 DEV_MAC_HID_MOUSE_BUTTON_EMULATION
=3,
595 DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE
=4,
596 DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE
=5,
597 DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES
=6
602 extern asmlinkage
long sys_sysctl(struct __sysctl_args
*);
603 extern void sysctl_init(void);
605 typedef struct ctl_table ctl_table
;
607 typedef int ctl_handler (ctl_table
*table
, int *name
, int nlen
,
608 void *oldval
, size_t *oldlenp
,
609 void *newval
, size_t newlen
,
612 typedef int proc_handler (ctl_table
*ctl
, int write
, struct file
* filp
,
613 void *buffer
, size_t *lenp
);
615 extern int proc_dostring(ctl_table
*, int, struct file
*,
617 extern int proc_dointvec(ctl_table
*, int, struct file
*,
619 extern int proc_dointvec_bset(ctl_table
*, int, struct file
*,
621 extern int proc_dointvec_minmax(ctl_table
*, int, struct file
*,
623 extern int proc_dointvec_jiffies(ctl_table
*, int, struct file
*,
625 extern int proc_doulongvec_minmax(ctl_table
*, int, struct file
*,
627 extern int proc_doulongvec_ms_jiffies_minmax(ctl_table
*table
, int,
628 struct file
*, void *, size_t *);
630 extern int do_sysctl (int *name
, int nlen
,
631 void *oldval
, size_t *oldlenp
,
632 void *newval
, size_t newlen
);
634 extern int do_sysctl_strategy (ctl_table
*table
,
636 void *oldval
, size_t *oldlenp
,
637 void *newval
, size_t newlen
, void ** context
);
639 extern ctl_handler sysctl_string
;
640 extern ctl_handler sysctl_intvec
;
641 extern ctl_handler sysctl_jiffies
;
645 * Register a set of sysctl names by calling register_sysctl_table
646 * with an initialised array of ctl_table's. An entry with zero
647 * ctl_name terminates the table. table->de will be set up by the
648 * registration and need not be initialised in advance.
650 * sysctl names can be mirrored automatically under /proc/sys. The
651 * procname supplied controls /proc naming.
653 * The table's mode will be honoured both for sys_sysctl(2) and
656 * Leaf nodes in the sysctl tree will be represented by a single file
657 * under /proc; non-leaf nodes will be represented by directories. A
658 * null procname disables /proc mirroring at this node.
660 * sysctl(2) can automatically manage read and write requests through
661 * the sysctl table. The data and maxlen fields of the ctl_table
662 * struct enable minimal validation of the values being written to be
663 * performed, and the mode field allows minimal authentication.
665 * More sophisticated management can be enabled by the provision of a
666 * strategy routine with the table entry. This will be called before
667 * any automatic read or write of the data is performed.
669 * The strategy routine may return:
670 * <0: Error occurred (error is passed to user process)
671 * 0: OK - proceed with automatic read or write.
672 * >0: OK - read or write has been done by the strategy routine, so
673 * return immediately.
675 * There must be a proc_handler routine for any terminal nodes
676 * mirrored under /proc/sys (non-terminals are handled by a built-in
677 * directory handler). Several default handlers are available to
678 * cover common cases.
681 /* A sysctl table is an array of struct ctl_table: */
684 int ctl_name
; /* Binary ID */
685 const char *procname
; /* Text ID for /proc/sys, or zero */
690 proc_handler
*proc_handler
; /* Callback for text formatting */
691 ctl_handler
*strategy
; /* Callback function for all r/w */
692 struct proc_dir_entry
*de
; /* /proc control block */
697 /* struct ctl_table_header is used to maintain dynamic lists of
699 struct ctl_table_header
701 ctl_table
*ctl_table
;
702 struct list_head ctl_entry
;
705 struct ctl_table_header
* register_sysctl_table(ctl_table
* table
,
707 void unregister_sysctl_table(struct ctl_table_header
* table
);
709 #else /* __KERNEL__ */
711 #endif /* __KERNEL__ */
713 #endif /* _LINUX_SYSCTL_H */