aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/encoding/payloads/proposal_substructure.h
diff options
context:
space:
mode:
authorVolker RĂ¼melin <vr_strongswan@t-online.de>2012-12-15 14:11:26 +0100
committerTobias Brunner <tobias@strongswan.org>2012-12-19 11:03:42 +0100
commit0ff8d20a89e50a386584a79424a4c04c5a6c1e95 (patch)
tree8a8320e41c8e93cc5230de5784822dc3e29073c4 /src/libcharon/encoding/payloads/proposal_substructure.h
parentecdd5aedac519eb3065bf2017a70b595ac9d75a3 (diff)
downloadstrongswan-0ff8d20a89e50a386584a79424a4c04c5a6c1e95.tar.bz2
strongswan-0ff8d20a89e50a386584a79424a4c04c5a6c1e95.tar.xz
Add support for draft-ietf-ipsec-nat-t-ike-03 and earlier
This adds support for early versions of the draft that eventually resulted in RFC 3947.
Diffstat (limited to 'src/libcharon/encoding/payloads/proposal_substructure.h')
-rw-r--r--src/libcharon/encoding/payloads/proposal_substructure.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/libcharon/encoding/payloads/proposal_substructure.h b/src/libcharon/encoding/payloads/proposal_substructure.h
index bfa8b9daa..c8e7adfd8 100644
--- a/src/libcharon/encoding/payloads/proposal_substructure.h
+++ b/src/libcharon/encoding/payloads/proposal_substructure.h
@@ -23,6 +23,7 @@
#ifndef PROPOSAL_SUBSTRUCTURE_H_
#define PROPOSAL_SUBSTRUCTURE_H_
+typedef enum encap_t encap_t;
typedef struct proposal_substructure_t proposal_substructure_t;
#include <library.h>
@@ -34,6 +35,15 @@ typedef struct proposal_substructure_t proposal_substructure_t;
#include <sa/authenticator.h>
/**
+ * Encap type for proposal substructure
+ */
+enum encap_t {
+ ENCAP_NONE = 0,
+ ENCAP_UDP,
+ ENCAP_UDP_DRAFT_00_03,
+};
+
+/**
* Class representing an IKEv1/IKEv2 proposal substructure.
*/
struct proposal_substructure_t {
@@ -179,12 +189,12 @@ proposal_substructure_t *proposal_substructure_create_from_proposal_v2(
* @param lifebytes lifebytes, in bytes
* @param auth authentication method to use, or AUTH_NONE
* @param mode IPsec encapsulation mode, TRANSPORT or TUNNEL
- * @param udp TRUE to use UDP encapsulation
+ * @param udp ENCAP_UDP to use UDP encapsulation
* @return proposal_substructure_t object PROPOSAL_SUBSTRUCTURE_V1
*/
proposal_substructure_t *proposal_substructure_create_from_proposal_v1(
proposal_t *proposal, u_int32_t lifetime, u_int64_t lifebytes,
- auth_method_t auth, ipsec_mode_t mode, bool udp);
+ auth_method_t auth, ipsec_mode_t mode, encap_t udp);
/**
* Creates an IKEv1 proposal_substructure_t from a list of proposal_t.
@@ -194,12 +204,12 @@ proposal_substructure_t *proposal_substructure_create_from_proposal_v1(
* @param lifebytes lifebytes, in bytes
* @param auth authentication method to use, or AUTH_NONE
* @param mode IPsec encapsulation mode, TRANSPORT or TUNNEL
- * @param udp TRUE to use UDP encapsulation
+ * @param udp ENCAP_UDP to use UDP encapsulation
* @return IKEv1 proposal_substructure_t PROPOSAL_SUBSTRUCTURE_V1
*/
proposal_substructure_t *proposal_substructure_create_from_proposals_v1(
linked_list_t *proposals, u_int32_t lifetime, u_int64_t lifebytes,
- auth_method_t auth, ipsec_mode_t mode, bool udp);
+ auth_method_t auth, ipsec_mode_t mode, encap_t udp);
/**
* Creates an IKEv1 proposal_substructure_t for IPComp with the given
@@ -209,12 +219,12 @@ proposal_substructure_t *proposal_substructure_create_from_proposals_v1(
* @param lifebytes lifebytes, in bytes
* @param cpi the CPI to be used
* @param mode IPsec encapsulation mode, TRANSPORT or TUNNEL
- * @param udp TRUE to use UDP encapsulation
+ * @param udp ENCAP_UDP to use UDP encapsulation
* @param proposal_number the proposal number of the proposal to be linked
* @return IKEv1 proposal_substructure_t PROPOSAL_SUBSTRUCTURE_V1
*/
proposal_substructure_t *proposal_substructure_create_for_ipcomp_v1(
u_int32_t lifetime, u_int64_t lifebytes, u_int16_t cpi,
- ipsec_mode_t mode, bool udp, u_int8_t proposal_number);
+ ipsec_mode_t mode, encap_t udp, u_int8_t proposal_number);
#endif /** PROPOSAL_SUBSTRUCTURE_H_ @}*/