ACPI: C-States: accounting of sleep states
[linux-2.6/mini2440.git] / net / llc / sysctl_net_llc.c
blobd1eaddb1363377a5690705e5783696d07f378d51
1 /*
2 * sysctl_net_llc.c: sysctl interface to LLC net subsystem.
3 *
4 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
5 */
7 #include <linux/config.h>
8 #include <linux/mm.h>
9 #include <linux/init.h>
10 #include <linux/sysctl.h>
11 #include <net/llc.h>
13 #ifndef CONFIG_SYSCTL
14 #error This file should not be compiled without CONFIG_SYSCTL defined
15 #endif
17 static struct ctl_table llc2_timeout_table[] = {
19 .ctl_name = NET_LLC2_ACK_TIMEOUT,
20 .procname = "ack",
21 .data = &sysctl_llc2_ack_timeout,
22 .maxlen = sizeof(long),
23 .mode = 0644,
24 .proc_handler = &proc_dointvec_jiffies,
25 .strategy = &sysctl_jiffies,
28 .ctl_name = NET_LLC2_BUSY_TIMEOUT,
29 .procname = "busy",
30 .data = &sysctl_llc2_busy_timeout,
31 .maxlen = sizeof(long),
32 .mode = 0644,
33 .proc_handler = &proc_dointvec_jiffies,
34 .strategy = &sysctl_jiffies,
37 .ctl_name = NET_LLC2_P_TIMEOUT,
38 .procname = "p",
39 .data = &sysctl_llc2_p_timeout,
40 .maxlen = sizeof(long),
41 .mode = 0644,
42 .proc_handler = &proc_dointvec_jiffies,
43 .strategy = &sysctl_jiffies,
46 .ctl_name = NET_LLC2_REJ_TIMEOUT,
47 .procname = "rej",
48 .data = &sysctl_llc2_rej_timeout,
49 .maxlen = sizeof(long),
50 .mode = 0644,
51 .proc_handler = &proc_dointvec_jiffies,
52 .strategy = &sysctl_jiffies,
54 { 0 },
57 static struct ctl_table llc_station_table[] = {
59 .ctl_name = NET_LLC_STATION_ACK_TIMEOUT,
60 .procname = "ack_timeout",
61 .data = &sysctl_llc_station_ack_timeout,
62 .maxlen = sizeof(long),
63 .mode = 0644,
64 .proc_handler = &proc_dointvec_jiffies,
65 .strategy = &sysctl_jiffies,
67 { 0 },
70 static struct ctl_table llc2_dir_timeout_table[] = {
72 .ctl_name = NET_LLC2,
73 .procname = "timeout",
74 .mode = 0555,
75 .child = llc2_timeout_table,
77 { 0 },
80 static struct ctl_table llc_table[] = {
82 .ctl_name = NET_LLC2,
83 .procname = "llc2",
84 .mode = 0555,
85 .child = llc2_dir_timeout_table,
88 .ctl_name = NET_LLC_STATION,
89 .procname = "station",
90 .mode = 0555,
91 .child = llc_station_table,
93 { 0 },
96 static struct ctl_table llc_dir_table[] = {
98 .ctl_name = NET_LLC,
99 .procname = "llc",
100 .mode = 0555,
101 .child = llc_table,
103 { 0 },
106 static struct ctl_table llc_root_table[] = {
108 .ctl_name = CTL_NET,
109 .procname = "net",
110 .mode = 0555,
111 .child = llc_dir_table,
113 { 0 },
116 static struct ctl_table_header *llc_table_header;
118 int __init llc_sysctl_init(void)
120 llc_table_header = register_sysctl_table(llc_root_table, 1);
122 return llc_table_header ? 0 : -ENOMEM;
125 void llc_sysctl_exit(void)
127 if (llc_table_header) {
128 unregister_sysctl_table(llc_table_header);
129 llc_table_header = NULL;