added support for xfrm remote kmaddress
[strongswan.git] / src / charon / processing / jobs / migrate_job.h
1 /*
2 * Copyright (C) 2008 Andreas Steffen
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 migrate_job migrate_job
20 * @{ @ingroup jobs
21 */
22
23 #ifndef MIGRATE_JOB_H_
24 #define MIGRATE_JOB_H_
25
26 typedef struct migrate_job_t migrate_job_t;
27
28 #include <library.h>
29 #include <utils/host.h>
30 #include <config/traffic_selector.h>
31 #include <kernel/kernel_ipsec.h>
32 #include <processing/jobs/job.h>
33
34 /**
35 * Class representing a MIGRATE Job.
36 *
37 * This job sets a routed CHILD_SA for an existing IPsec policy.
38 */
39 struct migrate_job_t {
40 /**
41 * The job_t interface.
42 */
43 job_t job_interface;
44 };
45
46 /**
47 * Creates a job of type MIGRATE.
48 *
49 * We use the reqid or the traffic selectors to find a matching CHILD_SA.
50 *
51 * @param reqid reqid of the CHILD_SA to acquire
52 * @param src_ts source traffic selector to be used in the policy
53 * @param dst_ts destination traffic selector to be used in the policy
54 * @param local local host address to be used in the IKE_SA
55 * @param remote remote host address to be used in the IKE_SA
56 * @return migrate_job_t object
57 */
58 migrate_job_t *migrate_job_create(u_int32_t reqid,
59 traffic_selector_t *src_ts,
60 traffic_selector_t *dst_ts,
61 policy_dir_t dir,
62 host_t *local, host_t *remote);
63
64 #endif /* MIGRATE_JOB_H_ @} */