0001
0002
0003
0004
0005
0006 #include <net/inet_frag.h>
0007
0008 #ifndef __NETNS_IPV6_H__
0009 #define __NETNS_IPV6_H__
0010 #include <net/dst_ops.h>
0011 #include <uapi/linux/icmpv6.h>
0012
0013 struct ctl_table_header;
0014
0015 struct netns_sysctl_ipv6 {
0016 #ifdef CONFIG_SYSCTL
0017 struct ctl_table_header *hdr;
0018 struct ctl_table_header *route_hdr;
0019 struct ctl_table_header *icmp_hdr;
0020 struct ctl_table_header *frags_hdr;
0021 struct ctl_table_header *xfrm6_hdr;
0022 #endif
0023 int flush_delay;
0024 int ip6_rt_max_size;
0025 int ip6_rt_gc_min_interval;
0026 int ip6_rt_gc_timeout;
0027 int ip6_rt_gc_interval;
0028 int ip6_rt_gc_elasticity;
0029 int ip6_rt_mtu_expires;
0030 int ip6_rt_min_advmss;
0031 u32 multipath_hash_fields;
0032 u8 multipath_hash_policy;
0033 u8 bindv6only;
0034 u8 flowlabel_consistency;
0035 u8 auto_flowlabels;
0036 int icmpv6_time;
0037 u8 icmpv6_echo_ignore_all;
0038 u8 icmpv6_echo_ignore_multicast;
0039 u8 icmpv6_echo_ignore_anycast;
0040 DECLARE_BITMAP(icmpv6_ratemask, ICMPV6_MSG_MAX + 1);
0041 unsigned long *icmpv6_ratemask_ptr;
0042 u8 anycast_src_echo_reply;
0043 u8 ip_nonlocal_bind;
0044 u8 fwmark_reflect;
0045 u8 flowlabel_state_ranges;
0046 int idgen_retries;
0047 int idgen_delay;
0048 int flowlabel_reflect;
0049 int max_dst_opts_cnt;
0050 int max_hbh_opts_cnt;
0051 int max_dst_opts_len;
0052 int max_hbh_opts_len;
0053 int seg6_flowlabel;
0054 u32 ioam6_id;
0055 u64 ioam6_id_wide;
0056 bool skip_notify_on_dev_down;
0057 u8 fib_notify_on_flag_change;
0058 };
0059
0060 struct netns_ipv6 {
0061
0062 struct dst_ops ip6_dst_ops;
0063
0064 struct netns_sysctl_ipv6 sysctl;
0065 struct ipv6_devconf *devconf_all;
0066 struct ipv6_devconf *devconf_dflt;
0067 struct inet_peer_base *peers;
0068 struct fqdir *fqdir;
0069 struct fib6_info *fib6_null_entry;
0070 struct rt6_info *ip6_null_entry;
0071 struct rt6_statistics *rt6_stats;
0072 struct timer_list ip6_fib_timer;
0073 struct hlist_head *fib_table_hash;
0074 struct fib6_table *fib6_main_tbl;
0075 struct list_head fib6_walkers;
0076 rwlock_t fib6_walker_lock;
0077 spinlock_t fib6_gc_lock;
0078 atomic_t ip6_rt_gc_expire;
0079 unsigned long ip6_rt_last_gc;
0080 unsigned char flowlabel_has_excl;
0081 #ifdef CONFIG_IPV6_MULTIPLE_TABLES
0082 bool fib6_has_custom_rules;
0083 unsigned int fib6_rules_require_fldissect;
0084 #ifdef CONFIG_IPV6_SUBTREES
0085 unsigned int fib6_routes_require_src;
0086 #endif
0087 struct rt6_info *ip6_prohibit_entry;
0088 struct rt6_info *ip6_blk_hole_entry;
0089 struct fib6_table *fib6_local_tbl;
0090 struct fib_rules_ops *fib6_rules_ops;
0091 #endif
0092 struct sock *ndisc_sk;
0093 struct sock *tcp_sk;
0094 struct sock *igmp_sk;
0095 struct sock *mc_autojoin_sk;
0096
0097 struct hlist_head *inet6_addr_lst;
0098 spinlock_t addrconf_hash_lock;
0099 struct delayed_work addr_chk_work;
0100
0101 #ifdef CONFIG_IPV6_MROUTE
0102 #ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES
0103 struct mr_table *mrt6;
0104 #else
0105 struct list_head mr6_tables;
0106 struct fib_rules_ops *mr6_rules_ops;
0107 #endif
0108 #endif
0109 atomic_t dev_addr_genid;
0110 atomic_t fib6_sernum;
0111 struct seg6_pernet_data *seg6_data;
0112 struct fib_notifier_ops *notifier_ops;
0113 struct fib_notifier_ops *ip6mr_notifier_ops;
0114 unsigned int ipmr_seq;
0115 struct {
0116 struct hlist_head head;
0117 spinlock_t lock;
0118 u32 seq;
0119 } ip6addrlbl_table;
0120 struct ioam6_pernet_data *ioam6_data;
0121 };
0122
0123 #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
0124 struct netns_nf_frag {
0125 struct fqdir *fqdir;
0126 };
0127 #endif
0128
0129 #endif