2 * Copyright (C) 2006 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 "rekey_child_sa_job.h"
21 typedef struct private_rekey_child_sa_job_t private_rekey_child_sa_job_t
;
24 * Private data of an rekey_child_sa_job_t object.
26 struct private_rekey_child_sa_job_t
{
28 * Public rekey_child_sa_job_t interface.
30 rekey_child_sa_job_t
public;
33 * reqid of the child to rekey
38 * protocol of the CHILD_SA (ESP/AH)
40 protocol_id_t protocol
;
43 * inbound SPI of the CHILD_SA
48 METHOD(job_t
, destroy
, void,
49 private_rekey_child_sa_job_t
*this)
54 METHOD(job_t
, execute
, void,
55 private_rekey_child_sa_job_t
*this)
59 ike_sa
= charon
->ike_sa_manager
->checkout_by_id(charon
->ike_sa_manager
,
63 DBG2(DBG_JOB
, "CHILD_SA with reqid %d not found for rekeying",
68 ike_sa
->rekey_child_sa(ike_sa
, this->protocol
, this->spi
);
69 charon
->ike_sa_manager
->checkin(charon
->ike_sa_manager
, ike_sa
);
77 rekey_child_sa_job_t
*rekey_child_sa_job_create(u_int32_t reqid
,
78 protocol_id_t protocol
,
81 private_rekey_child_sa_job_t
*this;