2 * @file initiator_init.h
4 * @brief Interface of initiator_init_t.
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 #ifndef INITIATOR_INIT_H_
25 #define INITIATOR_INIT_H_
27 #include <sa/ike_sa.h>
28 #include <sa/states/state.h>
31 typedef struct initiator_init_t initiator_init_t
;
34 * @brief This class represents an IKE_SA state when
35 * initializing a connection as initiator.
38 * - initiator_init_create()
42 struct initiator_init_t
{
44 * The state_t interface.
46 state_t state_interface
;
49 * Initiate a new connection with given connection_t object.
51 * @param this calling object
52 * @param connection connection to initiate
55 * - DELETE_ME if something failed
57 status_t (*initiate_connection
) (initiator_init_t
*this, connection_t
*connection
);
60 * Retry to initiate a new connection with a specific dh_group_priority.
62 * The dh_group_priority is starting at 1.
64 * @param this calling object
65 * @param dh_group_priority dh group priority to try with
68 * - DELETE_ME if something failed (see log for error)
70 status_t (*retry_initiate_connection
) (initiator_init_t
*this, int dh_group_priority
);
74 * @brief Constructor of class initiator_init_t.
76 * @param ike_sa assigned IKE_SA
77 * @return created initiator_init_t object
81 initiator_init_t
*initiator_init_create(protected_ike_sa_t
*ike_sa
);
84 #endif /*INITIATOR_INIT_H_*/