]> git.ipfire.org Git - thirdparty/strongswan.git/blob - src/libcharon/sa/ikev1/task_manager_v1.h
Update copyright headers after acquisition by secunet
[thirdparty/strongswan.git] / src / libcharon / sa / ikev1 / task_manager_v1.h
1 /*
2 * Copyright (C) 2011 Martin Willi
3 *
4 * Copyright (C) secunet Security Networks AG
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * for more details.
15 */
16
17 /**
18 * @defgroup task_manager_v1 task_manager_v1
19 * @{ @ingroup ikev1
20 */
21
22 #ifndef TASK_MANAGER_V1_H_
23 #define TASK_MANAGER_V1_H_
24
25 typedef struct task_manager_v1_t task_manager_v1_t;
26
27 #include <sa/task_manager.h>
28
29 /**
30 * Task manager, IKEv1 variant.
31 */
32 struct task_manager_v1_t {
33
34 /**
35 * Implements task_manager_t.
36 */
37 task_manager_t task_manager;
38 };
39
40 /**
41 * Create an instance of the task manager.
42 *
43 * @param ike_sa IKE_SA to manage.
44 */
45 task_manager_v1_t *task_manager_v1_create(ike_sa_t *ike_sa);
46
47 /**
48 * Check if the given CHILD_SA is redundant (i.e. another CHILD_SA with the same
49 * name and TS is currently INSTALLED).
50 *
51 * Optionally, the two currently installed CHILD_SAs may be further compared.
52 *
53 * @param ike_sa IKE_SA whose CHILD_SAs should be checked
54 * @param child_sa CHILD_SA to check for duplicates
55 * @param cmp Optional comparison function, first argument is the
56 * passed CHILD_SA, the second a found matching one, return
57 * TRUE if the former should be considered redundant
58 * @return TRUE if the CHILD_SA is redundant
59 */
60 bool ikev1_child_sa_is_redundant(ike_sa_t *ike_sa, child_sa_t *child_sa,
61 bool (*cmp)(child_sa_t*,child_sa_t*));
62
63 #endif /** TASK_MANAGER_V1_H_ @}*/