ipv6.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * ipv6 in net namespaces
  4. */
  5. #include <net/inet_frag.h>
  6. #ifndef __NETNS_IPV6_H__
  7. #define __NETNS_IPV6_H__
  8. #include <net/dst_ops.h>
  9. struct ctl_table_header;
  10. struct netns_sysctl_ipv6 {
  11. #ifdef CONFIG_SYSCTL
  12. struct ctl_table_header *hdr;
  13. struct ctl_table_header *route_hdr;
  14. struct ctl_table_header *icmp_hdr;
  15. struct ctl_table_header *frags_hdr;
  16. struct ctl_table_header *xfrm6_hdr;
  17. #endif
  18. int bindv6only;
  19. int flush_delay;
  20. int ip6_rt_max_size;
  21. int ip6_rt_gc_min_interval;
  22. int ip6_rt_gc_timeout;
  23. int ip6_rt_gc_interval;
  24. int ip6_rt_gc_elasticity;
  25. int ip6_rt_mtu_expires;
  26. int ip6_rt_min_advmss;
  27. int multipath_hash_policy;
  28. int flowlabel_consistency;
  29. int auto_flowlabels;
  30. int icmpv6_time;
  31. int icmpv6_echo_ignore_all;
  32. int anycast_src_echo_reply;
  33. int ip_nonlocal_bind;
  34. int fwmark_reflect;
  35. int idgen_retries;
  36. int idgen_delay;
  37. int flowlabel_state_ranges;
  38. int flowlabel_reflect;
  39. int max_dst_opts_cnt;
  40. int max_hbh_opts_cnt;
  41. int max_dst_opts_len;
  42. int max_hbh_opts_len;
  43. int seg6_flowlabel;
  44. };
  45. struct netns_ipv6 {
  46. struct netns_sysctl_ipv6 sysctl;
  47. struct ipv6_devconf *devconf_all;
  48. struct ipv6_devconf *devconf_dflt;
  49. struct inet_peer_base *peers;
  50. struct netns_frags frags;
  51. #ifdef CONFIG_NETFILTER
  52. struct xt_table *ip6table_filter;
  53. struct xt_table *ip6table_mangle;
  54. struct xt_table *ip6table_raw;
  55. #ifdef CONFIG_SECURITY
  56. struct xt_table *ip6table_security;
  57. #endif
  58. struct xt_table *ip6table_nat;
  59. #endif
  60. struct fib6_info *fib6_null_entry;
  61. struct rt6_info *ip6_null_entry;
  62. struct rt6_statistics *rt6_stats;
  63. struct timer_list ip6_fib_timer;
  64. struct hlist_head *fib_table_hash;
  65. struct fib6_table *fib6_main_tbl;
  66. struct list_head fib6_walkers;
  67. struct dst_ops ip6_dst_ops;
  68. rwlock_t fib6_walker_lock;
  69. spinlock_t fib6_gc_lock;
  70. unsigned int ip6_rt_gc_expire;
  71. unsigned long ip6_rt_last_gc;
  72. #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  73. unsigned int fib6_rules_require_fldissect;
  74. bool fib6_has_custom_rules;
  75. struct rt6_info *ip6_prohibit_entry;
  76. struct rt6_info *ip6_blk_hole_entry;
  77. struct fib6_table *fib6_local_tbl;
  78. struct fib_rules_ops *fib6_rules_ops;
  79. #endif
  80. struct sock **icmp_sk;
  81. struct sock *ndisc_sk;
  82. struct sock *tcp_sk;
  83. struct sock *igmp_sk;
  84. struct sock *mc_autojoin_sk;
  85. #ifdef CONFIG_IPV6_MROUTE
  86. #ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES
  87. struct mr_table *mrt6;
  88. #else
  89. struct list_head mr6_tables;
  90. struct fib_rules_ops *mr6_rules_ops;
  91. #endif
  92. #endif
  93. atomic_t dev_addr_genid;
  94. atomic_t fib6_sernum;
  95. struct seg6_pernet_data *seg6_data;
  96. struct fib_notifier_ops *notifier_ops;
  97. struct fib_notifier_ops *ip6mr_notifier_ops;
  98. unsigned int ipmr_seq; /* protected by rtnl_mutex */
  99. struct {
  100. struct hlist_head head;
  101. spinlock_t lock;
  102. u32 seq;
  103. } ip6addrlbl_table;
  104. };
  105. #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
  106. struct netns_nf_frag {
  107. struct netns_frags frags;
  108. };
  109. #endif
  110. #endif