4 * @brief Interface of child_sa_t.
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
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>.
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
28 #include <transforms/prf_plus.h>
29 #include <encoding/payloads/proposal_substructure.h>
31 typedef struct child_sa_t child_sa_t
;
34 * @brief Represents a CHILD_SA between to hosts.
36 * An IKE_SA must already be established.
46 * @brief Returns the SPI value of this CHILD_SA.
48 * AH and ESP are using 4 byte SPI values.
50 * @param this calling object
51 * @return 4 Byte SPI value
53 u_int32_t (*get_spi
) (child_sa_t
*this);
56 * @brief Destroys a child_sa.
58 * @param this calling object
60 void (*destroy
) (child_sa_t
*this);
64 * @brief Constructor to create a new CHILD_SA.
66 * @param protocol_id protocol id (AH or ESP) of CHILD_SA
67 * @param prf_plus prf_plus_t object use to derive shared secrets
68 * @return child_sa_t object
71 child_sa_t
* child_sa_create(protocol_id_t protocol_id
, prf_plus_t
*prf_plus
);
73 #endif /*_CHILD_SA_H_*/