5c7829b5e4b245fd9421b40fbebfc778473ccafd
[strongswan.git] / Source / charon / sa / states / responder_init.h
1 /**
2 * @file responder_init.h
3 *
4 * @brief Interface of responder_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 #ifndef RESPONDER_INIT_H_
24 #define RESPONDER_INIT_H_
25
26 #include <sa/ike_sa.h>
27 #include <sa/states/state.h>
28
29
30 typedef struct responder_init_t responder_init_t;
31
32 /**
33 * @brief This class represents an IKE_SA state when
34 * initializing a connection as responder.
35 *
36 * @b Constructors:
37 * - responder_init_create()
38 *
39 * @ingroup states
40 */
41 struct responder_init_t {
42 /**
43 * The state_t interface.
44 */
45 state_t state_interface;
46 };
47
48 /**
49 * Constructor of class responder_init_t.
50 *
51 * The following functions of the assigned protected_ike_sa_t object are being called with
52 * valid values after successfully processing a received message and before changing
53 * to next state IKE_SA_INIT_RESPONDED:
54 * - protected_ike_sa_t.set_init_config()
55 * - protected_ike_sa_t.set_my_host()
56 * - protected_ike_sa_t.set_other_host()
57 * - protected_ike_sa_t.compute_secrets()
58 * - protected_ike_sa_t.create_transforms_from_proposal()
59 *
60 * @param ike_sa assigned IKE_SA
61 *
62 * @return responder_init_t object
63 *
64 * @ingroup states
65 */
66 responder_init_t *responder_init_create(protected_ike_sa_t *ike_sa);
67
68 #endif /*RESPONDER_INIT_H_*/