blob: 21edaf1f79161535af7ae1ae3ae7535ff1a236e3 [file] [log] [blame]
Daniel Lezcanob0f159d2008-01-10 02:49:06 -08001/*
2 * ipv6 in net namespaces
3 */
4
Daniel Lezcanoe71e0342008-01-10 02:56:03 -08005#include <net/inet_frag.h>
6
Daniel Lezcanob0f159d2008-01-10 02:49:06 -08007#ifndef __NETNS_IPV6_H__
8#define __NETNS_IPV6_H__
Alexey Dobriyan86393e52009-08-29 01:34:49 +00009#include <net/dst_ops.h>
Daniel Lezcanob0f159d2008-01-10 02:49:06 -080010
Daniel Lezcano760f2d02008-01-10 02:53:43 -080011struct ctl_table_header;
12
13struct netns_sysctl_ipv6 {
14#ifdef CONFIG_SYSCTL
Eric W. Biederman6dceb032012-04-19 13:37:09 +000015 struct ctl_table_header *hdr;
16 struct ctl_table_header *route_hdr;
17 struct ctl_table_header *icmp_hdr;
Pavel Emelyanove4a2d5c2008-01-22 06:08:36 -080018 struct ctl_table_header *frags_hdr;
Michal Kubecek8d068872013-02-06 10:46:33 +010019 struct ctl_table_header *xfrm6_hdr;
Daniel Lezcano760f2d02008-01-10 02:53:43 -080020#endif
Daniel Lezcano99bc9c42008-01-10 02:54:53 -080021 int bindv6only;
Daniel Lezcano49905092008-01-10 03:01:01 -080022 int flush_delay;
23 int ip6_rt_max_size;
24 int ip6_rt_gc_min_interval;
25 int ip6_rt_gc_timeout;
26 int ip6_rt_gc_interval;
27 int ip6_rt_gc_elasticity;
28 int ip6_rt_mtu_expires;
29 int ip6_rt_min_advmss;
Florent Fourcot6444f722014-01-17 17:15:05 +010030 int flowlabel_consistency;
Daniel Lezcano41a76902008-01-10 03:02:40 -080031 int icmpv6_time;
FX Le Bailec35b612014-01-13 15:59:01 +010032 int anycast_src_echo_reply;
Daniel Lezcano760f2d02008-01-10 02:53:43 -080033};
34
Daniel Lezcanob0f159d2008-01-10 02:49:06 -080035struct netns_ipv6 {
Daniel Lezcano760f2d02008-01-10 02:53:43 -080036 struct netns_sysctl_ipv6 sysctl;
Pavel Emelyanove0da5a42008-01-10 17:42:55 -080037 struct ipv6_devconf *devconf_all;
38 struct ipv6_devconf *devconf_dflt;
Gao fengc8a627e2012-06-08 01:20:41 +000039 struct inet_peer_base *peers;
Pavel Emelyanovac18e752008-01-22 06:02:14 -080040 struct netns_frags frags;
Alexey Dobriyan8280aa62008-01-31 04:04:13 -080041#ifdef CONFIG_NETFILTER
42 struct xt_table *ip6table_filter;
43 struct xt_table *ip6table_mangle;
44 struct xt_table *ip6table_raw;
Alexey Dobriyane9d38972010-01-18 08:08:37 +010045#ifdef CONFIG_SECURITY
James Morris17e6e592008-06-09 15:58:05 -070046 struct xt_table *ip6table_security;
Alexey Dobriyan8280aa62008-01-31 04:04:13 -080047#endif
Patrick McHardy58a317f2012-08-26 19:14:12 +020048 struct xt_table *ip6table_nat;
Alexey Dobriyane9d38972010-01-18 08:08:37 +010049#endif
Daniel Lezcano8ed67782008-03-04 13:48:30 -080050 struct rt6_info *ip6_null_entry;
Benjamin Theryc5728722008-03-03 23:34:17 -080051 struct rt6_statistics *rt6_stats;
Stephen Hemminger417f28b2008-07-22 14:33:45 -070052 struct timer_list ip6_fib_timer;
Daniel Lezcano58f09b72008-03-03 23:25:27 -080053 struct hlist_head *fib_table_hash;
54 struct fib6_table *fib6_main_tbl;
Alexey Dobriyan86393e52009-08-29 01:34:49 +000055 struct dst_ops ip6_dst_ops;
Benjamin Thery6891a342008-03-04 13:49:47 -080056 unsigned int ip6_rt_gc_expire;
57 unsigned long ip6_rt_last_gc;
Daniel Lezcano58f09b72008-03-03 23:25:27 -080058#ifdef CONFIG_IPV6_MULTIPLE_TABLES
Daniel Lezcano8ed67782008-03-04 13:48:30 -080059 struct rt6_info *ip6_prohibit_entry;
60 struct rt6_info *ip6_blk_hole_entry;
Daniel Lezcano58f09b72008-03-03 23:25:27 -080061 struct fib6_table *fib6_local_tbl;
Daniel Lezcanodcabb812008-03-03 23:33:08 -080062 struct fib_rules_ops *fib6_rules_ops;
Daniel Lezcano58f09b72008-03-03 23:25:27 -080063#endif
Denis V. Lunev98c6d1b2008-02-29 11:21:22 -080064 struct sock **icmp_sk;
Daniel Lezcano1762f7e2008-03-07 11:15:34 -080065 struct sock *ndisc_sk;
Daniel Lezcano93ec9262008-03-07 11:16:02 -080066 struct sock *tcp_sk;
Daniel Lezcanob8ad0cb2008-03-07 11:16:55 -080067 struct sock *igmp_sk;
Benjamin Therybd91b8b2008-12-10 16:07:08 -080068#ifdef CONFIG_IPV6_MROUTE
Patrick McHardyd1db2752010-05-11 14:40:55 +020069#ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES
Patrick McHardy6bd52142010-05-11 14:40:53 +020070 struct mr6_table *mrt6;
Patrick McHardyd1db2752010-05-11 14:40:55 +020071#else
72 struct list_head mr6_tables;
73 struct fib_rules_ops *mr6_rules_ops;
74#endif
Benjamin Therybd91b8b2008-12-10 16:07:08 -080075#endif
Nicolas Dichtel63998ac2013-03-22 06:28:43 +000076 atomic_t dev_addr_genid;
fan.duca4c3fc2013-07-30 08:33:53 +080077 atomic_t rt_genid;
Daniel Lezcanob0f159d2008-01-10 02:49:06 -080078};
Amerigo Wangc038a762012-09-18 16:50:08 +000079
80#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
81struct netns_nf_frag {
82 struct netns_sysctl_ipv6 sysctl;
83 struct netns_frags frags;
84};
85#endif
86
Daniel Lezcanob0f159d2008-01-10 02:49:06 -080087#endif