2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation; either version 2 of the License, or
5 * (at your option) any later version.
7 * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com)
10 #include <linux/sysctl.h>
11 #include <linux/init.h>
15 static int min_timer[] = {1 * HZ};
16 static int max_timer[] = {300 * HZ};
17 static int min_idle[] = {0 * HZ};
18 static int max_idle[] = {65535 * HZ};
19 static int min_route[1], max_route[] = {1};
20 static int min_ftimer[] = {60 * HZ};
21 static int max_ftimer[] = {600 * HZ};
22 static int min_maxvcs[] = {1}, max_maxvcs[] = {254};
23 static int min_window[] = {1}, max_window[] = {7};
25 static struct ctl_table_header *rose_table_header;
27 static ctl_table rose_table[] = {
29 .ctl_name = NET_ROSE_RESTART_REQUEST_TIMEOUT,
30 .procname = "restart_request_timeout",
31 .data = &sysctl_rose_restart_request_timeout,
32 .maxlen = sizeof(int),
34 .proc_handler = &proc_dointvec_minmax,
35 .strategy = &sysctl_intvec,
40 .ctl_name = NET_ROSE_CALL_REQUEST_TIMEOUT,
41 .procname = "call_request_timeout",
42 .data = &sysctl_rose_call_request_timeout,
43 .maxlen = sizeof(int),
45 .proc_handler = &proc_dointvec_minmax,
46 .strategy = &sysctl_intvec,
51 .ctl_name = NET_ROSE_RESET_REQUEST_TIMEOUT,
52 .procname = "reset_request_timeout",
53 .data = &sysctl_rose_reset_request_timeout,
54 .maxlen = sizeof(int),
56 .proc_handler = &proc_dointvec_minmax,
57 .strategy = &sysctl_intvec,
62 .ctl_name = NET_ROSE_CLEAR_REQUEST_TIMEOUT,
63 .procname = "clear_request_timeout",
64 .data = &sysctl_rose_clear_request_timeout,
65 .maxlen = sizeof(int),
67 .proc_handler = &proc_dointvec_minmax,
68 .strategy = &sysctl_intvec,
73 .ctl_name = NET_ROSE_NO_ACTIVITY_TIMEOUT,
74 .procname = "no_activity_timeout",
75 .data = &sysctl_rose_no_activity_timeout,
76 .maxlen = sizeof(int),
78 .proc_handler = &proc_dointvec_minmax,
79 .strategy = &sysctl_intvec,
84 .ctl_name = NET_ROSE_ACK_HOLD_BACK_TIMEOUT,
85 .procname = "acknowledge_hold_back_timeout",
86 .data = &sysctl_rose_ack_hold_back_timeout,
87 .maxlen = sizeof(int),
89 .proc_handler = &proc_dointvec_minmax,
90 .strategy = &sysctl_intvec,
95 .ctl_name = NET_ROSE_ROUTING_CONTROL,
96 .procname = "routing_control",
97 .data = &sysctl_rose_routing_control,
98 .maxlen = sizeof(int),
100 .proc_handler = &proc_dointvec_minmax,
101 .strategy = &sysctl_intvec,
102 .extra1 = &min_route,
106 .ctl_name = NET_ROSE_LINK_FAIL_TIMEOUT,
107 .procname = "link_fail_timeout",
108 .data = &sysctl_rose_link_fail_timeout,
109 .maxlen = sizeof(int),
111 .proc_handler = &proc_dointvec_minmax,
112 .strategy = &sysctl_intvec,
113 .extra1 = &min_ftimer,
114 .extra2 = &max_ftimer
117 .ctl_name = NET_ROSE_MAX_VCS,
118 .procname = "maximum_virtual_circuits",
119 .data = &sysctl_rose_maximum_vcs,
120 .maxlen = sizeof(int),
122 .proc_handler = &proc_dointvec_minmax,
123 .strategy = &sysctl_intvec,
124 .extra1 = &min_maxvcs,
125 .extra2 = &max_maxvcs
128 .ctl_name = NET_ROSE_WINDOW_SIZE,
129 .procname = "window_size",
130 .data = &sysctl_rose_window_size,
131 .maxlen = sizeof(int),
133 .proc_handler = &proc_dointvec_minmax,
134 .strategy = &sysctl_intvec,
135 .extra1 = &min_window,
136 .extra2 = &max_window
141 static struct ctl_path rose_path[] = {
142 { .procname = "net", .ctl_name = CTL_NET, },
143 { .procname = "rose", .ctl_name = NET_ROSE, },
147 void __init rose_register_sysctl(void)
149 rose_table_header = register_sysctl_paths(rose_path, rose_table);
152 void rose_unregister_sysctl(void)
154 unregister_sysctl_table(rose_table_header);