Commit | Line | Data |
---|---|---|
d62ddc21 AD |
1 | #ifndef __NETNS_XFRM_H |
2 | #define __NETNS_XFRM_H | |
3 | ||
9d4139c7 | 4 | #include <linux/list.h> |
50a30657 | 5 | #include <linux/wait.h> |
63082733 | 6 | #include <linux/workqueue.h> |
8b18f8ea | 7 | #include <linux/xfrm.h> |
9d4139c7 | 8 | |
a35f6c5d AD |
9 | struct xfrm_policy_hash { |
10 | struct hlist_head *table; | |
11 | unsigned int hmask; | |
12 | }; | |
13 | ||
d62ddc21 | 14 | struct netns_xfrm { |
9d4139c7 | 15 | struct list_head state_all; |
73d189dc AD |
16 | /* |
17 | * Hash table to find appropriate SA towards given target (endpoint of | |
18 | * tunnel or destination of transport mode) allowed by selector. | |
19 | * | |
20 | * Main use is finding SA after policy selected tunnel or transport | |
21 | * mode. Also, it can be used by ah/esp icmp error handler to find | |
22 | * offending SA. | |
23 | */ | |
24 | struct hlist_head *state_bydst; | |
d320bbb3 | 25 | struct hlist_head *state_bysrc; |
b754a4fd | 26 | struct hlist_head *state_byspi; |
529983ec | 27 | unsigned int state_hmask; |
0bf7c5b0 | 28 | unsigned int state_num; |
63082733 | 29 | struct work_struct state_hash_work; |
b8a0ae20 | 30 | struct hlist_head state_gc_list; |
c7837144 | 31 | struct work_struct state_gc_work; |
50a30657 AD |
32 | |
33 | wait_queue_head_t km_waitq; | |
adfcf0b2 AD |
34 | |
35 | struct list_head policy_all; | |
93b851c1 | 36 | struct hlist_head *policy_byidx; |
8100bea7 | 37 | unsigned int policy_idx_hmask; |
8b18f8ea | 38 | struct hlist_head policy_inexact[XFRM_POLICY_MAX * 2]; |
a35f6c5d | 39 | struct xfrm_policy_hash policy_bydst[XFRM_POLICY_MAX * 2]; |
dc2caba7 | 40 | unsigned int policy_count[XFRM_POLICY_MAX * 2]; |
d62ddc21 AD |
41 | }; |
42 | ||
43 | #endif |