2 * Copyright (C) 2011 Martin Willi
4 * Copyright (C) secunet Security Networks AG
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>.
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
18 * @defgroup task_manager_v1 task_manager_v1
22 #ifndef TASK_MANAGER_V1_H_
23 #define TASK_MANAGER_V1_H_
25 typedef struct task_manager_v1_t task_manager_v1_t
;
27 #include <sa/task_manager.h>
30 * Task manager, IKEv1 variant.
32 struct task_manager_v1_t
{
35 * Implements task_manager_t.
37 task_manager_t task_manager
;
41 * Create an instance of the task manager.
43 * @param ike_sa IKE_SA to manage.
45 task_manager_v1_t
*task_manager_v1_create(ike_sa_t
*ike_sa
);
48 * Check if the given CHILD_SA is redundant (i.e. another CHILD_SA with the same
49 * name and TS is currently INSTALLED).
51 * Optionally, the two currently installed CHILD_SAs may be further compared.
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
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
*));
63 #endif /** TASK_MANAGER_V1_H_ @}*/