]>
Commit | Line | Data |
---|---|---|
c7dd2a7b MW |
1 | /** |
2 | * @file responder_init.h | |
3 | * | |
d048df5c | 4 | * @brief Interface of responder_init_t. |
c7dd2a7b MW |
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 | ||
5796aa16 MW |
29 | |
30 | typedef struct responder_init_t responder_init_t; | |
31 | ||
c7dd2a7b | 32 | /** |
0d74d84b JH |
33 | * @brief This class represents an IKE_SA state when |
34 | * initializing a connection as responder. | |
35 | * | |
36 | * @b Constructors: | |
37 | * - responder_init_create() | |
df3c59d0 MW |
38 | * |
39 | * @ingroup states | |
c7dd2a7b | 40 | */ |
5796aa16 | 41 | struct responder_init_t { |
c7dd2a7b | 42 | /** |
0d74d84b | 43 | * The state_t interface. |
c7dd2a7b MW |
44 | */ |
45 | state_t state_interface; | |
c7dd2a7b MW |
46 | }; |
47 | ||
48 | /** | |
0d74d84b | 49 | * Constructor of class responder_init_t. |
c7dd2a7b | 50 | * |
1c7d92a7 JH |
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: | |
16b9a73c | 54 | * - protected_ike_sa_t.set_connection() |
1c7d92a7 JH |
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 | * | |
0d74d84b | 60 | * @param ike_sa assigned IKE_SA |
d048df5c | 61 | * |
0d74d84b | 62 | * @return responder_init_t object |
df3c59d0 MW |
63 | * |
64 | * @ingroup states | |
c7dd2a7b MW |
65 | */ |
66 | responder_init_t *responder_init_create(protected_ike_sa_t *ike_sa); | |
67 | ||
68 | #endif /*RESPONDER_INIT_H_*/ |