[IPSEC] ah: Remove keys from ah_data structure
[linux-2.6] / net / core / sysctl_net_core.c
1 /* -*- linux-c -*-
2  * sysctl_net_core.c: sysctl interface to net core subsystem.
3  *
4  * Begun April 1, 1996, Mike Shaver.
5  * Added /proc/sys/net/core directory entry (empty =) ). [MS]
6  */
7
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>
13
14 #ifdef CONFIG_SYSCTL
15
16 extern int netdev_max_backlog;
17 extern int weight_p;
18
19 extern __u32 sysctl_wmem_max;
20 extern __u32 sysctl_rmem_max;
21
22 extern int sysctl_core_destroy_delay;
23
24 #ifdef CONFIG_XFRM
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;
29 #endif
30
31 ctl_table core_table[] = {
32 #ifdef CONFIG_NET
33         {
34                 .ctl_name       = NET_CORE_WMEM_MAX,
35                 .procname       = "wmem_max",
36                 .data           = &sysctl_wmem_max,
37                 .maxlen         = sizeof(int),
38                 .mode           = 0644,
39                 .proc_handler   = &proc_dointvec
40         },
41         {
42                 .ctl_name       = NET_CORE_RMEM_MAX,
43                 .procname       = "rmem_max",
44                 .data           = &sysctl_rmem_max,
45                 .maxlen         = sizeof(int),
46                 .mode           = 0644,
47                 .proc_handler   = &proc_dointvec
48         },
49         {
50                 .ctl_name       = NET_CORE_WMEM_DEFAULT,
51                 .procname       = "wmem_default",
52                 .data           = &sysctl_wmem_default,
53                 .maxlen         = sizeof(int),
54                 .mode           = 0644,
55                 .proc_handler   = &proc_dointvec
56         },
57         {
58                 .ctl_name       = NET_CORE_RMEM_DEFAULT,
59                 .procname       = "rmem_default",
60                 .data           = &sysctl_rmem_default,
61                 .maxlen         = sizeof(int),
62                 .mode           = 0644,
63                 .proc_handler   = &proc_dointvec
64         },
65         {
66                 .ctl_name       = NET_CORE_DEV_WEIGHT,
67                 .procname       = "dev_weight",
68                 .data           = &weight_p,
69                 .maxlen         = sizeof(int),
70                 .mode           = 0644,
71                 .proc_handler   = &proc_dointvec
72         },
73         {
74                 .ctl_name       = NET_CORE_MAX_BACKLOG,
75                 .procname       = "netdev_max_backlog",
76                 .data           = &netdev_max_backlog,
77                 .maxlen         = sizeof(int),
78                 .mode           = 0644,
79                 .proc_handler   = &proc_dointvec
80         },
81         {
82                 .ctl_name       = NET_CORE_MSG_COST,
83                 .procname       = "message_cost",
84                 .data           = &net_msg_cost,
85                 .maxlen         = sizeof(int),
86                 .mode           = 0644,
87                 .proc_handler   = &proc_dointvec_jiffies,
88                 .strategy       = &sysctl_jiffies,
89         },
90         {
91                 .ctl_name       = NET_CORE_MSG_BURST,
92                 .procname       = "message_burst",
93                 .data           = &net_msg_burst,
94                 .maxlen         = sizeof(int),
95                 .mode           = 0644,
96                 .proc_handler   = &proc_dointvec,
97         },
98         {
99                 .ctl_name       = NET_CORE_OPTMEM_MAX,
100                 .procname       = "optmem_max",
101                 .data           = &sysctl_optmem_max,
102                 .maxlen         = sizeof(int),
103                 .mode           = 0644,
104                 .proc_handler   = &proc_dointvec
105         },
106 #ifdef CONFIG_XFRM
107         {
108                 .ctl_name       = NET_CORE_AEVENT_ETIME,
109                 .procname       = "xfrm_aevent_etime",
110                 .data           = &sysctl_xfrm_aevent_etime,
111                 .maxlen         = sizeof(u32),
112                 .mode           = 0644,
113                 .proc_handler   = &proc_dointvec
114         },
115         {
116                 .ctl_name       = NET_CORE_AEVENT_RSEQTH,
117                 .procname       = "xfrm_aevent_rseqth",
118                 .data           = &sysctl_xfrm_aevent_rseqth,
119                 .maxlen         = sizeof(u32),
120                 .mode           = 0644,
121                 .proc_handler   = &proc_dointvec
122         },
123         {
124                 .ctl_name       = CTL_UNNUMBERED,
125                 .procname       = "xfrm_larval_drop",
126                 .data           = &sysctl_xfrm_larval_drop,
127                 .maxlen         = sizeof(int),
128                 .mode           = 0644,
129                 .proc_handler   = &proc_dointvec
130         },
131         {
132                 .ctl_name       = CTL_UNNUMBERED,
133                 .procname       = "xfrm_acq_expires",
134                 .data           = &sysctl_xfrm_acq_expires,
135                 .maxlen         = sizeof(int),
136                 .mode           = 0644,
137                 .proc_handler   = &proc_dointvec
138         },
139 #endif /* CONFIG_XFRM */
140 #endif /* CONFIG_NET */
141         {
142                 .ctl_name       = NET_CORE_SOMAXCONN,
143                 .procname       = "somaxconn",
144                 .data           = &sysctl_somaxconn,
145                 .maxlen         = sizeof(int),
146                 .mode           = 0644,
147                 .proc_handler   = &proc_dointvec
148         },
149         {
150                 .ctl_name       = NET_CORE_BUDGET,
151                 .procname       = "netdev_budget",
152                 .data           = &netdev_budget,
153                 .maxlen         = sizeof(int),
154                 .mode           = 0644,
155                 .proc_handler   = &proc_dointvec
156         },
157         {
158                 .ctl_name       = NET_CORE_WARNINGS,
159                 .procname       = "warnings",
160                 .data           = &net_msg_warn,
161                 .maxlen         = sizeof(int),
162                 .mode           = 0644,
163                 .proc_handler   = &proc_dointvec
164         },
165         { .ctl_name = 0 }
166 };
167
168 #endif