diff options
author | Jan Hutter <jhutter@hsr.ch> | 2005-12-01 08:48:57 +0000 |
---|---|---|
committer | Jan Hutter <jhutter@hsr.ch> | 2005-12-01 08:48:57 +0000 |
commit | b737e9d9e8e44b360509cfab36d22170f54af334 (patch) | |
tree | c2ba421ea4619d8f5c28bbf948b0bda1156722b0 /Source/charon/encoding/payloads/proposal_substructure.h | |
parent | d45ec1dedfa06155c344f5cce0ac7b2ec331c825 (diff) | |
download | strongswan-b737e9d9e8e44b360509cfab36d22170f54af334.tar.bz2 strongswan-b737e9d9e8e44b360509cfab36d22170f54af334.tar.xz |
implemented and tested functionality to create sa_payload from
ike_proposal_t's and also generate ike_proposal_t's from sa_payload
Diffstat (limited to 'Source/charon/encoding/payloads/proposal_substructure.h')
-rw-r--r-- | Source/charon/encoding/payloads/proposal_substructure.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Source/charon/encoding/payloads/proposal_substructure.h b/Source/charon/encoding/payloads/proposal_substructure.h index f131cf74c..a2015fbfe 100644 --- a/Source/charon/encoding/payloads/proposal_substructure.h +++ b/Source/charon/encoding/payloads/proposal_substructure.h @@ -29,6 +29,13 @@ #include <utils/linked_list.h> /** + * IKEv1 Value for a proposal payload. + * + * @ingroup payloads + */ +#define PROPOSAL_TYPE_VALUE 2 + +/** * Length of the proposal substructure header * (without spi). * @@ -107,6 +114,22 @@ struct proposal_substructure_t { u_int8_t (*get_proposal_number) (proposal_substructure_t *this); /** + * @brief get the number of transforms in current proposal. + * + * @param this calling proposal_substructure_t object + * @return transform count in current proposal + */ + size_t (*get_transform_count) (proposal_substructure_t *this); + + /** + * @brief get size of the set spi in bytes. + * + * @param this calling proposal_substructure_t object + * @return size of the spi in bytes + */ + size_t (*get_spi_size) (proposal_substructure_t *this); + + /** * @brief Sets the protocol id of current proposal. * * @param this calling proposal_substructure_t object @@ -136,6 +159,16 @@ struct proposal_substructure_t { */ status_t (*get_info_for_transform_type) (proposal_substructure_t *this,transform_type_t type, u_int16_t *transform_id, u_int16_t *key_length); + /** + * @brief Sets the next_payload field of this substructure + * + * If this is the last proposal, next payload field is set to 0, + * otherwise to 2 + * + * @param this calling proposal_substructure_t object + * @param is_last When TRUE, next payload field is set to 0, otherwise to 2 + */ + void (*set_is_last_proposal) (proposal_substructure_t *this, bool is_last); /** * @brief Returns the currently set SPI of this proposal. |