diff options
Diffstat (limited to 'include/linux/sysctl.h')
-rw-r--r-- | include/linux/sysctl.h | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 483050c924c3..e99171f01b4c 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -238,6 +238,7 @@ enum | |||
238 | NET_LLC=18, | 238 | NET_LLC=18, |
239 | NET_NETFILTER=19, | 239 | NET_NETFILTER=19, |
240 | NET_DCCP=20, | 240 | NET_DCCP=20, |
241 | NET_IRDA=412, | ||
241 | }; | 242 | }; |
242 | 243 | ||
243 | /* /proc/sys/kernel/random */ | 244 | /* /proc/sys/kernel/random */ |
@@ -795,6 +796,25 @@ enum { | |||
795 | NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5, | 796 | NET_BRIDGE_NF_FILTER_PPPOE_TAGGED = 5, |
796 | }; | 797 | }; |
797 | 798 | ||
799 | /* proc/sys/net/irda */ | ||
800 | enum { | ||
801 | NET_IRDA_DISCOVERY=1, | ||
802 | NET_IRDA_DEVNAME=2, | ||
803 | NET_IRDA_DEBUG=3, | ||
804 | NET_IRDA_FAST_POLL=4, | ||
805 | NET_IRDA_DISCOVERY_SLOTS=5, | ||
806 | NET_IRDA_DISCOVERY_TIMEOUT=6, | ||
807 | NET_IRDA_SLOT_TIMEOUT=7, | ||
808 | NET_IRDA_MAX_BAUD_RATE=8, | ||
809 | NET_IRDA_MIN_TX_TURN_TIME=9, | ||
810 | NET_IRDA_MAX_TX_DATA_SIZE=10, | ||
811 | NET_IRDA_MAX_TX_WINDOW=11, | ||
812 | NET_IRDA_MAX_NOREPLY_TIME=12, | ||
813 | NET_IRDA_WARN_NOREPLY_TIME=13, | ||
814 | NET_IRDA_LAP_KEEPALIVE_TIME=14, | ||
815 | }; | ||
816 | |||
817 | |||
798 | /* CTL_FS names: */ | 818 | /* CTL_FS names: */ |
799 | enum | 819 | enum |
800 | { | 820 | { |
@@ -937,41 +957,42 @@ extern int sysctl_perm(struct ctl_table *table, int op); | |||
937 | 957 | ||
938 | typedef struct ctl_table ctl_table; | 958 | typedef struct ctl_table ctl_table; |
939 | 959 | ||
940 | typedef int ctl_handler (ctl_table *table, int __user *name, int nlen, | 960 | typedef int ctl_handler (struct ctl_table *table, int __user *name, int nlen, |
941 | void __user *oldval, size_t __user *oldlenp, | 961 | void __user *oldval, size_t __user *oldlenp, |
942 | void __user *newval, size_t newlen); | 962 | void __user *newval, size_t newlen); |
943 | 963 | ||
944 | typedef int proc_handler (ctl_table *ctl, int write, struct file * filp, | 964 | typedef int proc_handler (struct ctl_table *ctl, int write, struct file * filp, |
945 | void __user *buffer, size_t *lenp, loff_t *ppos); | 965 | void __user *buffer, size_t *lenp, loff_t *ppos); |
946 | 966 | ||
947 | extern int proc_dostring(ctl_table *, int, struct file *, | 967 | extern int proc_dostring(struct ctl_table *, int, struct file *, |
948 | void __user *, size_t *, loff_t *); | 968 | void __user *, size_t *, loff_t *); |
949 | extern int proc_dointvec(ctl_table *, int, struct file *, | 969 | extern int proc_dointvec(struct ctl_table *, int, struct file *, |
950 | void __user *, size_t *, loff_t *); | 970 | void __user *, size_t *, loff_t *); |
951 | extern int proc_dointvec_bset(ctl_table *, int, struct file *, | 971 | extern int proc_dointvec_bset(struct ctl_table *, int, struct file *, |
952 | void __user *, size_t *, loff_t *); | 972 | void __user *, size_t *, loff_t *); |
953 | extern int proc_dointvec_minmax(ctl_table *, int, struct file *, | 973 | extern int proc_dointvec_minmax(struct ctl_table *, int, struct file *, |
954 | void __user *, size_t *, loff_t *); | 974 | void __user *, size_t *, loff_t *); |
955 | extern int proc_dointvec_jiffies(ctl_table *, int, struct file *, | 975 | extern int proc_dointvec_jiffies(struct ctl_table *, int, struct file *, |
956 | void __user *, size_t *, loff_t *); | 976 | void __user *, size_t *, loff_t *); |
957 | extern int proc_dointvec_userhz_jiffies(ctl_table *, int, struct file *, | 977 | extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, struct file *, |
958 | void __user *, size_t *, loff_t *); | 978 | void __user *, size_t *, loff_t *); |
959 | extern int proc_dointvec_ms_jiffies(ctl_table *, int, struct file *, | 979 | extern int proc_dointvec_ms_jiffies(struct ctl_table *, int, struct file *, |
960 | void __user *, size_t *, loff_t *); | 980 | void __user *, size_t *, loff_t *); |
961 | extern int proc_doulongvec_minmax(ctl_table *, int, struct file *, | 981 | extern int proc_doulongvec_minmax(struct ctl_table *, int, struct file *, |
962 | void __user *, size_t *, loff_t *); | 982 | void __user *, size_t *, loff_t *); |
963 | extern int proc_doulongvec_ms_jiffies_minmax(ctl_table *table, int, | 983 | extern int proc_doulongvec_ms_jiffies_minmax(struct ctl_table *table, int, |
964 | struct file *, void __user *, size_t *, loff_t *); | 984 | struct file *, void __user *, size_t *, loff_t *); |
965 | 985 | ||
966 | extern int do_sysctl (int __user *name, int nlen, | 986 | extern int do_sysctl (int __user *name, int nlen, |
967 | void __user *oldval, size_t __user *oldlenp, | 987 | void __user *oldval, size_t __user *oldlenp, |
968 | void __user *newval, size_t newlen); | 988 | void __user *newval, size_t newlen); |
969 | 989 | ||
970 | extern int do_sysctl_strategy (ctl_table *table, | 990 | extern int do_sysctl_strategy (struct ctl_table *table, |
971 | int __user *name, int nlen, | 991 | int __user *name, int nlen, |
972 | void __user *oldval, size_t __user *oldlenp, | 992 | void __user *oldval, size_t __user *oldlenp, |
973 | void __user *newval, size_t newlen); | 993 | void __user *newval, size_t newlen); |
974 | 994 | ||
995 | extern ctl_handler sysctl_data; | ||
975 | extern ctl_handler sysctl_string; | 996 | extern ctl_handler sysctl_string; |
976 | extern ctl_handler sysctl_intvec; | 997 | extern ctl_handler sysctl_intvec; |
977 | extern ctl_handler sysctl_jiffies; | 998 | extern ctl_handler sysctl_jiffies; |
@@ -980,7 +1001,7 @@ extern ctl_handler sysctl_ms_jiffies; | |||
980 | 1001 | ||
981 | /* | 1002 | /* |
982 | * Register a set of sysctl names by calling register_sysctl_table | 1003 | * Register a set of sysctl names by calling register_sysctl_table |
983 | * with an initialised array of ctl_table's. An entry with zero | 1004 | * with an initialised array of struct ctl_table's. An entry with zero |
984 | * ctl_name and NULL procname terminates the table. table->de will be | 1005 | * ctl_name and NULL procname terminates the table. table->de will be |
985 | * set up by the registration and need not be initialised in advance. | 1006 | * set up by the registration and need not be initialised in advance. |
986 | * | 1007 | * |
@@ -1026,8 +1047,8 @@ struct ctl_table | |||
1026 | void *data; | 1047 | void *data; |
1027 | int maxlen; | 1048 | int maxlen; |
1028 | mode_t mode; | 1049 | mode_t mode; |
1029 | ctl_table *child; | 1050 | struct ctl_table *child; |
1030 | ctl_table *parent; /* Automatically set */ | 1051 | struct ctl_table *parent; /* Automatically set */ |
1031 | proc_handler *proc_handler; /* Callback for text formatting */ | 1052 | proc_handler *proc_handler; /* Callback for text formatting */ |
1032 | ctl_handler *strategy; /* Callback function for all r/w */ | 1053 | ctl_handler *strategy; /* Callback function for all r/w */ |
1033 | void *extra1; | 1054 | void *extra1; |
@@ -1035,18 +1056,19 @@ struct ctl_table | |||
1035 | }; | 1056 | }; |
1036 | 1057 | ||
1037 | /* struct ctl_table_header is used to maintain dynamic lists of | 1058 | /* struct ctl_table_header is used to maintain dynamic lists of |
1038 | ctl_table trees. */ | 1059 | struct ctl_table trees. */ |
1039 | struct ctl_table_header | 1060 | struct ctl_table_header |
1040 | { | 1061 | { |
1041 | ctl_table *ctl_table; | 1062 | struct ctl_table *ctl_table; |
1042 | struct list_head ctl_entry; | 1063 | struct list_head ctl_entry; |
1043 | int used; | 1064 | int used; |
1044 | struct completion *unregistering; | 1065 | struct completion *unregistering; |
1045 | }; | 1066 | }; |
1046 | 1067 | ||
1047 | struct ctl_table_header * register_sysctl_table(ctl_table * table); | 1068 | struct ctl_table_header *register_sysctl_table(struct ctl_table * table); |
1048 | 1069 | ||
1049 | void unregister_sysctl_table(struct ctl_table_header * table); | 1070 | void unregister_sysctl_table(struct ctl_table_header * table); |
1071 | int sysctl_check_table(struct ctl_table *table); | ||
1050 | 1072 | ||
1051 | #else /* __KERNEL__ */ | 1073 | #else /* __KERNEL__ */ |
1052 | 1074 | ||