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 struct ctl_table rose_table[] = {
29 .procname = "restart_request_timeout",
30 .data = &sysctl_rose_restart_request_timeout,
31 .maxlen = sizeof(int),
33 .proc_handler = proc_dointvec_minmax,
38 .procname = "call_request_timeout",
39 .data = &sysctl_rose_call_request_timeout,
40 .maxlen = sizeof(int),
42 .proc_handler = proc_dointvec_minmax,
47 .procname = "reset_request_timeout",
48 .data = &sysctl_rose_reset_request_timeout,
49 .maxlen = sizeof(int),
51 .proc_handler = proc_dointvec_minmax,
56 .procname = "clear_request_timeout",
57 .data = &sysctl_rose_clear_request_timeout,
58 .maxlen = sizeof(int),
60 .proc_handler = proc_dointvec_minmax,
65 .procname = "no_activity_timeout",
66 .data = &sysctl_rose_no_activity_timeout,
67 .maxlen = sizeof(int),
69 .proc_handler = proc_dointvec_minmax,
74 .procname = "acknowledge_hold_back_timeout",
75 .data = &sysctl_rose_ack_hold_back_timeout,
76 .maxlen = sizeof(int),
78 .proc_handler = proc_dointvec_minmax,
83 .procname = "routing_control",
84 .data = &sysctl_rose_routing_control,
85 .maxlen = sizeof(int),
87 .proc_handler = proc_dointvec_minmax,
92 .procname = "link_fail_timeout",
93 .data = &sysctl_rose_link_fail_timeout,
94 .maxlen = sizeof(int),
96 .proc_handler = proc_dointvec_minmax,
97 .extra1 = &min_ftimer,
101 .procname = "maximum_virtual_circuits",
102 .data = &sysctl_rose_maximum_vcs,
103 .maxlen = sizeof(int),
105 .proc_handler = proc_dointvec_minmax,
106 .extra1 = &min_maxvcs,
107 .extra2 = &max_maxvcs
110 .procname = "window_size",
111 .data = &sysctl_rose_window_size,
112 .maxlen = sizeof(int),
114 .proc_handler = proc_dointvec_minmax,
115 .extra1 = &min_window,
116 .extra2 = &max_window
121 void __init rose_register_sysctl(void)
123 rose_table_header = register_net_sysctl(&init_net, "net/rose", rose_table);
126 void rose_unregister_sysctl(void)
128 unregister_net_sysctl_table(rose_table_header);