[PATCH] DAC960: use memmove for overlapping areas
[linux-2.6/linux-mips.git] / net / core / sysctl_net_core.c
blob02534131d88e9820126f061ac6962ce24477d6d9
1 /* -*- linux-c -*-
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]
6 */
8 #include <linux/mm.h>
9 #include <linux/sysctl.h>
10 #include <linux/module.h>
11 #include <linux/socket.h>
12 #include <net/sock.h>
14 #ifdef CONFIG_SYSCTL
16 extern int netdev_max_backlog;
17 extern int weight_p;
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 */
28 #ifdef CONFIG_XFRM
29 extern u32 sysctl_xfrm_aevent_etime;
30 extern u32 sysctl_xfrm_aevent_rseqth;
31 #endif
33 ctl_table core_table[] = {
34 #ifdef CONFIG_NET
36 .ctl_name = NET_CORE_WMEM_MAX,
37 .procname = "wmem_max",
38 .data = &sysctl_wmem_max,
39 .maxlen = sizeof(int),
40 .mode = 0644,
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),
48 .mode = 0644,
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),
56 .mode = 0644,
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),
64 .mode = 0644,
65 .proc_handler = &proc_dointvec
68 .ctl_name = NET_CORE_DEV_WEIGHT,
69 .procname = "dev_weight",
70 .data = &weight_p,
71 .maxlen = sizeof(int),
72 .mode = 0644,
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),
80 .mode = 0644,
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),
88 .mode = 0644,
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),
97 .mode = 0644,
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),
105 .mode = 0644,
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,
113 .maxlen = 32,
114 .mode = 0444,
115 .proc_handler = &proc_dostring
117 #endif /* CONFIG_NET_DIVERT */
118 #ifdef CONFIG_XFRM
120 .ctl_name = NET_CORE_AEVENT_ETIME,
121 .procname = "xfrm_aevent_etime",
122 .data = &sysctl_xfrm_aevent_etime,
123 .maxlen = sizeof(u32),
124 .mode = 0644,
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),
132 .mode = 0644,
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),
142 .mode = 0644,
143 .proc_handler = &proc_dointvec
146 .ctl_name = NET_CORE_BUDGET,
147 .procname = "netdev_budget",
148 .data = &netdev_budget,
149 .maxlen = sizeof(int),
150 .mode = 0644,
151 .proc_handler = &proc_dointvec
153 { .ctl_name = 0 }
156 #endif