responder_init does return DELETE_ME in case of error
[strongswan.git] / Source / charon / sa / states / initiator_init.h
1 /**
2 * @file initiator_init.h
3 *
4 * @brief Interface of initiator_init_t.
5 *
6 */
7
8 /*
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
11 *
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>.
16 *
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
20 * for more details.
21 */
22
23
24 #ifndef INITIATOR_INIT_H_
25 #define INITIATOR_INIT_H_
26
27 #include <sa/ike_sa.h>
28 #include <sa/states/state.h>
29
30
31 typedef struct initiator_init_t initiator_init_t;
32
33 /**
34 * @brief This class represents an IKE_SA state when initializing.
35 * a connection as initiator
36 *
37 * @ingroup states
38 */
39 struct initiator_init_t {
40 /**
41 * methods of the state_t interface
42 */
43 state_t state_interface;
44
45 /**
46 * Initiate a new connection with given configuration name
47 *
48 * @param this calling object
49 *
50 * @param name name of the configuration
51 * @return TODO
52 */
53 status_t (*initiate_connection) (initiator_init_t *this, char *name);
54
55 /**
56 * Retries to initiate a new connection with another dh_group_priority
57 *
58 * @param this calling object
59 * @param dh_group_priority dh group priority to try with
60 * @return TODO
61 */
62 status_t (*retry_initiate_connection) (initiator_init_t *this, int dh_group_priority);
63 };
64
65 /**
66 * @brief Constructor of class initiator_init_t
67 *
68 * @param ike_sa assigned IKE_SA
69 *
70 * @ingroup states
71 */
72 initiator_init_t *initiator_init_create(protected_ike_sa_t *ike_sa);
73
74
75 #endif /*INITIATOR_INIT_H_*/