dbc6cca15dea02c6484c2f50e4fe9c1f6e4a2f0d
[strongswan.git] / src / charon / processing / jobs / initiate_mediation_job.h
1 /*
2 * Copyright (C) 2007 Tobias Brunner
3 * Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 *
15 * $Id$
16 */
17
18 /**
19 * @defgroup initiate_mediation_job initiate_mediation_job
20 * @{ @ingroup jobs
21 */
22
23 #ifndef INITIATE_MEDIATION_JOB_H_
24 #define INITIATE_MEDIATION_JOB_H_
25
26 typedef struct initiate_mediation_job_t initiate_mediation_job_t;
27
28 #include <processing/jobs/job.h>
29 #include <config/child_cfg.h>
30 #include <sa/ike_sa_id.h>
31
32 /**
33 * Class representing a INITIATE_MEDIATION Job.
34 *
35 * This job will initiate a mediation on behalf of a mediated connection.
36 * If required the mediation connection is established.
37 */
38 struct initiate_mediation_job_t {
39 /**
40 * implements job_t interface
41 */
42 job_t job_interface;
43 };
44
45 /**
46 * Creates a job of type INITIATE_MEDIATION.
47 *
48 * @param ike_sa_id identification of the ike_sa as ike_sa_id_t object (gets cloned)
49 * @param child_cfg child config of the child_sa (gets cloned)
50 * @return job object
51 */
52 initiate_mediation_job_t *initiate_mediation_job_create(ike_sa_id_t *ike_sa_id,
53 child_cfg_t *child_cfg);
54
55 /**
56 * Creates a special job of type INITIATE_MEDIATION that reinitiates a
57 * specific connection.
58 *
59 * @param mediation_sa_id identification of the mediation sa (gets cloned)
60 * @param mediated_sa_id identification of the mediated sa (gets cloned)
61 * @return job object
62 */
63 initiate_mediation_job_t *reinitiate_mediation_job_create(ike_sa_id_t *mediation_sa_id,
64 ike_sa_id_t *mediated_sa_id);
65
66 #endif /*INITIATE_MEDIATION_JOB_H_ @} */