blob: 80555351fe5e941116723b9c95604254557264a7 [file] [log] [blame]
Alexey Dobriyand62ddc22008-11-25 17:14:31 -08001#ifndef __NETNS_XFRM_H
2#define __NETNS_XFRM_H
3
Alexey Dobriyan9d4139c2008-11-25 17:16:11 -08004#include <linux/list.h>
Alexey Dobriyan63082732008-11-25 17:19:07 -08005#include <linux/workqueue.h>
Alexey Dobriyan9d4139c2008-11-25 17:16:11 -08006
Alexey Dobriyand62ddc22008-11-25 17:14:31 -08007struct netns_xfrm {
Alexey Dobriyan9d4139c2008-11-25 17:16:11 -08008 struct list_head state_all;
Alexey Dobriyan73d189d2008-11-25 17:16:58 -08009 /*
10 * Hash table to find appropriate SA towards given target (endpoint of
11 * tunnel or destination of transport mode) allowed by selector.
12 *
13 * Main use is finding SA after policy selected tunnel or transport
14 * mode. Also, it can be used by ah/esp icmp error handler to find
15 * offending SA.
16 */
17 struct hlist_head *state_bydst;
Alexey Dobriyand320bbb2008-11-25 17:17:24 -080018 struct hlist_head *state_bysrc;
Alexey Dobriyanb754a4f2008-11-25 17:17:47 -080019 struct hlist_head *state_byspi;
Alexey Dobriyan529983e2008-11-25 17:18:12 -080020 unsigned int state_hmask;
Alexey Dobriyan0bf7c5b2008-11-25 17:18:39 -080021 unsigned int state_num;
Alexey Dobriyan63082732008-11-25 17:19:07 -080022 struct work_struct state_hash_work;
Alexey Dobriyanb8a0ae22008-11-25 17:20:11 -080023 struct hlist_head state_gc_list;
Alexey Dobriyanc7837142008-11-25 17:20:36 -080024 struct work_struct state_gc_work;
Alexey Dobriyand62ddc22008-11-25 17:14:31 -080025};
26
27#endif