2 * sysctl_net_llc.c: sysctl interface to LLC net subsystem.
4 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
8 #include <linux/init.h>
9 #include <linux/sysctl.h>
13 #error This file should not be compiled without CONFIG_SYSCTL defined
16 static struct ctl_table llc2_timeout_table
[] = {
18 .ctl_name
= NET_LLC2_ACK_TIMEOUT
,
20 .data
= &sysctl_llc2_ack_timeout
,
21 .maxlen
= sizeof(long),
23 .proc_handler
= &proc_dointvec_jiffies
,
24 .strategy
= &sysctl_jiffies
,
27 .ctl_name
= NET_LLC2_BUSY_TIMEOUT
,
29 .data
= &sysctl_llc2_busy_timeout
,
30 .maxlen
= sizeof(long),
32 .proc_handler
= &proc_dointvec_jiffies
,
33 .strategy
= &sysctl_jiffies
,
36 .ctl_name
= NET_LLC2_P_TIMEOUT
,
38 .data
= &sysctl_llc2_p_timeout
,
39 .maxlen
= sizeof(long),
41 .proc_handler
= &proc_dointvec_jiffies
,
42 .strategy
= &sysctl_jiffies
,
45 .ctl_name
= NET_LLC2_REJ_TIMEOUT
,
47 .data
= &sysctl_llc2_rej_timeout
,
48 .maxlen
= sizeof(long),
50 .proc_handler
= &proc_dointvec_jiffies
,
51 .strategy
= &sysctl_jiffies
,
56 static struct ctl_table llc_station_table
[] = {
58 .ctl_name
= NET_LLC_STATION_ACK_TIMEOUT
,
59 .procname
= "ack_timeout",
60 .data
= &sysctl_llc_station_ack_timeout
,
61 .maxlen
= sizeof(long),
63 .proc_handler
= &proc_dointvec_jiffies
,
64 .strategy
= &sysctl_jiffies
,
69 static struct ctl_table llc2_dir_timeout_table
[] = {
72 .procname
= "timeout",
74 .child
= llc2_timeout_table
,
79 static struct ctl_table llc_table
[] = {
84 .child
= llc2_dir_timeout_table
,
87 .ctl_name
= NET_LLC_STATION
,
88 .procname
= "station",
90 .child
= llc_station_table
,
95 static struct ctl_table llc_dir_table
[] = {
105 static struct ctl_table llc_root_table
[] = {
110 .child
= llc_dir_table
,
115 static struct ctl_table_header
*llc_table_header
;
117 int __init
llc_sysctl_init(void)
119 llc_table_header
= register_sysctl_table(llc_root_table
, 1);
121 return llc_table_header
? 0 : -ENOMEM
;
124 void llc_sysctl_exit(void)
126 if (llc_table_header
) {
127 unregister_sysctl_table(llc_table_header
);
128 llc_table_header
= NULL
;