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/sched.h>
13 #include <linux/slab.h>
14 #include <linux/module.h>
15 #include <linux/sysctl.h>
16 #include <rxrpc/types.h>
17 #include <rxrpc/rxrpc.h>
18 #include <asm/errno.h>
27 static struct ctl_table_header *rxrpc_sysctl = NULL;
29 static ctl_table rxrpc_sysctl_table[] = {
33 .data = &rxrpc_kdebug,
34 .maxlen = sizeof(int),
36 .proc_handler = &proc_dointvec
41 .data = &rxrpc_ktrace,
42 .maxlen = sizeof(int),
44 .proc_handler = &proc_dointvec
49 .data = &rxrpc_kproto,
50 .maxlen = sizeof(int),
52 .proc_handler = &proc_dointvec
58 .maxlen = sizeof(int),
60 .proc_handler = &proc_dointvec
64 .procname = "peertimo",
65 .data = &rxrpc_peer_timeout,
66 .maxlen = sizeof(unsigned long),
68 .proc_handler = &proc_doulongvec_minmax
72 .procname = "conntimo",
73 .data = &rxrpc_conn_timeout,
74 .maxlen = sizeof(unsigned long),
76 .proc_handler = &proc_doulongvec_minmax
81 static ctl_table rxrpc_dir_sysctl_table[] = {
87 .child = rxrpc_sysctl_table
91 #endif /* CONFIG_SYSCTL */
93 /*****************************************************************************/
95 * initialise the sysctl stuff for Rx RPC
97 int rxrpc_sysctl_init(void)
100 rxrpc_sysctl = register_sysctl_table(rxrpc_dir_sysctl_table, 0);
103 #endif /* CONFIG_SYSCTL */
106 } /* end rxrpc_sysctl_init() */
108 /*****************************************************************************/
110 * clean up the sysctl stuff for Rx RPC
112 void rxrpc_sysctl_cleanup(void)
116 unregister_sysctl_table(rxrpc_sysctl);
119 #endif /* CONFIG_SYSCTL */
121 } /* end rxrpc_sysctl_cleanup() */