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>
17 #error This file should not be compiled without CONFIG_SYSCTL defined
20 static struct ctl_table dccp_default_table[] = {
22 .ctl_name = NET_DCCP_DEFAULT_SEQ_WINDOW,
23 .procname = "seq_window",
24 .data = &dccp_feat_default_sequence_window,
25 .maxlen = sizeof(dccp_feat_default_sequence_window),
27 .proc_handler = proc_dointvec,
30 .ctl_name = NET_DCCP_DEFAULT_RX_CCID,
31 .procname = "rx_ccid",
32 .data = &dccp_feat_default_rx_ccid,
33 .maxlen = sizeof(dccp_feat_default_rx_ccid),
35 .proc_handler = proc_dointvec,
38 .ctl_name = NET_DCCP_DEFAULT_TX_CCID,
39 .procname = "tx_ccid",
40 .data = &dccp_feat_default_tx_ccid,
41 .maxlen = sizeof(dccp_feat_default_tx_ccid),
43 .proc_handler = proc_dointvec,
46 .ctl_name = NET_DCCP_DEFAULT_ACK_RATIO,
47 .procname = "ack_ratio",
48 .data = &dccp_feat_default_ack_ratio,
49 .maxlen = sizeof(dccp_feat_default_ack_ratio),
51 .proc_handler = proc_dointvec,
54 .ctl_name = NET_DCCP_DEFAULT_SEND_ACKVEC,
55 .procname = "send_ackvec",
56 .data = &dccp_feat_default_send_ack_vector,
57 .maxlen = sizeof(dccp_feat_default_send_ack_vector),
59 .proc_handler = proc_dointvec,
62 .ctl_name = NET_DCCP_DEFAULT_SEND_NDP,
63 .procname = "send_ndp",
64 .data = &dccp_feat_default_send_ndp_count,
65 .maxlen = sizeof(dccp_feat_default_send_ndp_count),
67 .proc_handler = proc_dointvec,
72 static struct ctl_table dccp_table[] = {
74 .ctl_name = NET_DCCP_DEFAULT,
75 .procname = "default",
77 .child = dccp_default_table,
82 static struct ctl_table dccp_dir_table[] = {
92 static struct ctl_table dccp_root_table[] = {
97 .child = dccp_dir_table,
102 static struct ctl_table_header *dccp_table_header;
104 int __init dccp_sysctl_init(void)
106 dccp_table_header = register_sysctl_table(dccp_root_table, 1);
108 return dccp_table_header != NULL ? 0 : -ENOMEM;
111 void dccp_sysctl_exit(void)
113 if (dccp_table_header != NULL) {
114 unregister_sysctl_table(dccp_table_header);
115 dccp_table_header = NULL;