ipv6.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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 <linux/android_kabi.h>
  9. #include <net/dst_ops.h>
  10. #include <uapi/linux/icmpv6.h>
  11. struct ctl_table_header;
  12. struct netns_sysctl_ipv6 {
  13. #ifdef CONFIG_SYSCTL
  14. struct ctl_table_header *hdr;
  15. struct ctl_table_header *route_hdr;
  16. struct ctl_table_header *icmp_hdr;
  17. struct ctl_table_header *frags_hdr;
  18. struct ctl_table_header *xfrm6_hdr;
  19. #endif
  20. int flush_delay;
  21. int ip6_rt_max_size;
  22. int ip6_rt_gc_min_interval;
  23. int ip6_rt_gc_timeout;
  24. int ip6_rt_gc_interval;
  25. int ip6_rt_gc_elasticity;
  26. int ip6_rt_mtu_expires;
  27. int ip6_rt_min_advmss;
  28. u32 multipath_hash_fields;
  29. u8 multipath_hash_policy;
  30. u8 bindv6only;
  31. u8 flowlabel_consistency;
  32. u8 auto_flowlabels;
  33. int icmpv6_time;
  34. u8 icmpv6_echo_ignore_all;
  35. u8 icmpv6_echo_ignore_multicast;
  36. u8 icmpv6_echo_ignore_anycast;
  37. DECLARE_BITMAP(icmpv6_ratemask, ICMPV6_MSG_MAX + 1);
  38. unsigned long *icmpv6_ratemask_ptr;
  39. u8 anycast_src_echo_reply;
  40. u8 ip_nonlocal_bind;
  41. u8 fwmark_reflect;
  42. u8 flowlabel_state_ranges;
  43. int idgen_retries;
  44. int idgen_delay;
  45. int flowlabel_reflect;
  46. int max_dst_opts_cnt;
  47. int max_hbh_opts_cnt;
  48. int max_dst_opts_len;
  49. int max_hbh_opts_len;
  50. int seg6_flowlabel;
  51. u32 ioam6_id;
  52. u64 ioam6_id_wide;
  53. int skip_notify_on_dev_down;
  54. u8 fib_notify_on_flag_change;
  55. ANDROID_KABI_RESERVE(1);
  56. };
  57. struct netns_ipv6 {
  58. /* Keep ip6_dst_ops at the beginning of netns_sysctl_ipv6 */
  59. struct dst_ops ip6_dst_ops;
  60. struct netns_sysctl_ipv6 sysctl;
  61. struct ipv6_devconf *devconf_all;
  62. struct ipv6_devconf *devconf_dflt;
  63. struct inet_peer_base *peers;
  64. struct fqdir *fqdir;
  65. struct fib6_info *fib6_null_entry;
  66. struct rt6_info *ip6_null_entry;
  67. struct rt6_statistics *rt6_stats;
  68. struct timer_list ip6_fib_timer;
  69. struct hlist_head *fib_table_hash;
  70. struct fib6_table *fib6_main_tbl;
  71. struct list_head fib6_walkers;
  72. rwlock_t fib6_walker_lock;
  73. spinlock_t fib6_gc_lock;
  74. atomic_t ip6_rt_gc_expire;
  75. unsigned long ip6_rt_last_gc;
  76. unsigned char flowlabel_has_excl;
  77. #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  78. bool fib6_has_custom_rules;
  79. unsigned int fib6_rules_require_fldissect;
  80. #ifdef CONFIG_IPV6_SUBTREES
  81. unsigned int fib6_routes_require_src;
  82. #endif
  83. struct rt6_info *ip6_prohibit_entry;
  84. struct rt6_info *ip6_blk_hole_entry;
  85. struct fib6_table *fib6_local_tbl;
  86. struct fib_rules_ops *fib6_rules_ops;
  87. #endif
  88. struct sock *ndisc_sk;
  89. struct sock *tcp_sk;
  90. struct sock *igmp_sk;
  91. struct sock *mc_autojoin_sk;
  92. struct hlist_head *inet6_addr_lst;
  93. spinlock_t addrconf_hash_lock;
  94. struct delayed_work addr_chk_work;
  95. #ifdef CONFIG_IPV6_MROUTE
  96. #ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES
  97. struct mr_table *mrt6;
  98. #else
  99. struct list_head mr6_tables;
  100. struct fib_rules_ops *mr6_rules_ops;
  101. #endif
  102. #endif
  103. atomic_t dev_addr_genid;
  104. atomic_t fib6_sernum;
  105. struct seg6_pernet_data *seg6_data;
  106. struct fib_notifier_ops *notifier_ops;
  107. struct fib_notifier_ops *ip6mr_notifier_ops;
  108. unsigned int ipmr_seq; /* protected by rtnl_mutex */
  109. struct {
  110. struct hlist_head head;
  111. spinlock_t lock;
  112. u32 seq;
  113. } ip6addrlbl_table;
  114. struct ioam6_pernet_data *ioam6_data;
  115. ANDROID_KABI_RESERVE(1);
  116. };
  117. #if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
  118. struct netns_nf_frag {
  119. struct fqdir *fqdir;
  120. };
  121. #endif
  122. #endif