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;
25 extern u32 sysctl_xfrm_aevent_etime;
26 extern u32 sysctl_xfrm_aevent_rseqth;
27 extern int sysctl_xfrm_larval_drop;
28 extern u32 sysctl_xfrm_acq_expires;
31 ctl_table core_table[] = {
34 .ctl_name = NET_CORE_WMEM_MAX,
35 .procname = "wmem_max",
36 .data = &sysctl_wmem_max,
37 .maxlen = sizeof(int),
39 .proc_handler = &proc_dointvec
42 .ctl_name = NET_CORE_RMEM_MAX,
43 .procname = "rmem_max",
44 .data = &sysctl_rmem_max,
45 .maxlen = sizeof(int),
47 .proc_handler = &proc_dointvec
50 .ctl_name = NET_CORE_WMEM_DEFAULT,
51 .procname = "wmem_default",
52 .data = &sysctl_wmem_default,
53 .maxlen = sizeof(int),
55 .proc_handler = &proc_dointvec
58 .ctl_name = NET_CORE_RMEM_DEFAULT,
59 .procname = "rmem_default",
60 .data = &sysctl_rmem_default,
61 .maxlen = sizeof(int),
63 .proc_handler = &proc_dointvec
66 .ctl_name = NET_CORE_DEV_WEIGHT,
67 .procname = "dev_weight",
69 .maxlen = sizeof(int),
71 .proc_handler = &proc_dointvec
74 .ctl_name = NET_CORE_MAX_BACKLOG,
75 .procname = "netdev_max_backlog",
76 .data = &netdev_max_backlog,
77 .maxlen = sizeof(int),
79 .proc_handler = &proc_dointvec
82 .ctl_name = NET_CORE_MSG_COST,
83 .procname = "message_cost",
84 .data = &net_msg_cost,
85 .maxlen = sizeof(int),
87 .proc_handler = &proc_dointvec_jiffies,
88 .strategy = &sysctl_jiffies,
91 .ctl_name = NET_CORE_MSG_BURST,
92 .procname = "message_burst",
93 .data = &net_msg_burst,
94 .maxlen = sizeof(int),
96 .proc_handler = &proc_dointvec,
99 .ctl_name = NET_CORE_OPTMEM_MAX,
100 .procname = "optmem_max",
101 .data = &sysctl_optmem_max,
102 .maxlen = sizeof(int),
104 .proc_handler = &proc_dointvec
108 .ctl_name = NET_CORE_AEVENT_ETIME,
109 .procname = "xfrm_aevent_etime",
110 .data = &sysctl_xfrm_aevent_etime,
111 .maxlen = sizeof(u32),
113 .proc_handler = &proc_dointvec
116 .ctl_name = NET_CORE_AEVENT_RSEQTH,
117 .procname = "xfrm_aevent_rseqth",
118 .data = &sysctl_xfrm_aevent_rseqth,
119 .maxlen = sizeof(u32),
121 .proc_handler = &proc_dointvec
124 .ctl_name = CTL_UNNUMBERED,
125 .procname = "xfrm_larval_drop",
126 .data = &sysctl_xfrm_larval_drop,
127 .maxlen = sizeof(int),
129 .proc_handler = &proc_dointvec
132 .ctl_name = CTL_UNNUMBERED,
133 .procname = "xfrm_acq_expires",
134 .data = &sysctl_xfrm_acq_expires,
135 .maxlen = sizeof(int),
137 .proc_handler = &proc_dointvec
139 #endif /* CONFIG_XFRM */
140 #endif /* CONFIG_NET */
142 .ctl_name = NET_CORE_SOMAXCONN,
143 .procname = "somaxconn",
144 .data = &sysctl_somaxconn,
145 .maxlen = sizeof(int),
147 .proc_handler = &proc_dointvec
150 .ctl_name = NET_CORE_BUDGET,
151 .procname = "netdev_budget",
152 .data = &netdev_budget,
153 .maxlen = sizeof(int),
155 .proc_handler = &proc_dointvec
158 .ctl_name = NET_CORE_WARNINGS,
159 .procname = "warnings",
160 .data = &net_msg_warn,
161 .maxlen = sizeof(int),
163 .proc_handler = &proc_dointvec