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;
29 ctl_table core_table[] = {
32 .ctl_name = NET_CORE_WMEM_MAX,
33 .procname = "wmem_max",
34 .data = &sysctl_wmem_max,
35 .maxlen = sizeof(int),
37 .proc_handler = &proc_dointvec
40 .ctl_name = NET_CORE_RMEM_MAX,
41 .procname = "rmem_max",
42 .data = &sysctl_rmem_max,
43 .maxlen = sizeof(int),
45 .proc_handler = &proc_dointvec
48 .ctl_name = NET_CORE_WMEM_DEFAULT,
49 .procname = "wmem_default",
50 .data = &sysctl_wmem_default,
51 .maxlen = sizeof(int),
53 .proc_handler = &proc_dointvec
56 .ctl_name = NET_CORE_RMEM_DEFAULT,
57 .procname = "rmem_default",
58 .data = &sysctl_rmem_default,
59 .maxlen = sizeof(int),
61 .proc_handler = &proc_dointvec
64 .ctl_name = NET_CORE_DEV_WEIGHT,
65 .procname = "dev_weight",
67 .maxlen = sizeof(int),
69 .proc_handler = &proc_dointvec
72 .ctl_name = NET_CORE_MAX_BACKLOG,
73 .procname = "netdev_max_backlog",
74 .data = &netdev_max_backlog,
75 .maxlen = sizeof(int),
77 .proc_handler = &proc_dointvec
80 .ctl_name = NET_CORE_MSG_COST,
81 .procname = "message_cost",
82 .data = &net_msg_cost,
83 .maxlen = sizeof(int),
85 .proc_handler = &proc_dointvec_jiffies,
86 .strategy = &sysctl_jiffies,
89 .ctl_name = NET_CORE_MSG_BURST,
90 .procname = "message_burst",
91 .data = &net_msg_burst,
92 .maxlen = sizeof(int),
94 .proc_handler = &proc_dointvec,
97 .ctl_name = NET_CORE_OPTMEM_MAX,
98 .procname = "optmem_max",
99 .data = &sysctl_optmem_max,
100 .maxlen = sizeof(int),
102 .proc_handler = &proc_dointvec
106 .ctl_name = NET_CORE_AEVENT_ETIME,
107 .procname = "xfrm_aevent_etime",
108 .data = &sysctl_xfrm_aevent_etime,
109 .maxlen = sizeof(u32),
111 .proc_handler = &proc_dointvec
114 .ctl_name = NET_CORE_AEVENT_RSEQTH,
115 .procname = "xfrm_aevent_rseqth",
116 .data = &sysctl_xfrm_aevent_rseqth,
117 .maxlen = sizeof(u32),
119 .proc_handler = &proc_dointvec
121 #endif /* CONFIG_XFRM */
122 #endif /* CONFIG_NET */
124 .ctl_name = NET_CORE_SOMAXCONN,
125 .procname = "somaxconn",
126 .data = &sysctl_somaxconn,
127 .maxlen = sizeof(int),
129 .proc_handler = &proc_dointvec
132 .ctl_name = NET_CORE_BUDGET,
133 .procname = "netdev_budget",
134 .data = &netdev_budget,
135 .maxlen = sizeof(int),
137 .proc_handler = &proc_dointvec
140 .ctl_name = NET_CORE_WARNINGS,
141 .procname = "warnings",
142 .data = &net_msg_warn,
143 .maxlen = sizeof(int),
145 .proc_handler = &proc_dointvec