ipv4.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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_main;
  39. struct fib_table __rcu *fib_default;
  40. #endif
  41. #ifdef CONFIG_IP_ROUTE_CLASSID
  42. int fib_num_tclassid_users;
  43. #endif
  44. struct hlist_head *fib_table_hash;
  45. bool fib_offload_disabled;
  46. struct sock *fibnl;
  47. struct sock * __percpu *icmp_sk;
  48. struct sock *mc_autojoin_sk;
  49. struct inet_peer_base *peers;
  50. struct sock * __percpu *tcp_sk;
  51. struct netns_frags frags;
  52. #ifdef CONFIG_NETFILTER
  53. struct xt_table *iptable_filter;
  54. struct xt_table *iptable_mangle;
  55. struct xt_table *iptable_raw;
  56. struct xt_table *arptable_filter;
  57. #ifdef CONFIG_SECURITY
  58. struct xt_table *iptable_security;
  59. #endif
  60. struct xt_table *nat_table;
  61. #endif
  62. int sysctl_icmp_echo_ignore_all;
  63. int sysctl_icmp_echo_ignore_broadcasts;
  64. int sysctl_icmp_ignore_bogus_error_responses;
  65. int sysctl_icmp_ratelimit;
  66. int sysctl_icmp_ratemask;
  67. int sysctl_icmp_errors_use_inbound_ifaddr;
  68. struct local_ports ip_local_ports;
  69. int sysctl_tcp_ecn;
  70. int sysctl_tcp_ecn_fallback;
  71. int sysctl_ip_default_ttl;
  72. int sysctl_ip_no_pmtu_disc;
  73. int sysctl_ip_fwd_use_pmtu;
  74. int sysctl_ip_nonlocal_bind;
  75. /* Shall we try to damage output packets if routing dev changes? */
  76. int sysctl_ip_dynaddr;
  77. int sysctl_ip_early_demux;
  78. int sysctl_fwmark_reflect;
  79. int sysctl_tcp_fwmark_accept;
  80. #ifdef CONFIG_NET_L3_MASTER_DEV
  81. int sysctl_tcp_l3mdev_accept;
  82. #endif
  83. int sysctl_tcp_mtu_probing;
  84. int sysctl_tcp_base_mss;
  85. int sysctl_tcp_probe_threshold;
  86. u32 sysctl_tcp_probe_interval;
  87. int sysctl_tcp_keepalive_time;
  88. int sysctl_tcp_keepalive_probes;
  89. int sysctl_tcp_keepalive_intvl;
  90. int sysctl_tcp_syn_retries;
  91. int sysctl_tcp_synack_retries;
  92. int sysctl_tcp_syncookies;
  93. int sysctl_tcp_reordering;
  94. int sysctl_tcp_retries1;
  95. int sysctl_tcp_retries2;
  96. int sysctl_tcp_orphan_retries;
  97. int sysctl_tcp_fin_timeout;
  98. unsigned int sysctl_tcp_notsent_lowat;
  99. int sysctl_igmp_max_memberships;
  100. int sysctl_igmp_max_msf;
  101. int sysctl_igmp_llm_reports;
  102. int sysctl_igmp_qrv;
  103. struct ping_group_range ping_group_range;
  104. atomic_t dev_addr_genid;
  105. #ifdef CONFIG_SYSCTL
  106. unsigned long *sysctl_local_reserved_ports;
  107. #endif
  108. #ifdef CONFIG_IP_MROUTE
  109. #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
  110. struct mr_table *mrt;
  111. #else
  112. struct list_head mr_tables;
  113. struct fib_rules_ops *mr_rules_ops;
  114. #endif
  115. #endif
  116. #ifdef CONFIG_IP_ROUTE_MULTIPATH
  117. int sysctl_fib_multipath_use_neigh;
  118. #endif
  119. atomic_t rt_genid;
  120. };
  121. #endif