ipv4.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * ipv4 in net namespaces
  3. */
  4. #ifndef __NETNS_IPV4_H__
  5. #define __NETNS_IPV4_H__
  6. #include <linux/uidgid.h>
  7. #include <net/inet_frag.h>
  8. #include <linux/rcupdate.h>
  9. struct tcpm_hash_bucket;
  10. struct ctl_table_header;
  11. struct ipv4_devconf;
  12. struct fib_rules_ops;
  13. struct hlist_head;
  14. struct fib_table;
  15. struct sock;
  16. struct local_ports {
  17. seqlock_t lock;
  18. int range[2];
  19. bool warned;
  20. };
  21. struct ping_group_range {
  22. seqlock_t lock;
  23. kgid_t range[2];
  24. };
  25. struct netns_ipv4 {
  26. #ifdef CONFIG_SYSCTL
  27. struct ctl_table_header *forw_hdr;
  28. struct ctl_table_header *frags_hdr;
  29. struct ctl_table_header *ipv4_hdr;
  30. struct ctl_table_header *route_hdr;
  31. struct ctl_table_header *xfrm4_hdr;
  32. #endif
  33. struct ipv4_devconf *devconf_all;
  34. struct ipv4_devconf *devconf_dflt;
  35. #ifdef CONFIG_IP_MULTIPLE_TABLES
  36. struct fib_rules_ops *rules_ops;
  37. bool fib_has_custom_rules;
  38. struct fib_table __rcu *fib_local;
  39. struct fib_table __rcu *fib_main;
  40. struct fib_table __rcu *fib_default;
  41. #endif
  42. #ifdef CONFIG_IP_ROUTE_CLASSID
  43. int fib_num_tclassid_users;
  44. #endif
  45. struct hlist_head *fib_table_hash;
  46. bool fib_offload_disabled;
  47. struct sock *fibnl;
  48. struct sock * __percpu *icmp_sk;
  49. struct sock *mc_autojoin_sk;
  50. struct inet_peer_base *peers;
  51. struct sock * __percpu *tcp_sk;
  52. struct netns_frags frags;
  53. #ifdef CONFIG_NETFILTER
  54. struct xt_table *iptable_filter;
  55. struct xt_table *iptable_mangle;
  56. struct xt_table *iptable_raw;
  57. struct xt_table *arptable_filter;
  58. #ifdef CONFIG_SECURITY
  59. struct xt_table *iptable_security;
  60. #endif
  61. struct xt_table *nat_table;
  62. #endif
  63. int sysctl_icmp_echo_ignore_all;
  64. int sysctl_icmp_echo_ignore_broadcasts;
  65. int sysctl_icmp_ignore_bogus_error_responses;
  66. int sysctl_icmp_ratelimit;
  67. int sysctl_icmp_ratemask;
  68. int sysctl_icmp_errors_use_inbound_ifaddr;
  69. struct local_ports ip_local_ports;
  70. int sysctl_tcp_ecn;
  71. int sysctl_tcp_ecn_fallback;
  72. int sysctl_ip_default_ttl;
  73. int sysctl_ip_no_pmtu_disc;
  74. int sysctl_ip_fwd_use_pmtu;
  75. int sysctl_ip_nonlocal_bind;
  76. /* Shall we try to damage output packets if routing dev changes? */
  77. int sysctl_ip_dynaddr;
  78. int sysctl_ip_early_demux;
  79. int sysctl_fwmark_reflect;
  80. int sysctl_tcp_fwmark_accept;
  81. #ifdef CONFIG_NET_L3_MASTER_DEV
  82. int sysctl_tcp_l3mdev_accept;
  83. #endif
  84. int sysctl_tcp_mtu_probing;
  85. int sysctl_tcp_base_mss;
  86. int sysctl_tcp_probe_threshold;
  87. u32 sysctl_tcp_probe_interval;
  88. int sysctl_tcp_keepalive_time;
  89. int sysctl_tcp_keepalive_probes;
  90. int sysctl_tcp_keepalive_intvl;
  91. int sysctl_tcp_syn_retries;
  92. int sysctl_tcp_synack_retries;
  93. int sysctl_tcp_syncookies;
  94. int sysctl_tcp_reordering;
  95. int sysctl_tcp_retries1;
  96. int sysctl_tcp_retries2;
  97. int sysctl_tcp_orphan_retries;
  98. int sysctl_tcp_fin_timeout;
  99. unsigned int sysctl_tcp_notsent_lowat;
  100. int sysctl_igmp_max_memberships;
  101. int sysctl_igmp_max_msf;
  102. int sysctl_igmp_llm_reports;
  103. int sysctl_igmp_qrv;
  104. struct ping_group_range ping_group_range;
  105. atomic_t dev_addr_genid;
  106. #ifdef CONFIG_SYSCTL
  107. unsigned long *sysctl_local_reserved_ports;
  108. #endif
  109. #ifdef CONFIG_IP_MROUTE
  110. #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
  111. struct mr_table *mrt;
  112. #else
  113. struct list_head mr_tables;
  114. struct fib_rules_ops *mr_rules_ops;
  115. #endif
  116. #endif
  117. atomic_t rt_genid;
  118. };
  119. #endif