2 * sysctl_net_core.c: sysctl interface to net core subsystem.
4 * Begun April 1, 1996, Mike Shaver.
5 * Added /proc/sys/net/core directory entry (empty =) ). [MS]
9 #include <linux/sysctl.h>
10 #include <linux/module.h>
11 #include <linux/socket.h>
16 extern int netdev_max_backlog
;
19 extern __u32 sysctl_wmem_max
;
20 extern __u32 sysctl_rmem_max
;
22 extern int sysctl_core_destroy_delay
;
24 #ifdef CONFIG_NET_DIVERT
25 extern char sysctl_divert_version
[];
26 #endif /* CONFIG_NET_DIVERT */
29 extern u32 sysctl_xfrm_aevent_etime
;
30 extern u32 sysctl_xfrm_aevent_rseqth
;
33 ctl_table core_table
[] = {
36 .ctl_name
= NET_CORE_WMEM_MAX
,
37 .procname
= "wmem_max",
38 .data
= &sysctl_wmem_max
,
39 .maxlen
= sizeof(int),
41 .proc_handler
= &proc_dointvec
44 .ctl_name
= NET_CORE_RMEM_MAX
,
45 .procname
= "rmem_max",
46 .data
= &sysctl_rmem_max
,
47 .maxlen
= sizeof(int),
49 .proc_handler
= &proc_dointvec
52 .ctl_name
= NET_CORE_WMEM_DEFAULT
,
53 .procname
= "wmem_default",
54 .data
= &sysctl_wmem_default
,
55 .maxlen
= sizeof(int),
57 .proc_handler
= &proc_dointvec
60 .ctl_name
= NET_CORE_RMEM_DEFAULT
,
61 .procname
= "rmem_default",
62 .data
= &sysctl_rmem_default
,
63 .maxlen
= sizeof(int),
65 .proc_handler
= &proc_dointvec
68 .ctl_name
= NET_CORE_DEV_WEIGHT
,
69 .procname
= "dev_weight",
71 .maxlen
= sizeof(int),
73 .proc_handler
= &proc_dointvec
76 .ctl_name
= NET_CORE_MAX_BACKLOG
,
77 .procname
= "netdev_max_backlog",
78 .data
= &netdev_max_backlog
,
79 .maxlen
= sizeof(int),
81 .proc_handler
= &proc_dointvec
84 .ctl_name
= NET_CORE_MSG_COST
,
85 .procname
= "message_cost",
86 .data
= &net_msg_cost
,
87 .maxlen
= sizeof(int),
89 .proc_handler
= &proc_dointvec_jiffies
,
90 .strategy
= &sysctl_jiffies
,
93 .ctl_name
= NET_CORE_MSG_BURST
,
94 .procname
= "message_burst",
95 .data
= &net_msg_burst
,
96 .maxlen
= sizeof(int),
98 .proc_handler
= &proc_dointvec
,
101 .ctl_name
= NET_CORE_OPTMEM_MAX
,
102 .procname
= "optmem_max",
103 .data
= &sysctl_optmem_max
,
104 .maxlen
= sizeof(int),
106 .proc_handler
= &proc_dointvec
108 #ifdef CONFIG_NET_DIVERT
110 .ctl_name
= NET_CORE_DIVERT_VERSION
,
111 .procname
= "divert_version",
112 .data
= (void *)sysctl_divert_version
,
115 .proc_handler
= &proc_dostring
117 #endif /* CONFIG_NET_DIVERT */
120 .ctl_name
= NET_CORE_AEVENT_ETIME
,
121 .procname
= "xfrm_aevent_etime",
122 .data
= &sysctl_xfrm_aevent_etime
,
123 .maxlen
= sizeof(u32
),
125 .proc_handler
= &proc_dointvec
128 .ctl_name
= NET_CORE_AEVENT_RSEQTH
,
129 .procname
= "xfrm_aevent_rseqth",
130 .data
= &sysctl_xfrm_aevent_rseqth
,
131 .maxlen
= sizeof(u32
),
133 .proc_handler
= &proc_dointvec
135 #endif /* CONFIG_XFRM */
136 #endif /* CONFIG_NET */
138 .ctl_name
= NET_CORE_SOMAXCONN
,
139 .procname
= "somaxconn",
140 .data
= &sysctl_somaxconn
,
141 .maxlen
= sizeof(int),
143 .proc_handler
= &proc_dointvec
146 .ctl_name
= NET_CORE_BUDGET
,
147 .procname
= "netdev_budget",
148 .data
= &netdev_budget
,
149 .maxlen
= sizeof(int),
151 .proc_handler
= &proc_dointvec