xfrm.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef __NETNS_XFRM_H
  2. #define __NETNS_XFRM_H
  3. #include <linux/list.h>
  4. #include <linux/wait.h>
  5. #include <linux/workqueue.h>
  6. #include <linux/xfrm.h>
  7. #include <net/dst_ops.h>
  8. struct ctl_table_header;
  9. struct xfrm_policy_hash {
  10. struct hlist_head *table;
  11. unsigned int hmask;
  12. };
  13. struct netns_xfrm {
  14. struct list_head state_all;
  15. /*
  16. * Hash table to find appropriate SA towards given target (endpoint of
  17. * tunnel or destination of transport mode) allowed by selector.
  18. *
  19. * Main use is finding SA after policy selected tunnel or transport
  20. * mode. Also, it can be used by ah/esp icmp error handler to find
  21. * offending SA.
  22. */
  23. struct hlist_head *state_bydst;
  24. struct hlist_head *state_bysrc;
  25. struct hlist_head *state_byspi;
  26. unsigned int state_hmask;
  27. unsigned int state_num;
  28. struct work_struct state_hash_work;
  29. struct hlist_head state_gc_list;
  30. struct work_struct state_gc_work;
  31. wait_queue_head_t km_waitq;
  32. struct list_head policy_all;
  33. struct hlist_head *policy_byidx;
  34. unsigned int policy_idx_hmask;
  35. struct hlist_head policy_inexact[XFRM_POLICY_MAX * 2];
  36. struct xfrm_policy_hash policy_bydst[XFRM_POLICY_MAX * 2];
  37. unsigned int policy_count[XFRM_POLICY_MAX * 2];
  38. struct work_struct policy_hash_work;
  39. struct dst_ops xfrm4_dst_ops;
  40. #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
  41. struct dst_ops xfrm6_dst_ops;
  42. #endif
  43. struct sock *nlsk;
  44. struct sock *nlsk_stash;
  45. u32 sysctl_aevent_etime;
  46. u32 sysctl_aevent_rseqth;
  47. int sysctl_larval_drop;
  48. u32 sysctl_acq_expires;
  49. #ifdef CONFIG_SYSCTL
  50. struct ctl_table_header *sysctl_hdr;
  51. #endif
  52. };
  53. #endif