Alexey Dobriyan | d62ddc2 | 2008-11-25 17:14:31 -0800 | [diff] [blame] | 1 | #ifndef __NETNS_XFRM_H |
| 2 | #define __NETNS_XFRM_H |
| 3 | |
Alexey Dobriyan | 9d4139c | 2008-11-25 17:16:11 -0800 | [diff] [blame] | 4 | #include <linux/list.h> |
Alexey Dobriyan | 50a3065 | 2008-11-25 17:21:01 -0800 | [diff] [blame] | 5 | #include <linux/wait.h> |
Alexey Dobriyan | 6308273 | 2008-11-25 17:19:07 -0800 | [diff] [blame] | 6 | #include <linux/workqueue.h> |
Alexey Dobriyan | 9d4139c | 2008-11-25 17:16:11 -0800 | [diff] [blame] | 7 | |
Alexey Dobriyan | d62ddc2 | 2008-11-25 17:14:31 -0800 | [diff] [blame] | 8 | struct netns_xfrm { |
Alexey Dobriyan | 9d4139c | 2008-11-25 17:16:11 -0800 | [diff] [blame] | 9 | struct list_head state_all; |
Alexey Dobriyan | 73d189d | 2008-11-25 17:16:58 -0800 | [diff] [blame] | 10 | /* |
| 11 | * Hash table to find appropriate SA towards given target (endpoint of |
| 12 | * tunnel or destination of transport mode) allowed by selector. |
| 13 | * |
| 14 | * Main use is finding SA after policy selected tunnel or transport |
| 15 | * mode. Also, it can be used by ah/esp icmp error handler to find |
| 16 | * offending SA. |
| 17 | */ |
| 18 | struct hlist_head *state_bydst; |
Alexey Dobriyan | d320bbb | 2008-11-25 17:17:24 -0800 | [diff] [blame] | 19 | struct hlist_head *state_bysrc; |
Alexey Dobriyan | b754a4f | 2008-11-25 17:17:47 -0800 | [diff] [blame] | 20 | struct hlist_head *state_byspi; |
Alexey Dobriyan | 529983e | 2008-11-25 17:18:12 -0800 | [diff] [blame] | 21 | unsigned int state_hmask; |
Alexey Dobriyan | 0bf7c5b | 2008-11-25 17:18:39 -0800 | [diff] [blame] | 22 | unsigned int state_num; |
Alexey Dobriyan | 6308273 | 2008-11-25 17:19:07 -0800 | [diff] [blame] | 23 | struct work_struct state_hash_work; |
Alexey Dobriyan | b8a0ae2 | 2008-11-25 17:20:11 -0800 | [diff] [blame] | 24 | struct hlist_head state_gc_list; |
Alexey Dobriyan | c783714 | 2008-11-25 17:20:36 -0800 | [diff] [blame] | 25 | struct work_struct state_gc_work; |
Alexey Dobriyan | 50a3065 | 2008-11-25 17:21:01 -0800 | [diff] [blame] | 26 | |
| 27 | wait_queue_head_t km_waitq; |
Alexey Dobriyan | adfcf0b | 2008-11-25 17:22:11 -0800 | [diff] [blame] | 28 | |
| 29 | struct list_head policy_all; |
Alexey Dobriyan | 93b851c | 2008-11-25 17:22:35 -0800 | [diff] [blame^] | 30 | struct hlist_head *policy_byidx; |
Alexey Dobriyan | d62ddc2 | 2008-11-25 17:14:31 -0800 | [diff] [blame] | 31 | }; |
| 32 | |
| 33 | #endif |