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
21 static struct ctl_table dccp_default_table
[] = {
23 .procname
= "seq_window",
24 .data
= &sysctl_dccp_feat_sequence_window
,
25 .maxlen
= sizeof(sysctl_dccp_feat_sequence_window
),
27 .proc_handler
= proc_dointvec
,
30 .procname
= "rx_ccid",
31 .data
= &sysctl_dccp_feat_rx_ccid
,
32 .maxlen
= sizeof(sysctl_dccp_feat_rx_ccid
),
34 .proc_handler
= proc_dointvec
,
37 .procname
= "tx_ccid",
38 .data
= &sysctl_dccp_feat_tx_ccid
,
39 .maxlen
= sizeof(sysctl_dccp_feat_tx_ccid
),
41 .proc_handler
= proc_dointvec
,
44 .procname
= "ack_ratio",
45 .data
= &sysctl_dccp_feat_ack_ratio
,
46 .maxlen
= sizeof(sysctl_dccp_feat_ack_ratio
),
48 .proc_handler
= proc_dointvec
,
51 .procname
= "send_ackvec",
52 .data
= &sysctl_dccp_feat_send_ack_vector
,
53 .maxlen
= sizeof(sysctl_dccp_feat_send_ack_vector
),
55 .proc_handler
= proc_dointvec
,
58 .procname
= "send_ndp",
59 .data
= &sysctl_dccp_feat_send_ndp_count
,
60 .maxlen
= sizeof(sysctl_dccp_feat_send_ndp_count
),
62 .proc_handler
= proc_dointvec
,
65 .procname
= "request_retries",
66 .data
= &sysctl_dccp_request_retries
,
67 .maxlen
= sizeof(sysctl_dccp_request_retries
),
69 .proc_handler
= proc_dointvec
,
72 .procname
= "retries1",
73 .data
= &sysctl_dccp_retries1
,
74 .maxlen
= sizeof(sysctl_dccp_retries1
),
76 .proc_handler
= proc_dointvec
,
79 .procname
= "retries2",
80 .data
= &sysctl_dccp_retries2
,
81 .maxlen
= sizeof(sysctl_dccp_retries2
),
83 .proc_handler
= proc_dointvec
,
86 .procname
= "tx_qlen",
87 .data
= &sysctl_dccp_tx_qlen
,
88 .maxlen
= sizeof(sysctl_dccp_tx_qlen
),
90 .proc_handler
= proc_dointvec
,
93 .procname
= "sync_ratelimit",
94 .data
= &sysctl_dccp_sync_ratelimit
,
95 .maxlen
= sizeof(sysctl_dccp_sync_ratelimit
),
97 .proc_handler
= proc_dointvec_ms_jiffies
,
103 static struct ctl_table dccp_table
[] = {
105 .ctl_name
= NET_DCCP_DEFAULT
,
106 .procname
= "default",
108 .child
= dccp_default_table
,
113 static struct ctl_table dccp_dir_table
[] = {
115 .ctl_name
= NET_DCCP
,
123 static struct ctl_table dccp_root_table
[] = {
128 .child
= dccp_dir_table
,
133 static struct ctl_table_header
*dccp_table_header
;
135 int __init
dccp_sysctl_init(void)
137 dccp_table_header
= register_sysctl_table(dccp_root_table
);
139 return dccp_table_header
!= NULL
? 0 : -ENOMEM
;
142 void dccp_sysctl_exit(void)
144 if (dccp_table_header
!= NULL
) {
145 unregister_sysctl_table(dccp_table_header
);
146 dccp_table_header
= NULL
;