1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com)
7 #include <linux/sysctl.h>
8 #include <linux/init.h>
12 static int min_timer[] = {1 * HZ};
13 static int max_timer[] = {300 * HZ};
14 static int min_idle[] = {0 * HZ};
15 static int max_idle[] = {65535 * HZ};
16 static int min_route[1], max_route[] = {1};
17 static int min_ftimer[] = {60 * HZ};
18 static int max_ftimer[] = {600 * HZ};
19 static int min_maxvcs[] = {1}, max_maxvcs[] = {254};
20 static int min_window[] = {1}, max_window[] = {7};
22 static struct ctl_table_header *rose_table_header;
24 static struct ctl_table rose_table[] = {
26 .procname = "restart_request_timeout",
27 .data = &sysctl_rose_restart_request_timeout,
28 .maxlen = sizeof(int),
30 .proc_handler = proc_dointvec_minmax,
35 .procname = "call_request_timeout",
36 .data = &sysctl_rose_call_request_timeout,
37 .maxlen = sizeof(int),
39 .proc_handler = proc_dointvec_minmax,
44 .procname = "reset_request_timeout",
45 .data = &sysctl_rose_reset_request_timeout,
46 .maxlen = sizeof(int),
48 .proc_handler = proc_dointvec_minmax,
53 .procname = "clear_request_timeout",
54 .data = &sysctl_rose_clear_request_timeout,
55 .maxlen = sizeof(int),
57 .proc_handler = proc_dointvec_minmax,
62 .procname = "no_activity_timeout",
63 .data = &sysctl_rose_no_activity_timeout,
64 .maxlen = sizeof(int),
66 .proc_handler = proc_dointvec_minmax,
71 .procname = "acknowledge_hold_back_timeout",
72 .data = &sysctl_rose_ack_hold_back_timeout,
73 .maxlen = sizeof(int),
75 .proc_handler = proc_dointvec_minmax,
80 .procname = "routing_control",
81 .data = &sysctl_rose_routing_control,
82 .maxlen = sizeof(int),
84 .proc_handler = proc_dointvec_minmax,
89 .procname = "link_fail_timeout",
90 .data = &sysctl_rose_link_fail_timeout,
91 .maxlen = sizeof(int),
93 .proc_handler = proc_dointvec_minmax,
94 .extra1 = &min_ftimer,
98 .procname = "maximum_virtual_circuits",
99 .data = &sysctl_rose_maximum_vcs,
100 .maxlen = sizeof(int),
102 .proc_handler = proc_dointvec_minmax,
103 .extra1 = &min_maxvcs,
104 .extra2 = &max_maxvcs
107 .procname = "window_size",
108 .data = &sysctl_rose_window_size,
109 .maxlen = sizeof(int),
111 .proc_handler = proc_dointvec_minmax,
112 .extra1 = &min_window,
113 .extra2 = &max_window
118 void __init rose_register_sysctl(void)
120 rose_table_header = register_net_sysctl(&init_net, "net/rose", rose_table);
123 void rose_unregister_sysctl(void)
125 unregister_net_sysctl_table(rose_table_header);