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 | 8b18f8e | 2008-11-25 17:23:26 -0800 | [diff] [blame] | 7 | #include <linux/xfrm.h> |
Alexey Dobriyan | 9d4139c | 2008-11-25 17:16:11 -0800 | [diff] [blame] | 8 | |
Alexey Dobriyan | b27aead | 2008-11-25 18:00:48 -0800 | [diff] [blame] | 9 | struct ctl_table_header; |
| 10 | |
Alexey Dobriyan | a35f6c5 | 2008-11-25 17:23:48 -0800 | [diff] [blame] | 11 | struct xfrm_policy_hash { |
| 12 | struct hlist_head *table; |
| 13 | unsigned int hmask; |
| 14 | }; |
| 15 | |
Alexey Dobriyan | d62ddc2 | 2008-11-25 17:14:31 -0800 | [diff] [blame] | 16 | struct netns_xfrm { |
Alexey Dobriyan | 9d4139c | 2008-11-25 17:16:11 -0800 | [diff] [blame] | 17 | struct list_head state_all; |
Alexey Dobriyan | 73d189d | 2008-11-25 17:16:58 -0800 | [diff] [blame] | 18 | /* |
| 19 | * Hash table to find appropriate SA towards given target (endpoint of |
| 20 | * tunnel or destination of transport mode) allowed by selector. |
| 21 | * |
| 22 | * Main use is finding SA after policy selected tunnel or transport |
| 23 | * mode. Also, it can be used by ah/esp icmp error handler to find |
| 24 | * offending SA. |
| 25 | */ |
| 26 | struct hlist_head *state_bydst; |
Alexey Dobriyan | d320bbb | 2008-11-25 17:17:24 -0800 | [diff] [blame] | 27 | struct hlist_head *state_bysrc; |
Alexey Dobriyan | b754a4f | 2008-11-25 17:17:47 -0800 | [diff] [blame] | 28 | struct hlist_head *state_byspi; |
Alexey Dobriyan | 529983e | 2008-11-25 17:18:12 -0800 | [diff] [blame] | 29 | unsigned int state_hmask; |
Alexey Dobriyan | 0bf7c5b | 2008-11-25 17:18:39 -0800 | [diff] [blame] | 30 | unsigned int state_num; |
Alexey Dobriyan | 6308273 | 2008-11-25 17:19:07 -0800 | [diff] [blame] | 31 | struct work_struct state_hash_work; |
Alexey Dobriyan | b8a0ae2 | 2008-11-25 17:20:11 -0800 | [diff] [blame] | 32 | struct hlist_head state_gc_list; |
Alexey Dobriyan | c783714 | 2008-11-25 17:20:36 -0800 | [diff] [blame] | 33 | struct work_struct state_gc_work; |
Alexey Dobriyan | 50a3065 | 2008-11-25 17:21:01 -0800 | [diff] [blame] | 34 | |
| 35 | wait_queue_head_t km_waitq; |
Alexey Dobriyan | adfcf0b | 2008-11-25 17:22:11 -0800 | [diff] [blame] | 36 | |
| 37 | struct list_head policy_all; |
Alexey Dobriyan | 93b851c | 2008-11-25 17:22:35 -0800 | [diff] [blame] | 38 | struct hlist_head *policy_byidx; |
Alexey Dobriyan | 8100bea | 2008-11-25 17:22:58 -0800 | [diff] [blame] | 39 | unsigned int policy_idx_hmask; |
Alexey Dobriyan | 8b18f8e | 2008-11-25 17:23:26 -0800 | [diff] [blame] | 40 | struct hlist_head policy_inexact[XFRM_POLICY_MAX * 2]; |
Alexey Dobriyan | a35f6c5 | 2008-11-25 17:23:48 -0800 | [diff] [blame] | 41 | struct xfrm_policy_hash policy_bydst[XFRM_POLICY_MAX * 2]; |
Alexey Dobriyan | dc2caba | 2008-11-25 17:24:15 -0800 | [diff] [blame] | 42 | unsigned int policy_count[XFRM_POLICY_MAX * 2]; |
Alexey Dobriyan | 66caf62 | 2008-11-25 17:28:57 -0800 | [diff] [blame] | 43 | struct work_struct policy_hash_work; |
Alexey Dobriyan | a6483b7 | 2008-11-25 17:38:20 -0800 | [diff] [blame] | 44 | |
| 45 | struct sock *nlsk; |
Eric W. Biederman | d79d792 | 2009-12-03 02:29:05 +0000 | [diff] [blame] | 46 | struct sock *nlsk_stash; |
Alexey Dobriyan | b27aead | 2008-11-25 18:00:48 -0800 | [diff] [blame] | 47 | |
| 48 | u32 sysctl_aevent_etime; |
| 49 | u32 sysctl_aevent_rseqth; |
| 50 | int sysctl_larval_drop; |
| 51 | u32 sysctl_acq_expires; |
| 52 | #ifdef CONFIG_SYSCTL |
| 53 | struct ctl_table_header *sysctl_hdr; |
| 54 | #endif |
Alexey Dobriyan | d62ddc2 | 2008-11-25 17:14:31 -0800 | [diff] [blame] | 55 | }; |
| 56 | |
| 57 | #endif |