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.
12 #include <linux/config.h>
14 #include <linux/sysctl.h>
17 #error This file should not be compiled without CONFIG_SYSCTL defined
20 extern int dccp_feat_default_sequence_window
;
21 extern int dccp_feat_default_rx_ccid
;
22 extern int dccp_feat_default_tx_ccid
;
23 extern int dccp_feat_default_ack_ratio
;
24 extern int dccp_feat_default_send_ack_vector
;
25 extern int dccp_feat_default_send_ndp_count
;
27 static struct ctl_table dccp_default_table
[] = {
29 .ctl_name
= NET_DCCP_DEFAULT_SEQ_WINDOW
,
30 .procname
= "seq_window",
31 .data
= &dccp_feat_default_sequence_window
,
32 .maxlen
= sizeof(dccp_feat_default_sequence_window
),
34 .proc_handler
= proc_dointvec
,
37 .ctl_name
= NET_DCCP_DEFAULT_RX_CCID
,
38 .procname
= "rx_ccid",
39 .data
= &dccp_feat_default_rx_ccid
,
40 .maxlen
= sizeof(dccp_feat_default_rx_ccid
),
42 .proc_handler
= proc_dointvec
,
45 .ctl_name
= NET_DCCP_DEFAULT_TX_CCID
,
46 .procname
= "tx_ccid",
47 .data
= &dccp_feat_default_tx_ccid
,
48 .maxlen
= sizeof(dccp_feat_default_tx_ccid
),
50 .proc_handler
= proc_dointvec
,
53 .ctl_name
= NET_DCCP_DEFAULT_ACK_RATIO
,
54 .procname
= "ack_ratio",
55 .data
= &dccp_feat_default_ack_ratio
,
56 .maxlen
= sizeof(dccp_feat_default_ack_ratio
),
58 .proc_handler
= proc_dointvec
,
61 .ctl_name
= NET_DCCP_DEFAULT_SEND_ACKVEC
,
62 .procname
= "send_ackvec",
63 .data
= &dccp_feat_default_send_ack_vector
,
64 .maxlen
= sizeof(dccp_feat_default_send_ack_vector
),
66 .proc_handler
= proc_dointvec
,
69 .ctl_name
= NET_DCCP_DEFAULT_SEND_NDP
,
70 .procname
= "send_ndp",
71 .data
= &dccp_feat_default_send_ndp_count
,
72 .maxlen
= sizeof(dccp_feat_default_send_ndp_count
),
74 .proc_handler
= proc_dointvec
,
79 static struct ctl_table dccp_table
[] = {
81 .ctl_name
= NET_DCCP_DEFAULT
,
82 .procname
= "default",
84 .child
= dccp_default_table
,
89 static struct ctl_table dccp_dir_table
[] = {
99 static struct ctl_table dccp_root_table
[] = {
104 .child
= dccp_dir_table
,
109 static struct ctl_table_header
*dccp_table_header
;
111 int __init
dccp_sysctl_init(void)
113 dccp_table_header
= register_sysctl_table(dccp_root_table
, 1);
115 return dccp_table_header
!= NULL
? 0 : -ENOMEM
;
118 void dccp_sysctl_exit(void)
120 if (dccp_table_header
!= NULL
) {
121 unregister_sysctl_table(dccp_table_header
);
122 dccp_table_header
= NULL
;