]> git.ipfire.org Git - thirdparty/strongswan.git/blob - programs/charon/charon/sa/states/ike_sa_init_requested.h
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / programs / charon / charon / sa / states / ike_sa_init_requested.h
1 /**
2 * @file ike_sa_init_requested.h
3 *
4 * @brief Interface of ike_sa_init_requestet_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 IKE_SA_INIT_REQUESTED_H_
25 #define IKE_SA_INIT_REQUESTED_H_
26
27 #include <types.h>
28 #include <sa/ike_sa.h>
29 #include <sa/states/state.h>
30 #include <crypto/diffie_hellman.h>
31
32 typedef struct ike_sa_init_requested_t ike_sa_init_requested_t;
33
34 /**
35 * @brief This class represents an IKE_SA state when
36 * requested an IKE_SA_INIT as initiator.
37 *
38 * @b Constructors:
39 * - ike_sa_init_requested_create()
40 *
41 * @todo Include valid child sa SPIs in proposal
42 *
43 * @ingroup states
44 */
45 struct ike_sa_init_requested_t {
46 /**
47 * The state_t interface.
48 */
49 state_t state_interface;
50 };
51
52 /**
53 * Constructor of class ike_sa_init_requested_t.
54 *
55 * @param ike_sa assigned ike_sa
56 * @param diffie_hellman diffie_hellman object use to retrieve shared secret
57 * @param sent_nonce Sent nonce value
58 * @param ike_sa_init_request_data the binary representation of the IKE_SA_INIT request message
59 * @return created ike_sa_init_request_t object
60 *
61 * @ingroup states
62 */
63 ike_sa_init_requested_t *ike_sa_init_requested_create(protected_ike_sa_t *ike_sa,
64 diffie_hellman_t *diffie_hellman,
65 chunk_t sent_nonce,
66 chunk_t ike_sa_init_request_data);
67
68 #endif /*IKE_SA_INIT_REQUESTED_H_*/