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 = 32;
26 static struct ctl_table dccp_default_table[] = {
28 .procname = "seq_window",
29 .data = &sysctl_dccp_sequence_window,
30 .maxlen = sizeof(sysctl_dccp_sequence_window),
32 .proc_handler = proc_doulongvec_minmax,
33 .extra1 = &seqw_min, /* RFC 4340, 7.5.2 */
36 .procname = "rx_ccid",
37 .data = &sysctl_dccp_rx_ccid,
38 .maxlen = sizeof(sysctl_dccp_rx_ccid),
40 .proc_handler = proc_dointvec_minmax,
42 .extra2 = &u8_max, /* RFC 4340, 10. */
45 .procname = "tx_ccid",
46 .data = &sysctl_dccp_tx_ccid,
47 .maxlen = sizeof(sysctl_dccp_tx_ccid),
49 .proc_handler = proc_dointvec_minmax,
51 .extra2 = &u8_max, /* RFC 4340, 10. */
54 .procname = "request_retries",
55 .data = &sysctl_dccp_request_retries,
56 .maxlen = sizeof(sysctl_dccp_request_retries),
58 .proc_handler = proc_dointvec_minmax,
63 .procname = "retries1",
64 .data = &sysctl_dccp_retries1,
65 .maxlen = sizeof(sysctl_dccp_retries1),
67 .proc_handler = proc_dointvec_minmax,
72 .procname = "retries2",
73 .data = &sysctl_dccp_retries2,
74 .maxlen = sizeof(sysctl_dccp_retries2),
76 .proc_handler = proc_dointvec_minmax,
81 .procname = "tx_qlen",
82 .data = &sysctl_dccp_tx_qlen,
83 .maxlen = sizeof(sysctl_dccp_tx_qlen),
85 .proc_handler = proc_dointvec_minmax,
89 .procname = "sync_ratelimit",
90 .data = &sysctl_dccp_sync_ratelimit,
91 .maxlen = sizeof(sysctl_dccp_sync_ratelimit),
93 .proc_handler = proc_dointvec_ms_jiffies,
99 static struct ctl_path dccp_path[] = {
100 { .procname = "net", .ctl_name = CTL_NET, },
101 { .procname = "dccp", .ctl_name = NET_DCCP, },
102 { .procname = "default", .ctl_name = NET_DCCP_DEFAULT, },
106 static struct ctl_table_header *dccp_table_header;
108 int __init dccp_sysctl_init(void)
110 dccp_table_header = register_sysctl_paths(dccp_path,
113 return dccp_table_header != NULL ? 0 : -ENOMEM;
116 void dccp_sysctl_exit(void)
118 if (dccp_table_header != NULL) {
119 unregister_sysctl_table(dccp_table_header);
120 dccp_table_header = NULL;