diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-18 16:50:52 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-18 16:50:52 -0400 |
commit | cff6bf970965c98c62007fc8a36527fd147fe233 (patch) | |
tree | 2791f2208b54ade86625af416ff5342f11282f0c /net/llc/sysctl_net_llc.c | |
parent | 6cd7525a00f3b926e8bd2e402954ed3e09a8e924 (diff) | |
parent | 39ca371c45b04cd50d0974030ae051906fc516b6 (diff) |
Merge /home/trondmy/scm/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/llc/sysctl_net_llc.c')
-rw-r--r-- | net/llc/sysctl_net_llc.c | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c new file mode 100644 index 000000000000..d1eaddb13633 --- /dev/null +++ b/net/llc/sysctl_net_llc.c | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * sysctl_net_llc.c: sysctl interface to LLC net subsystem. | ||
3 | * | ||
4 | * Arnaldo Carvalho de Melo <acme@conectiva.com.br> | ||
5 | */ | ||
6 | |||
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> | ||
12 | |||
13 | #ifndef CONFIG_SYSCTL | ||
14 | #error This file should not be compiled without CONFIG_SYSCTL defined | ||
15 | #endif | ||
16 | |||
17 | static struct ctl_table llc2_timeout_table[] = { | ||
18 | { | ||
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, | ||
26 | }, | ||
27 | { | ||
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, | ||
35 | }, | ||
36 | { | ||
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, | ||
44 | }, | ||
45 | { | ||
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, | ||
53 | }, | ||
54 | { 0 }, | ||
55 | }; | ||
56 | |||
57 | static struct ctl_table llc_station_table[] = { | ||
58 | { | ||
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, | ||
66 | }, | ||
67 | { 0 }, | ||
68 | }; | ||
69 | |||
70 | static struct ctl_table llc2_dir_timeout_table[] = { | ||
71 | { | ||
72 | .ctl_name = NET_LLC2, | ||
73 | .procname = "timeout", | ||
74 | .mode = 0555, | ||
75 | .child = llc2_timeout_table, | ||
76 | }, | ||
77 | { 0 }, | ||
78 | }; | ||
79 | |||
80 | static struct ctl_table llc_table[] = { | ||
81 | { | ||
82 | .ctl_name = NET_LLC2, | ||
83 | .procname = "llc2", | ||
84 | .mode = 0555, | ||
85 | .child = llc2_dir_timeout_table, | ||
86 | }, | ||
87 | { | ||
88 | .ctl_name = NET_LLC_STATION, | ||
89 | .procname = "station", | ||
90 | .mode = 0555, | ||
91 | .child = llc_station_table, | ||
92 | }, | ||
93 | { 0 }, | ||
94 | }; | ||
95 | |||
96 | static struct ctl_table llc_dir_table[] = { | ||
97 | { | ||
98 | .ctl_name = NET_LLC, | ||
99 | .procname = "llc", | ||
100 | .mode = 0555, | ||
101 | .child = llc_table, | ||
102 | }, | ||
103 | { 0 }, | ||
104 | }; | ||
105 | |||
106 | static struct ctl_table llc_root_table[] = { | ||
107 | { | ||
108 | .ctl_name = CTL_NET, | ||
109 | .procname = "net", | ||
110 | .mode = 0555, | ||
111 | .child = llc_dir_table, | ||
112 | }, | ||
113 | { 0 }, | ||
114 | }; | ||
115 | |||
116 | static struct ctl_table_header *llc_table_header; | ||
117 | |||
118 | int __init llc_sysctl_init(void) | ||
119 | { | ||
120 | llc_table_header = register_sysctl_table(llc_root_table, 1); | ||
121 | |||
122 | return llc_table_header ? 0 : -ENOMEM; | ||
123 | } | ||
124 | |||
125 | void llc_sysctl_exit(void) | ||
126 | { | ||
127 | if (llc_table_header) { | ||
128 | unregister_sysctl_table(llc_table_header); | ||
129 | llc_table_header = NULL; | ||
130 | } | ||
131 | } | ||