conntrack.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #ifndef __NETNS_CONNTRACK_H
  2. #define __NETNS_CONNTRACK_H
  3. #include <linux/list.h>
  4. #include <linux/list_nulls.h>
  5. #include <linux/atomic.h>
  6. #include <linux/netfilter/nf_conntrack_tcp.h>
  7. struct ctl_table_header;
  8. struct nf_conntrack_ecache;
  9. struct nf_proto_net {
  10. #ifdef CONFIG_SYSCTL
  11. struct ctl_table_header *ctl_table_header;
  12. struct ctl_table *ctl_table;
  13. #ifdef CONFIG_NF_CONNTRACK_PROC_COMPAT
  14. struct ctl_table_header *ctl_compat_header;
  15. struct ctl_table *ctl_compat_table;
  16. #endif
  17. #endif
  18. unsigned int users;
  19. };
  20. struct nf_generic_net {
  21. struct nf_proto_net pn;
  22. unsigned int timeout;
  23. };
  24. struct nf_tcp_net {
  25. struct nf_proto_net pn;
  26. unsigned int timeouts[TCP_CONNTRACK_TIMEOUT_MAX];
  27. unsigned int tcp_loose;
  28. unsigned int tcp_be_liberal;
  29. unsigned int tcp_max_retrans;
  30. };
  31. enum udp_conntrack {
  32. UDP_CT_UNREPLIED,
  33. UDP_CT_REPLIED,
  34. UDP_CT_MAX
  35. };
  36. struct nf_udp_net {
  37. struct nf_proto_net pn;
  38. unsigned int timeouts[UDP_CT_MAX];
  39. };
  40. struct nf_icmp_net {
  41. struct nf_proto_net pn;
  42. unsigned int timeout;
  43. };
  44. struct nf_ip_net {
  45. struct nf_generic_net generic;
  46. struct nf_tcp_net tcp;
  47. struct nf_udp_net udp;
  48. struct nf_icmp_net icmp;
  49. struct nf_icmp_net icmpv6;
  50. #if defined(CONFIG_SYSCTL) && defined(CONFIG_NF_CONNTRACK_PROC_COMPAT)
  51. struct ctl_table_header *ctl_table_header;
  52. struct ctl_table *ctl_table;
  53. #endif
  54. };
  55. struct netns_ct {
  56. atomic_t count;
  57. unsigned int expect_count;
  58. unsigned int htable_size;
  59. struct kmem_cache *nf_conntrack_cachep;
  60. struct hlist_nulls_head *hash;
  61. struct hlist_head *expect_hash;
  62. struct hlist_nulls_head unconfirmed;
  63. struct hlist_nulls_head dying;
  64. struct ip_conntrack_stat __percpu *stat;
  65. struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
  66. struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
  67. int sysctl_events;
  68. unsigned int sysctl_events_retry_timeout;
  69. int sysctl_acct;
  70. int sysctl_tstamp;
  71. int sysctl_checksum;
  72. unsigned int sysctl_log_invalid; /* Log invalid packets */
  73. int sysctl_auto_assign_helper;
  74. bool auto_assign_helper_warned;
  75. struct nf_ip_net nf_ct_proto;
  76. #ifdef CONFIG_SYSCTL
  77. struct ctl_table_header *sysctl_header;
  78. struct ctl_table_header *acct_sysctl_header;
  79. struct ctl_table_header *tstamp_sysctl_header;
  80. struct ctl_table_header *event_sysctl_header;
  81. struct ctl_table_header *helper_sysctl_header;
  82. #endif
  83. char *slabname;
  84. };
  85. #endif