4 * An implementation of the DCCP protocol
5 * Arnaldo Carvalho de Melo <acme@mandriva.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License v2
9 * as published by the Free Software Foundation.
13 #include <linux/sysctl.h>
18 #error This file should not be compiled without CONFIG_SYSCTL defined
24 static unsigned long seqw_min = DCCPF_SEQ_WMIN,
25 seqw_max = 0xFFFFFFFF; /* maximum on 32 bit */
27 static struct ctl_table dccp_default_table[] = {
29 .procname = "seq_window",
30 .data = &sysctl_dccp_sequence_window,
31 .maxlen = sizeof(sysctl_dccp_sequence_window),
33 .proc_handler = proc_doulongvec_minmax,
34 .extra1 = &seqw_min, /* RFC 4340, 7.5.2 */
38 .procname = "rx_ccid",
39 .data = &sysctl_dccp_rx_ccid,
40 .maxlen = sizeof(sysctl_dccp_rx_ccid),
42 .proc_handler = proc_dointvec_minmax,
44 .extra2 = &u8_max, /* RFC 4340, 10. */
47 .procname = "tx_ccid",
48 .data = &sysctl_dccp_tx_ccid,
49 .maxlen = sizeof(sysctl_dccp_tx_ccid),
51 .proc_handler = proc_dointvec_minmax,
53 .extra2 = &u8_max, /* RFC 4340, 10. */
56 .procname = "request_retries",
57 .data = &sysctl_dccp_request_retries,
58 .maxlen = sizeof(sysctl_dccp_request_retries),
60 .proc_handler = proc_dointvec_minmax,
65 .procname = "retries1",
66 .data = &sysctl_dccp_retries1,
67 .maxlen = sizeof(sysctl_dccp_retries1),
69 .proc_handler = proc_dointvec_minmax,
74 .procname = "retries2",
75 .data = &sysctl_dccp_retries2,
76 .maxlen = sizeof(sysctl_dccp_retries2),
78 .proc_handler = proc_dointvec_minmax,
83 .procname = "tx_qlen",
84 .data = &sysctl_dccp_tx_qlen,
85 .maxlen = sizeof(sysctl_dccp_tx_qlen),
87 .proc_handler = proc_dointvec_minmax,
91 .procname = "sync_ratelimit",
92 .data = &sysctl_dccp_sync_ratelimit,
93 .maxlen = sizeof(sysctl_dccp_sync_ratelimit),
95 .proc_handler = proc_dointvec_ms_jiffies,
101 static struct ctl_table_header *dccp_table_header;
103 int __init dccp_sysctl_init(void)
105 dccp_table_header = register_net_sysctl(&init_net, "net/dccp/default",
108 return dccp_table_header != NULL ? 0 : -ENOMEM;
111 void dccp_sysctl_exit(void)
113 if (dccp_table_header != NULL) {
114 unregister_net_sysctl_table(dccp_table_header);
115 dccp_table_header = NULL;