diff options
Diffstat (limited to 'include/linux/sysctl.h')
-rw-r--r-- | include/linux/sysctl.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 1b24bd45e080..6d8846e7be6d 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -6,10 +6,17 @@ | |||
6 | **************************************************************** | 6 | **************************************************************** |
7 | **************************************************************** | 7 | **************************************************************** |
8 | ** | 8 | ** |
9 | ** WARNING: | ||
9 | ** The values in this file are exported to user space via | 10 | ** The values in this file are exported to user space via |
10 | ** the sysctl() binary interface. However this interface | 11 | ** the sysctl() binary interface. Do *NOT* change the |
11 | ** is unstable and deprecated and will be removed in the future. | 12 | ** numbering of any existing values here, and do not change |
12 | ** For a stable interface use /proc/sys. | 13 | ** any numbers within any one set of values. If you have to |
14 | ** have 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 | ** For new interfaces unless you really need a binary number | ||
19 | ** please use CTL_UNNUMBERED. | ||
13 | ** | 20 | ** |
14 | **************************************************************** | 21 | **************************************************************** |
15 | **************************************************************** | 22 | **************************************************************** |
@@ -48,6 +55,7 @@ struct __sysctl_args { | |||
48 | #ifdef __KERNEL__ | 55 | #ifdef __KERNEL__ |
49 | #define CTL_ANY -1 /* Matches any name */ | 56 | #define CTL_ANY -1 /* Matches any name */ |
50 | #define CTL_NONE 0 | 57 | #define CTL_NONE 0 |
58 | #define CTL_UNNUMBERED CTL_NONE /* sysctl without a binary number */ | ||
51 | #endif | 59 | #endif |
52 | 60 | ||
53 | enum | 61 | enum |
@@ -418,6 +426,8 @@ enum | |||
418 | NET_CIPSOV4_CACHE_BUCKET_SIZE=119, | 426 | NET_CIPSOV4_CACHE_BUCKET_SIZE=119, |
419 | NET_CIPSOV4_RBM_OPTFMT=120, | 427 | NET_CIPSOV4_RBM_OPTFMT=120, |
420 | NET_CIPSOV4_RBM_STRICTVALID=121, | 428 | NET_CIPSOV4_RBM_STRICTVALID=121, |
429 | NET_TCP_AVAIL_CONG_CONTROL=122, | ||
430 | NET_TCP_ALLOWED_CONG_CONTROL=123, | ||
421 | }; | 431 | }; |
422 | 432 | ||
423 | enum { | 433 | enum { |
@@ -596,16 +606,6 @@ enum { | |||
596 | NET_DCCP_DEFAULT=1, | 606 | NET_DCCP_DEFAULT=1, |
597 | }; | 607 | }; |
598 | 608 | ||
599 | /* /proc/sys/net/dccp/default */ | ||
600 | enum { | ||
601 | NET_DCCP_DEFAULT_SEQ_WINDOW = 1, | ||
602 | NET_DCCP_DEFAULT_RX_CCID = 2, | ||
603 | NET_DCCP_DEFAULT_TX_CCID = 3, | ||
604 | NET_DCCP_DEFAULT_ACK_RATIO = 4, | ||
605 | NET_DCCP_DEFAULT_SEND_ACKVEC = 5, | ||
606 | NET_DCCP_DEFAULT_SEND_NDP = 6, | ||
607 | }; | ||
608 | |||
609 | /* /proc/sys/net/ipx */ | 609 | /* /proc/sys/net/ipx */ |
610 | enum { | 610 | enum { |
611 | NET_IPX_PPROP_BROADCASTING=1, | 611 | NET_IPX_PPROP_BROADCASTING=1, |
@@ -918,8 +918,7 @@ typedef struct ctl_table ctl_table; | |||
918 | 918 | ||
919 | typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, | 919 | typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, |
920 | void __user *oldval, size_t __user *oldlenp, | 920 | void __user *oldval, size_t __user *oldlenp, |
921 | void __user *newval, size_t newlen, | 921 | void __user *newval, size_t newlen); |
922 | void **context); | ||
923 | 922 | ||
924 | typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, | 923 | typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, |
925 | void __user *buffer, size_t *lenp, loff_t *ppos); | 924 | void __user *buffer, size_t *lenp, loff_t *ppos); |
@@ -950,7 +949,7 @@ extern int do_sysctl (int __user *name, int nlen, | |||
950 | extern int do_sysctl_strategy (ctl_table *table, | 949 | extern int do_sysctl_strategy (ctl_table *table, |
951 | int __user *name, int nlen, | 950 | int __user *name, int nlen, |
952 | void __user *oldval, size_t __user *oldlenp, | 951 | void __user *oldval, size_t __user *oldlenp, |
953 | void __user *newval, size_t newlen, void ** context); | 952 | void __user *newval, size_t newlen); |
954 | 953 | ||
955 | extern ctl_handler sysctl_string; | 954 | extern ctl_handler sysctl_string; |
956 | extern ctl_handler sysctl_intvec; | 955 | extern ctl_handler sysctl_intvec; |
@@ -961,8 +960,8 @@ extern ctl_handler sysctl_ms_jiffies; | |||
961 | /* | 960 | /* |
962 | * Register a set of sysctl names by calling register_sysctl_table | 961 | * Register a set of sysctl names by calling register_sysctl_table |
963 | * with an initialised array of ctl_table's. An entry with zero | 962 | * with an initialised array of ctl_table's. An entry with zero |
964 | * ctl_name terminates the table. table->de will be set up by the | 963 | * ctl_name and NULL procname terminates the table. table->de will be |
965 | * registration and need not be initialised in advance. | 964 | * set up by the registration and need not be initialised in advance. |
966 | * | 965 | * |
967 | * sysctl names can be mirrored automatically under /proc/sys. The | 966 | * sysctl names can be mirrored automatically under /proc/sys. The |
968 | * procname supplied controls /proc naming. | 967 | * procname supplied controls /proc naming. |
@@ -973,7 +972,10 @@ extern ctl_handler sysctl_ms_jiffies; | |||
973 | * Leaf nodes in the sysctl tree will be represented by a single file | 972 | * Leaf nodes in the sysctl tree will be represented by a single file |
974 | * under /proc; non-leaf nodes will be represented by directories. A | 973 | * under /proc; non-leaf nodes will be represented by directories. A |
975 | * null procname disables /proc mirroring at this node. | 974 | * null procname disables /proc mirroring at this node. |
976 | * | 975 | * |
976 | * sysctl entries with a zero ctl_name will not be available through | ||
977 | * the binary sysctl interface. | ||
978 | * | ||
977 | * sysctl(2) can automatically manage read and write requests through | 979 | * sysctl(2) can automatically manage read and write requests through |
978 | * the sysctl table. The data and maxlen fields of the ctl_table | 980 | * the sysctl table. The data and maxlen fields of the ctl_table |
979 | * struct enable minimal validation of the values being written to be | 981 | * struct enable minimal validation of the values being written to be |