summaryrefslogtreecommitdiffstats
path: root/net/rose/sysctl_net_rose.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/rose/sysctl_net_rose.c')
-rw-r--r--net/rose/sysctl_net_rose.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/net/rose/sysctl_net_rose.c b/net/rose/sysctl_net_rose.c
new file mode 100644
index 000000000..558702dbd
--- /dev/null
+++ b/net/rose/sysctl_net_rose.c
@@ -0,0 +1,62 @@
+/* -*- linux-c -*-
+ * sysctl_net_rose.c: sysctl interface to net Rose subsystem.
+ *
+ * Begun April 1, 1996, Mike Shaver.
+ * Added /proc/sys/net/rose directory entry (empty =) ). [MS]
+ */
+
+#include <linux/mm.h>
+#include <linux/sysctl.h>
+#include <net/ax25.h>
+#include <net/rose.h>
+
+static int min_timer[] = {1 * PR_SLOWHZ};
+static int max_timer[] = {300 * PR_SLOWHZ};
+static int min_idle[] = {0 * PR_SLOWHZ};
+static int max_idle[] = {65535 * PR_SLOWHZ};
+static int min_route[] = {0};
+static int max_route[] = {0};
+
+static struct ctl_table_header *rose_table_header;
+
+static ctl_table rose_table[] = {
+ {NET_ROSE_RESTART_REQUEST_TIMEOUT, "restart_request_timeout",
+ &sysctl_rose_restart_request_timeout, sizeof(int), 0644, NULL,
+ &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_timer, &max_timer},
+ {NET_ROSE_CALL_REQUEST_TIMEOUT, "call_request_timeout",
+ &sysctl_rose_call_request_timeout, sizeof(int), 0644, NULL,
+ &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_timer, &max_timer},
+ {NET_ROSE_RESET_REQUEST_TIMEOUT, "reset_request_timeout",
+ &sysctl_rose_reset_request_timeout, sizeof(int), 0644, NULL,
+ &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_timer, &max_timer},
+ {NET_ROSE_CLEAR_REQUEST_TIMEOUT, "clear_request_timeout",
+ &sysctl_rose_clear_request_timeout, sizeof(int), 0644, NULL,
+ &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_timer, &max_timer},
+ {NET_ROSE_NO_ACTIVITY_TIMEOUT, "no_activity_timeout",
+ &sysctl_rose_no_activity_timeout, sizeof(int), 0644, NULL,
+ &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_idle, &max_idle},
+ {NET_ROSE_ROUTING_CONTROL, "routing_control",
+ &sysctl_rose_routing_control, sizeof(int), 0644, NULL,
+ &proc_dointvec_minmax, &sysctl_intvec, NULL, &min_route, &max_route},
+ {0}
+};
+
+static ctl_table rose_dir_table[] = {
+ {NET_ROSE, "rose", NULL, 0, 0555, rose_table},
+ {0}
+};
+
+static ctl_table rose_root_table[] = {
+ {CTL_NET, "net", NULL, 0, 0555, rose_dir_table},
+ {0}
+};
+
+void rose_register_sysctl(void)
+{
+ rose_table_header = register_sysctl_table(rose_root_table, 1);
+}
+
+void rose_unregister_sysctl(void)
+{
+ unregister_sysctl_table(rose_table_header);
+}