X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=blobdiff_plain;f=Source%2Fcharon%2Fsa%2Fchild_sa.h;h=8a7462594ae30a55e6dd5e6b0c28e2c01987e965;hp=da8883cc95fb019d148534b98bdca61338db32ed;hb=aeda79ff7824bcdc48c8d6bf5818d40cc476340e;hpb=3ebebc5e963afed1242192f4fa440c177daee4bc diff --git a/Source/charon/sa/child_sa.h b/Source/charon/sa/child_sa.h index da8883c..8a74625 100644 --- a/Source/charon/sa/child_sa.h +++ b/Source/charon/sa/child_sa.h @@ -21,8 +21,8 @@ */ -#ifndef CHILD_SA_H_ -#define CHILD_SA_H_ +#ifndef _CHILD_SA_H_ +#define _CHILD_SA_H_ #include #include @@ -31,26 +31,42 @@ typedef struct child_sa_t child_sa_t; /** - * @brief + * @brief Represents a CHILD_SA between to hosts. + * + * + * @b Constructors: + * - child_sa_create + * * @ingroup sa */ struct child_sa_t { + /** + * @brief Returns the SPI value of this CHILD_SA. + * + * AH and ESP are using 4 byte SPI values. + * + * @param this calling object + * @return 4 Byte SPI value + */ u_int32_t (*get_spi) (child_sa_t *this); /** * @brief Destroys a child_sa. * - * @param this child_sa_t object + * @param this calling object */ void (*destroy) (child_sa_t *this); }; /** - * @brief + * @brief Constructor to create a new CHILD_SA. * + * @param protocol_id protocol id (AH or ESP) of CHILD_SA + * @param prf_plus prf_plus_t object use to derive shared secrets + * @return child_sa_t object * @ingroup sa */ -child_sa_t * child_sa_create(protocol_id_t protocol_id, prf_plus_t *prf_plus); +child_sa_t * child_sa_create(child_proposal_t *proposal, prf_plus_t *prf_plus); -#endif /*CHILD_SA_H_*/ +#endif /*_CHILD_SA_H_*/