ipv4.h 1.8 KB

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