ia64/linux-2.6.18-xen.hg

view net/dccp/sysctl.c @ 673:3161879fdf22

[IA64] xencomm: support XENMEM_add_to_physmap and XENMEM_remove_from_phsymap

support XENMEM_add_to_physmap and XENMEM_remove_from_phsymap.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Tue Sep 16 21:26:15 2008 +0900 (2008-09-16)
parents 831230e53067
children
line source
1 /*
2 * net/dccp/sysctl.c
3 *
4 * An implementation of the DCCP protocol
5 * Arnaldo Carvalho de Melo <acme@mandriva.com>
6 *
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.
10 */
12 #include <linux/mm.h>
13 #include <linux/sysctl.h>
15 #ifndef CONFIG_SYSCTL
16 #error This file should not be compiled without CONFIG_SYSCTL defined
17 #endif
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[] = {
27 {
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),
32 .mode = 0644,
33 .proc_handler = proc_dointvec,
34 },
35 {
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),
40 .mode = 0644,
41 .proc_handler = proc_dointvec,
42 },
43 {
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),
48 .mode = 0644,
49 .proc_handler = proc_dointvec,
50 },
51 {
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),
56 .mode = 0644,
57 .proc_handler = proc_dointvec,
58 },
59 {
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),
64 .mode = 0644,
65 .proc_handler = proc_dointvec,
66 },
67 {
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),
72 .mode = 0644,
73 .proc_handler = proc_dointvec,
74 },
75 { .ctl_name = 0, }
76 };
78 static struct ctl_table dccp_table[] = {
79 {
80 .ctl_name = NET_DCCP_DEFAULT,
81 .procname = "default",
82 .mode = 0555,
83 .child = dccp_default_table,
84 },
85 { .ctl_name = 0, },
86 };
88 static struct ctl_table dccp_dir_table[] = {
89 {
90 .ctl_name = NET_DCCP,
91 .procname = "dccp",
92 .mode = 0555,
93 .child = dccp_table,
94 },
95 { .ctl_name = 0, },
96 };
98 static struct ctl_table dccp_root_table[] = {
99 {
100 .ctl_name = CTL_NET,
101 .procname = "net",
102 .mode = 0555,
103 .child = dccp_dir_table,
104 },
105 { .ctl_name = 0, },
106 };
108 static struct ctl_table_header *dccp_table_header;
110 int __init dccp_sysctl_init(void)
111 {
112 dccp_table_header = register_sysctl_table(dccp_root_table, 1);
114 return dccp_table_header != NULL ? 0 : -ENOMEM;
115 }
117 void dccp_sysctl_exit(void)
118 {
119 if (dccp_table_header != NULL) {
120 unregister_sysctl_table(dccp_table_header);
121 dccp_table_header = NULL;
122 }
123 }