xfrm.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. u32 sysctl_aevent_etime;
  40. u32 sysctl_aevent_rseqth;
  41. int sysctl_larval_drop;
  42. u32 sysctl_acq_expires;
  43. #ifdef CONFIG_SYSCTL
  44. struct ctl_table_header *sysctl_hdr;
  45. #endif
  46. };
  47. #endif