[PATCH] w1: Userspace communication protocol over connector.
[linux-2.6/verdex.git] / net / dccp / sysctl.c
blob64c89e9c229ea1d4298a83c947ff29837d9382ee
1 /*
2 * net/dccp/sysctl.c
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>
13 #include <linux/mm.h>
14 #include <linux/sysctl.h>
16 #ifndef CONFIG_SYSCTL
17 #error This file should not be compiled without CONFIG_SYSCTL defined
18 #endif
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),
33 .mode = 0644,
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),
41 .mode = 0644,
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),
49 .mode = 0644,
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),
57 .mode = 0644,
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),
65 .mode = 0644,
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),
73 .mode = 0644,
74 .proc_handler = proc_dointvec,
76 { .ctl_name = 0, }
79 static struct ctl_table dccp_table[] = {
81 .ctl_name = NET_DCCP_DEFAULT,
82 .procname = "default",
83 .mode = 0555,
84 .child = dccp_default_table,
86 { .ctl_name = 0, },
89 static struct ctl_table dccp_dir_table[] = {
91 .ctl_name = NET_DCCP,
92 .procname = "dccp",
93 .mode = 0555,
94 .child = dccp_table,
96 { .ctl_name = 0, },
99 static struct ctl_table dccp_root_table[] = {
101 .ctl_name = CTL_NET,
102 .procname = "net",
103 .mode = 0555,
104 .child = dccp_dir_table,
106 { .ctl_name = 0, },
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;