2 * sysctl_net_llc.c: sysctl interface to LLC net subsystem.
4 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
7 #include <linux/config.h>
9 #include <linux/init.h>
10 #include <linux/sysctl.h>
14 #error This file should not be compiled without CONFIG_SYSCTL defined
17 static struct ctl_table llc2_timeout_table[] = {
19 .ctl_name = NET_LLC2_ACK_TIMEOUT,
21 .data = &sysctl_llc2_ack_timeout,
22 .maxlen = sizeof(long),
24 .proc_handler = &proc_dointvec_jiffies,
25 .strategy = &sysctl_jiffies,
28 .ctl_name = NET_LLC2_BUSY_TIMEOUT,
30 .data = &sysctl_llc2_busy_timeout,
31 .maxlen = sizeof(long),
33 .proc_handler = &proc_dointvec_jiffies,
34 .strategy = &sysctl_jiffies,
37 .ctl_name = NET_LLC2_P_TIMEOUT,
39 .data = &sysctl_llc2_p_timeout,
40 .maxlen = sizeof(long),
42 .proc_handler = &proc_dointvec_jiffies,
43 .strategy = &sysctl_jiffies,
46 .ctl_name = NET_LLC2_REJ_TIMEOUT,
48 .data = &sysctl_llc2_rej_timeout,
49 .maxlen = sizeof(long),
51 .proc_handler = &proc_dointvec_jiffies,
52 .strategy = &sysctl_jiffies,
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),
64 .proc_handler = &proc_dointvec_jiffies,
65 .strategy = &sysctl_jiffies,
70 static struct ctl_table llc2_dir_timeout_table[] = {
73 .procname = "timeout",
75 .child = llc2_timeout_table,
80 static struct ctl_table llc_table[] = {
85 .child = llc2_dir_timeout_table,
88 .ctl_name = NET_LLC_STATION,
89 .procname = "station",
91 .child = llc_station_table,
96 static struct ctl_table llc_dir_table[] = {
106 static struct ctl_table llc_root_table[] = {
111 .child = llc_dir_table,
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;