ipv4.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * ipv4 in net namespaces
  3. */
  4. #ifndef __NETNS_IPV4_H__
  5. #define __NETNS_IPV4_H__
  6. #include <net/inet_frag.h>
  7. struct tcpm_hash_bucket;
  8. struct ctl_table_header;
  9. struct ipv4_devconf;
  10. struct fib_rules_ops;
  11. struct hlist_head;
  12. struct fib_table;
  13. struct sock;
  14. struct netns_ipv4 {
  15. #ifdef CONFIG_SYSCTL
  16. struct ctl_table_header *forw_hdr;
  17. struct ctl_table_header *frags_hdr;
  18. struct ctl_table_header *ipv4_hdr;
  19. struct ctl_table_header *route_hdr;
  20. #endif
  21. struct ipv4_devconf *devconf_all;
  22. struct ipv4_devconf *devconf_dflt;
  23. #ifdef CONFIG_IP_MULTIPLE_TABLES
  24. struct fib_rules_ops *rules_ops;
  25. bool fib_has_custom_rules;
  26. struct fib_table *fib_local;
  27. struct fib_table *fib_main;
  28. struct fib_table *fib_default;
  29. #endif
  30. #ifdef CONFIG_IP_ROUTE_CLASSID
  31. int fib_num_tclassid_users;
  32. #endif
  33. struct hlist_head *fib_table_hash;
  34. struct sock *fibnl;
  35. struct sock **icmp_sk;
  36. struct inet_peer_base *peers;
  37. struct tcpm_hash_bucket *tcp_metrics_hash;
  38. unsigned int tcp_metrics_hash_log;
  39. struct netns_frags frags;
  40. #ifdef CONFIG_NETFILTER
  41. struct xt_table *iptable_filter;
  42. struct xt_table *iptable_mangle;
  43. struct xt_table *iptable_raw;
  44. struct xt_table *arptable_filter;
  45. #ifdef CONFIG_SECURITY
  46. struct xt_table *iptable_security;
  47. #endif
  48. struct xt_table *nat_table;
  49. struct hlist_head *nat_bysource;
  50. unsigned int nat_htable_size;
  51. #endif
  52. int sysctl_icmp_echo_ignore_all;
  53. int sysctl_icmp_echo_ignore_broadcasts;
  54. int sysctl_icmp_ignore_bogus_error_responses;
  55. int sysctl_icmp_ratelimit;
  56. int sysctl_icmp_ratemask;
  57. int sysctl_icmp_errors_use_inbound_ifaddr;
  58. unsigned int sysctl_ping_group_range[2];
  59. long sysctl_tcp_mem[3];
  60. atomic_t rt_genid;
  61. atomic_t dev_addr_genid;
  62. #ifdef CONFIG_IP_MROUTE
  63. #ifndef CONFIG_IP_MROUTE_MULTIPLE_TABLES
  64. struct mr_table *mrt;
  65. #else
  66. struct list_head mr_tables;
  67. struct fib_rules_ops *mr_rules_ops;
  68. #endif
  69. #endif
  70. };
  71. #endif