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
25 static unsigned long seqw_min = DCCPF_SEQ_WMIN,
26 seqw_max = 0xFFFFFFFF; /* maximum on 32 bit */
28 static struct ctl_table dccp_default_table[] = {
30 .procname = "seq_window",
31 .data = &sysctl_dccp_sequence_window,
32 .maxlen = sizeof(sysctl_dccp_sequence_window),
34 .proc_handler = proc_doulongvec_minmax,
35 .extra1 = &seqw_min, /* RFC 4340, 7.5.2 */
39 .procname = "rx_ccid",
40 .data = &sysctl_dccp_rx_ccid,
41 .maxlen = sizeof(sysctl_dccp_rx_ccid),
43 .proc_handler = proc_dointvec_minmax,
45 .extra2 = &u8_max, /* RFC 4340, 10. */
48 .procname = "tx_ccid",
49 .data = &sysctl_dccp_tx_ccid,
50 .maxlen = sizeof(sysctl_dccp_tx_ccid),
52 .proc_handler = proc_dointvec_minmax,
54 .extra2 = &u8_max, /* RFC 4340, 10. */
57 .procname = "request_retries",
58 .data = &sysctl_dccp_request_retries,
59 .maxlen = sizeof(sysctl_dccp_request_retries),
61 .proc_handler = proc_dointvec_minmax,
66 .procname = "retries1",
67 .data = &sysctl_dccp_retries1,
68 .maxlen = sizeof(sysctl_dccp_retries1),
70 .proc_handler = proc_dointvec_minmax,
75 .procname = "retries2",
76 .data = &sysctl_dccp_retries2,
77 .maxlen = sizeof(sysctl_dccp_retries2),
79 .proc_handler = proc_dointvec_minmax,
84 .procname = "tx_qlen",
85 .data = &sysctl_dccp_tx_qlen,
86 .maxlen = sizeof(sysctl_dccp_tx_qlen),
88 .proc_handler = proc_dointvec_minmax,
92 .procname = "sync_ratelimit",
93 .data = &sysctl_dccp_sync_ratelimit,
94 .maxlen = sizeof(sysctl_dccp_sync_ratelimit),
96 .proc_handler = proc_dointvec_ms_jiffies,
102 static struct ctl_table_header *dccp_table_header;
104 int __init dccp_sysctl_init(void)
106 dccp_table_header = register_net_sysctl(&init_net, "net/dccp/default",
109 return dccp_table_header != NULL ? 0 : -ENOMEM;
112 void dccp_sysctl_exit(void)
114 if (dccp_table_header != NULL) {
115 unregister_net_sysctl_table(dccp_table_header);
116 dccp_table_header = NULL;