1 /* sysctl.c: Rx RPC control
3 * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version.
12 #include <linux/config.h>
13 #include <linux/sched.h>
14 #include <linux/slab.h>
15 #include <linux/module.h>
16 #include <linux/sysctl.h>
17 #include <rxrpc/types.h>
18 #include <rxrpc/rxrpc.h>
19 #include <asm/errno.h>
28 static struct ctl_table_header *rxrpc_sysctl = NULL;
30 static ctl_table rxrpc_sysctl_table[] = {
34 .data = &rxrpc_kdebug,
35 .maxlen = sizeof(int),
37 .proc_handler = &proc_dointvec
42 .data = &rxrpc_ktrace,
43 .maxlen = sizeof(int),
45 .proc_handler = &proc_dointvec
50 .data = &rxrpc_kproto,
51 .maxlen = sizeof(int),
53 .proc_handler = &proc_dointvec
59 .maxlen = sizeof(int),
61 .proc_handler = &proc_dointvec
65 .procname = "peertimo",
66 .data = &rxrpc_peer_timeout,
67 .maxlen = sizeof(unsigned long),
69 .proc_handler = &proc_doulongvec_minmax
73 .procname = "conntimo",
74 .data = &rxrpc_conn_timeout,
75 .maxlen = sizeof(unsigned long),
77 .proc_handler = &proc_doulongvec_minmax
82 static ctl_table rxrpc_dir_sysctl_table[] = {
88 .child = rxrpc_sysctl_table
92 #endif /* CONFIG_SYSCTL */
94 /*****************************************************************************/
96 * initialise the sysctl stuff for Rx RPC
98 int rxrpc_sysctl_init(void)
101 rxrpc_sysctl = register_sysctl_table(rxrpc_dir_sysctl_table, 0);
104 #endif /* CONFIG_SYSCTL */
107 } /* end rxrpc_sysctl_init() */
109 /*****************************************************************************/
111 * clean up the sysctl stuff for Rx RPC
113 void rxrpc_sysctl_cleanup(void)
117 unregister_sysctl_table(rxrpc_sysctl);
120 #endif /* CONFIG_SYSCTL */
122 } /* end rxrpc_sysctl_cleanup() */