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>
16 #error This file should not be compiled without CONFIG_SYSCTL defined
19 extern int dccp_feat_default_sequence_window;
20 extern int dccp_feat_default_rx_ccid;
21 extern int dccp_feat_default_tx_ccid;
22 extern int dccp_feat_default_ack_ratio;
23 extern int dccp_feat_default_send_ack_vector;
24 extern int dccp_feat_default_send_ndp_count;
26 static struct ctl_table dccp_default_table[] = {
28 .ctl_name = NET_DCCP_DEFAULT_SEQ_WINDOW,
29 .procname = "seq_window",
30 .data = &dccp_feat_default_sequence_window,
31 .maxlen = sizeof(dccp_feat_default_sequence_window),
33 .proc_handler = proc_dointvec,
36 .ctl_name = NET_DCCP_DEFAULT_RX_CCID,
37 .procname = "rx_ccid",
38 .data = &dccp_feat_default_rx_ccid,
39 .maxlen = sizeof(dccp_feat_default_rx_ccid),
41 .proc_handler = proc_dointvec,
44 .ctl_name = NET_DCCP_DEFAULT_TX_CCID,
45 .procname = "tx_ccid",
46 .data = &dccp_feat_default_tx_ccid,
47 .maxlen = sizeof(dccp_feat_default_tx_ccid),
49 .proc_handler = proc_dointvec,
52 .ctl_name = NET_DCCP_DEFAULT_ACK_RATIO,
53 .procname = "ack_ratio",
54 .data = &dccp_feat_default_ack_ratio,
55 .maxlen = sizeof(dccp_feat_default_ack_ratio),
57 .proc_handler = proc_dointvec,
60 .ctl_name = NET_DCCP_DEFAULT_SEND_ACKVEC,
61 .procname = "send_ackvec",
62 .data = &dccp_feat_default_send_ack_vector,
63 .maxlen = sizeof(dccp_feat_default_send_ack_vector),
65 .proc_handler = proc_dointvec,
68 .ctl_name = NET_DCCP_DEFAULT_SEND_NDP,
69 .procname = "send_ndp",
70 .data = &dccp_feat_default_send_ndp_count,
71 .maxlen = sizeof(dccp_feat_default_send_ndp_count),
73 .proc_handler = proc_dointvec,
78 static struct ctl_table dccp_table[] = {
80 .ctl_name = NET_DCCP_DEFAULT,
81 .procname = "default",
83 .child = dccp_default_table,
88 static struct ctl_table dccp_dir_table[] = {
98 static struct ctl_table dccp_root_table[] = {
103 .child = dccp_dir_table,
108 static struct ctl_table_header *dccp_table_header;
110 int __init dccp_sysctl_init(void)
112 dccp_table_header = register_sysctl_table(dccp_root_table, 1);
114 return dccp_table_header != NULL ? 0 : -ENOMEM;
117 void dccp_sysctl_exit(void)
119 if (dccp_table_header != NULL) {
120 unregister_sysctl_table(dccp_table_header);
121 dccp_table_header = NULL;