2 * Copyright (C) 2007-2008 Tobias Brunner
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 "initiate_xauth_job.h"
18 #include <sa/ike_sa.h>
22 typedef struct private_initiate_xauth_job_t private_initiate_xauth_job_t
;
25 * Private data of an initiate_xauth_job_t Object
27 struct private_initiate_xauth_job_t
{
29 * public initiate_xauth_job_t interface
31 initiate_xauth_job_t
public;
34 * ID of the IKE_SA of the mediated connection.
36 ike_sa_id_t
*ike_sa_id
;
39 METHOD(job_t
, destroy
, void,
40 private_initiate_xauth_job_t
*this)
42 DESTROY_IF(this->ike_sa_id
);
46 METHOD(job_t
, initiate
, void,
47 private_initiate_xauth_job_t
*this)
51 ike_sa
= charon
->ike_sa_manager
->checkout(charon
->ike_sa_manager
,
55 DBG1(DBG_IKE
, "INITIATING XAUTH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
56 ike_sa
->initiate_xauth(ike_sa
);
57 charon
->ike_sa_manager
->checkin(charon
->ike_sa_manager
, ike_sa
);
62 METHOD(job_t
, get_priority
, job_priority_t
,
63 private_initiate_xauth_job_t
*this)
65 return JOB_PRIO_MEDIUM
;
69 * Creates an empty job
71 initiate_xauth_job_t
*initiate_xauth_job_create(ike_sa_id_t
*ike_sa_id
)
73 private_initiate_xauth_job_t
*this;
77 .get_priority
= _get_priority
,
82 .ike_sa_id
= ike_sa_id
->clone(ike_sa_id
),