Blame view
net/llc/sysctl_net_llc.c
1.83 KB
b24413180
|
1 |
// SPDX-License-Identifier: GPL-2.0 |
590232a71
|
2 3 |
/* * sysctl_net_llc.c: sysctl interface to LLC net subsystem. |
d57b1869b
|
4 |
* |
590232a71
|
5 6 |
* Arnaldo Carvalho de Melo <acme@conectiva.com.br> */ |
590232a71
|
7 8 9 |
#include <linux/mm.h> #include <linux/init.h> #include <linux/sysctl.h> |
5dd3df105
|
10 |
#include <net/net_namespace.h> |
2928c19e1
|
11 |
#include <net/llc.h> |
590232a71
|
12 13 14 15 |
#ifndef CONFIG_SYSCTL #error This file should not be compiled without CONFIG_SYSCTL defined #endif |
590232a71
|
16 17 |
static struct ctl_table llc2_timeout_table[] = { { |
590232a71
|
18 19 |
.procname = "ack", .data = &sysctl_llc2_ack_timeout, |
6b8d9117c
|
20 |
.maxlen = sizeof(sysctl_llc2_ack_timeout), |
590232a71
|
21 |
.mode = 0644, |
6d9f239a1
|
22 |
.proc_handler = proc_dointvec_jiffies, |
590232a71
|
23 24 |
}, { |
590232a71
|
25 26 |
.procname = "busy", .data = &sysctl_llc2_busy_timeout, |
6b8d9117c
|
27 |
.maxlen = sizeof(sysctl_llc2_busy_timeout), |
590232a71
|
28 |
.mode = 0644, |
6d9f239a1
|
29 |
.proc_handler = proc_dointvec_jiffies, |
590232a71
|
30 31 |
}, { |
590232a71
|
32 33 |
.procname = "p", .data = &sysctl_llc2_p_timeout, |
6b8d9117c
|
34 |
.maxlen = sizeof(sysctl_llc2_p_timeout), |
590232a71
|
35 |
.mode = 0644, |
6d9f239a1
|
36 |
.proc_handler = proc_dointvec_jiffies, |
590232a71
|
37 38 |
}, { |
590232a71
|
39 40 |
.procname = "rej", .data = &sysctl_llc2_rej_timeout, |
6b8d9117c
|
41 |
.maxlen = sizeof(sysctl_llc2_rej_timeout), |
590232a71
|
42 |
.mode = 0644, |
6d9f239a1
|
43 |
.proc_handler = proc_dointvec_jiffies, |
590232a71
|
44 |
}, |
f8572d8f2
|
45 |
{ }, |
590232a71
|
46 47 48 |
}; static struct ctl_table llc_station_table[] = { |
f8572d8f2
|
49 |
{ }, |
590232a71
|
50 |
}; |
64fb30104
|
51 52 |
static struct ctl_table_header *llc2_timeout_header; static struct ctl_table_header *llc_station_header; |
590232a71
|
53 54 55 |
int __init llc_sysctl_init(void) { |
64fb30104
|
56 57 |
llc2_timeout_header = register_net_sysctl(&init_net, "net/llc/llc2/timeout", llc2_timeout_table); llc_station_header = register_net_sysctl(&init_net, "net/llc/station", llc_station_table); |
590232a71
|
58 |
|
64fb30104
|
59 60 61 62 63 |
if (!llc2_timeout_header || !llc_station_header) { llc_sysctl_exit(); return -ENOMEM; } return 0; |
590232a71
|
64 65 66 67 |
} void llc_sysctl_exit(void) { |
64fb30104
|
68 69 70 71 72 73 74 |
if (llc2_timeout_header) { unregister_net_sysctl_table(llc2_timeout_header); llc2_timeout_header = NULL; } if (llc_station_header) { unregister_net_sysctl_table(llc_station_header); llc_station_header = NULL; |
590232a71
|
75 76 |
} } |