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>
13 #error This file should not be compiled without CONFIG_SYSCTL defined
16 extern int sysctl_llc2_ack_timeout;
17 extern int sysctl_llc2_busy_timeout;
18 extern int sysctl_llc2_p_timeout;
19 extern int sysctl_llc2_rej_timeout;
20 extern int sysctl_llc_station_ack_timeout;
22 static struct ctl_table llc2_timeout_table[] = {
24 .ctl_name = NET_LLC2_ACK_TIMEOUT,
26 .data = &sysctl_llc2_ack_timeout,
27 .maxlen = sizeof(long),
29 .proc_handler = &proc_dointvec_jiffies,
30 .strategy = &sysctl_jiffies,
33 .ctl_name = NET_LLC2_BUSY_TIMEOUT,
35 .data = &sysctl_llc2_busy_timeout,
36 .maxlen = sizeof(long),
38 .proc_handler = &proc_dointvec_jiffies,
39 .strategy = &sysctl_jiffies,
42 .ctl_name = NET_LLC2_P_TIMEOUT,
44 .data = &sysctl_llc2_p_timeout,
45 .maxlen = sizeof(long),
47 .proc_handler = &proc_dointvec_jiffies,
48 .strategy = &sysctl_jiffies,
51 .ctl_name = NET_LLC2_REJ_TIMEOUT,
53 .data = &sysctl_llc2_rej_timeout,
54 .maxlen = sizeof(long),
56 .proc_handler = &proc_dointvec_jiffies,
57 .strategy = &sysctl_jiffies,
62 static struct ctl_table llc_station_table[] = {
64 .ctl_name = NET_LLC_STATION_ACK_TIMEOUT,
65 .procname = "ack_timeout",
66 .data = &sysctl_llc_station_ack_timeout,
67 .maxlen = sizeof(long),
69 .proc_handler = &proc_dointvec_jiffies,
70 .strategy = &sysctl_jiffies,
75 static struct ctl_table llc2_dir_timeout_table[] = {
78 .procname = "timeout",
80 .child = llc2_timeout_table,
85 static struct ctl_table llc_table[] = {
90 .child = llc2_dir_timeout_table,
93 .ctl_name = NET_LLC_STATION,
94 .procname = "station",
96 .child = llc_station_table,
101 static struct ctl_table llc_dir_table[] = {
111 static struct ctl_table llc_root_table[] = {
116 .child = llc_dir_table,
121 static struct ctl_table_header *llc_table_header;
123 int __init llc_sysctl_init(void)
125 llc_table_header = register_sysctl_table(llc_root_table, 1);
127 return llc_table_header ? 0 : -ENOMEM;
130 void llc_sysctl_exit(void)
132 if (llc_table_header) {
133 unregister_sysctl_table(llc_table_header);
134 llc_table_header = NULL;