[NET]: The scheduled removal of the frame diverter.
[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 #endif
28
29 ctl_table core_table[] = {
30 #ifdef CONFIG_NET
31         {
32                 .ctl_name       = NET_CORE_WMEM_MAX,
33                 .procname       = "wmem_max",
34                 .data           = &sysctl_wmem_max,
35                 .maxlen         = sizeof(int),
36                 .mode           = 0644,
37                 .proc_handler   = &proc_dointvec
38         },
39         {
40                 .ctl_name       = NET_CORE_RMEM_MAX,
41                 .procname       = "rmem_max",
42                 .data           = &sysctl_rmem_max,
43                 .maxlen         = sizeof(int),
44                 .mode           = 0644,
45                 .proc_handler   = &proc_dointvec
46         },
47         {
48                 .ctl_name       = NET_CORE_WMEM_DEFAULT,
49                 .procname       = "wmem_default",
50                 .data           = &sysctl_wmem_default,
51                 .maxlen         = sizeof(int),
52                 .mode           = 0644,
53                 .proc_handler   = &proc_dointvec
54         },
55         {
56                 .ctl_name       = NET_CORE_RMEM_DEFAULT,
57                 .procname       = "rmem_default",
58                 .data           = &sysctl_rmem_default,
59                 .maxlen         = sizeof(int),
60                 .mode           = 0644,
61                 .proc_handler   = &proc_dointvec
62         },
63         {
64                 .ctl_name       = NET_CORE_DEV_WEIGHT,
65                 .procname       = "dev_weight",
66                 .data           = &weight_p,
67                 .maxlen         = sizeof(int),
68                 .mode           = 0644,
69                 .proc_handler   = &proc_dointvec
70         },
71         {
72                 .ctl_name       = NET_CORE_MAX_BACKLOG,
73                 .procname       = "netdev_max_backlog",
74                 .data           = &netdev_max_backlog,
75                 .maxlen         = sizeof(int),
76                 .mode           = 0644,
77                 .proc_handler   = &proc_dointvec
78         },
79         {
80                 .ctl_name       = NET_CORE_MSG_COST,
81                 .procname       = "message_cost",
82                 .data           = &net_msg_cost,
83                 .maxlen         = sizeof(int),
84                 .mode           = 0644,
85                 .proc_handler   = &proc_dointvec_jiffies,
86                 .strategy       = &sysctl_jiffies,
87         },
88         {
89                 .ctl_name       = NET_CORE_MSG_BURST,
90                 .procname       = "message_burst",
91                 .data           = &net_msg_burst,
92                 .maxlen         = sizeof(int),
93                 .mode           = 0644,
94                 .proc_handler   = &proc_dointvec,
95         },
96         {
97                 .ctl_name       = NET_CORE_OPTMEM_MAX,
98                 .procname       = "optmem_max",
99                 .data           = &sysctl_optmem_max,
100                 .maxlen         = sizeof(int),
101                 .mode           = 0644,
102                 .proc_handler   = &proc_dointvec
103         },
104 #ifdef CONFIG_XFRM
105         {
106                 .ctl_name       = NET_CORE_AEVENT_ETIME,
107                 .procname       = "xfrm_aevent_etime",
108                 .data           = &sysctl_xfrm_aevent_etime,
109                 .maxlen         = sizeof(u32),
110                 .mode           = 0644,
111                 .proc_handler   = &proc_dointvec
112         },
113         {
114                 .ctl_name       = NET_CORE_AEVENT_RSEQTH,
115                 .procname       = "xfrm_aevent_rseqth",
116                 .data           = &sysctl_xfrm_aevent_rseqth,
117                 .maxlen         = sizeof(u32),
118                 .mode           = 0644,
119                 .proc_handler   = &proc_dointvec
120         },
121 #endif /* CONFIG_XFRM */
122 #endif /* CONFIG_NET */
123         {
124                 .ctl_name       = NET_CORE_SOMAXCONN,
125                 .procname       = "somaxconn",
126                 .data           = &sysctl_somaxconn,
127                 .maxlen         = sizeof(int),
128                 .mode           = 0644,
129                 .proc_handler   = &proc_dointvec
130         },
131         {
132                 .ctl_name       = NET_CORE_BUDGET,
133                 .procname       = "netdev_budget",
134                 .data           = &netdev_budget,
135                 .maxlen         = sizeof(int),
136                 .mode           = 0644,
137                 .proc_handler   = &proc_dointvec
138         },
139         { .ctl_name = 0 }
140 };
141
142 #endif