2 * Copyright (C) 2006-2009 Martin Willi
3 * Hochschule fuer Technik Rapperswil
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>.
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
16 #include "acquire_job.h"
21 typedef struct private_acquire_job_t private_acquire_job_t
;
24 * Private data of an acquire_job_t object.
26 struct private_acquire_job_t
{
28 * Public acquire_job_t interface.
33 * reqid of the child to rekey
38 * acquired source traffic selector
40 traffic_selector_t
*src_ts
;
43 * acquired destination traffic selector
45 traffic_selector_t
*dst_ts
;
48 METHOD(job_t
, destroy
, void,
49 private_acquire_job_t
*this)
51 DESTROY_IF(this->src_ts
);
52 DESTROY_IF(this->dst_ts
);
56 METHOD(job_t
, execute
, void,
57 private_acquire_job_t
*this)
59 charon
->traps
->acquire(charon
->traps
, this->reqid
,
60 this->src_ts
, this->dst_ts
);
67 acquire_job_t
*acquire_job_create(u_int32_t reqid
,
68 traffic_selector_t
*src_ts
,
69 traffic_selector_t
*dst_ts
)
71 private_acquire_job_t
*this;