- code cleaned
[strongswan.git] / Source / 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 <transforms/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 * @ingroup states
42 */
43 struct ike_sa_init_requested_t {
44 /**
45 * The state_t interface.
46 */
47 state_t state_interface;
48 };
49
50 /**
51 * Constructor of class ike_sa_init_requested_t.
52 *
53 * @param ike_sa assigned ike_sa
54 * @param dh_group_priority the last used priority number to get the DH group for request
55 * @param diffie_hellman diffie_hellman object use to retrieve shared secret
56 * @param sent_nonce Sent nonce value
57 * @param ike_sa_init_request_data the binary representation of the IKE_SA_INIT request message
58 * @return created ike_sa_init_request_t object
59 *
60 * @ingroup states
61 */
62 ike_sa_init_requested_t *ike_sa_init_requested_create(protected_ike_sa_t *ike_sa,
63 u_int16_t dh_group_priority,
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_*/