xfrm.h 1.4 KB

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