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