Merge master.kernel.org:/home/rmk/linux-2.6-i2c manually
[pandora-kernel.git] / net / ipv6 / sysctl_net_ipv6.c
1 /*
2  * sysctl_net_ipv6.c: sysctl interface to net IPV6 subsystem.
3  *
4  * Changes:
5  * YOSHIFUJI Hideaki @USAGI:    added icmp sysctl table.
6  */
7
8 #include <linux/mm.h>
9 #include <linux/sysctl.h>
10 #include <linux/config.h>
11 #include <linux/in6.h>
12 #include <linux/ipv6.h>
13 #include <net/ndisc.h>
14 #include <net/ipv6.h>
15 #include <net/addrconf.h>
16
17 #ifdef CONFIG_SYSCTL
18
19 static ctl_table ipv6_table[] = {
20         {
21                 .ctl_name       = NET_IPV6_ROUTE,
22                 .procname       = "route",
23                 .maxlen         = 0,
24                 .mode           = 0555,
25                 .child          = ipv6_route_table
26         },
27         {
28                 .ctl_name       = NET_IPV6_ICMP,
29                 .procname       = "icmp",
30                 .maxlen         = 0,
31                 .mode           = 0555,
32                 .child          = ipv6_icmp_table
33         },
34         {
35                 .ctl_name       = NET_IPV6_BINDV6ONLY,
36                 .procname       = "bindv6only",
37                 .data           = &sysctl_ipv6_bindv6only,
38                 .maxlen         = sizeof(int),
39                 .mode           = 0644,
40                 .proc_handler   = &proc_dointvec
41         },
42         {
43                 .ctl_name       = NET_IPV6_IP6FRAG_HIGH_THRESH,
44                 .procname       = "ip6frag_high_thresh",
45                 .data           = &sysctl_ip6frag_high_thresh,
46                 .maxlen         = sizeof(int),
47                 .mode           = 0644,
48                 .proc_handler   = &proc_dointvec
49         },
50         {
51                 .ctl_name       = NET_IPV6_IP6FRAG_LOW_THRESH,
52                 .procname       = "ip6frag_low_thresh",
53                 .data           = &sysctl_ip6frag_low_thresh,
54                 .maxlen         = sizeof(int),
55                 .mode           = 0644,
56                 .proc_handler   = &proc_dointvec
57         },
58         {
59                 .ctl_name       = NET_IPV6_IP6FRAG_TIME,
60                 .procname       = "ip6frag_time",
61                 .data           = &sysctl_ip6frag_time,
62                 .maxlen         = sizeof(int),
63                 .mode           = 0644,
64                 .proc_handler   = &proc_dointvec_jiffies,
65                 .strategy       = &sysctl_jiffies,
66         },
67         {
68                 .ctl_name       = NET_IPV6_IP6FRAG_SECRET_INTERVAL,
69                 .procname       = "ip6frag_secret_interval",
70                 .data           = &sysctl_ip6frag_secret_interval,
71                 .maxlen         = sizeof(int),
72                 .mode           = 0644,
73                 .proc_handler   = &proc_dointvec_jiffies,
74                 .strategy       = &sysctl_jiffies
75         },
76         {
77                 .ctl_name       = NET_IPV6_MLD_MAX_MSF,
78                 .procname       = "mld_max_msf",
79                 .data           = &sysctl_mld_max_msf,
80                 .maxlen         = sizeof(int),
81                 .mode           = 0644,
82                 .proc_handler   = &proc_dointvec
83         },
84         { .ctl_name = 0 }
85 };
86
87 static struct ctl_table_header *ipv6_sysctl_header;
88
89 static ctl_table ipv6_net_table[] = {
90         {
91                 .ctl_name       = NET_IPV6,
92                 .procname       = "ipv6",
93                 .mode           = 0555,
94                 .child          = ipv6_table
95         },
96         { .ctl_name = 0 }
97 };
98
99 static ctl_table ipv6_root_table[] = {
100         {
101                 .ctl_name       = CTL_NET,
102                 .procname       = "net",
103                 .mode           = 0555,
104                 .child          = ipv6_net_table
105         },
106         { .ctl_name = 0 }
107 };
108
109 void ipv6_sysctl_register(void)
110 {
111         ipv6_sysctl_header = register_sysctl_table(ipv6_root_table, 0);
112 }
113
114 void ipv6_sysctl_unregister(void)
115 {
116         unregister_sysctl_table(ipv6_sysctl_header);
117 }
118
119 #endif /* CONFIG_SYSCTL */
120
121
122