]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - net/ipv6/sysctl_net_ipv6.c
[CRYPTO] api: Add crypto_attr_alg_name
[mirror_ubuntu-bionic-kernel.git] / net / ipv6 / sysctl_net_ipv6.c
CommitLineData
1da177e4
LT
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>
1da177e4
LT
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>
04128f23 15#include <net/inet_frag.h>
1da177e4 16
1da177e4
LT
17#ifdef CONFIG_SYSCTL
18
19static 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",
04128f23 45 .data = &ip6_frags_ctl.high_thresh,
1da177e4
LT
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",
04128f23 53 .data = &ip6_frags_ctl.low_thresh,
1da177e4
LT
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",
04128f23 61 .data = &ip6_frags_ctl.timeout,
1da177e4
LT
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",
04128f23 70 .data = &ip6_frags_ctl.secret_interval,
1da177e4
LT
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
87static struct ctl_table_header *ipv6_sysctl_header;
88
89static ctl_table ipv6_net_table[] = {
90 {
91 .ctl_name = NET_IPV6,
92 .procname = "ipv6",
93 .mode = 0555,
94 .child = ipv6_table
95 },
1ab1457c 96 { .ctl_name = 0 }
1da177e4
LT
97};
98
99static ctl_table ipv6_root_table[] = {
100 {
101 .ctl_name = CTL_NET,
102 .procname = "net",
103 .mode = 0555,
104 .child = ipv6_net_table
105 },
1ab1457c 106 { .ctl_name = 0 }
1da177e4
LT
107};
108
109void ipv6_sysctl_register(void)
110{
0b4d4147 111 ipv6_sysctl_header = register_sysctl_table(ipv6_root_table);
1da177e4
LT
112}
113
114void ipv6_sysctl_unregister(void)
115{
116 unregister_sysctl_table(ipv6_sysctl_header);
117}
118
119#endif /* CONFIG_SYSCTL */
120
121
122