support of xfrm marks for IKEv2

This commit is contained in:
Andreas Steffen
2010-07-02 23:46:09 +02:00
parent 02571374c4
commit ee26c537d7
24 changed files with 530 additions and 150 deletions
+22 -1
View File
@@ -26,6 +26,7 @@
typedef enum action_t action_t;
typedef enum ipcomp_transform_t ipcomp_transform_t;
typedef struct lifetime_cfg_t lifetime_cfg_t;
typedef struct mark_t mark_t;
typedef struct child_cfg_t child_cfg_t;
#include <library.h>
@@ -82,6 +83,16 @@ struct lifetime_cfg_t {
} time, bytes, packets;
};
/**
* A mark_t defines an optional mark in a CHILD_SA.
*/
struct mark_t {
/** Mark value */
u_int32_t value;
/** Mark mask */
u_int32_t mask;
};
/**
* A child_cfg_t defines the config template for a CHILD_SA.
*
@@ -245,6 +256,14 @@ struct child_cfg_t {
*/
u_int32_t (*get_reqid)(child_cfg_t *this);
/**
* Optional mark for CHILD_SA
*
* @param inbound TRUE for inbound, FALSE for outbound
* @return mark
*/
mark_t (*get_mark)(child_cfg_t *this, bool inbound);
/**
* Sets two options needed for Mobile IPv6 interoperability
*
@@ -307,12 +326,14 @@ struct child_cfg_t {
* @param ipcomp use IPComp, if peer supports it
* @param inactivity inactivity timeout in s before closing a CHILD_SA
* @param reqid specific reqid to use for CHILD_SA, 0 for auto assign
* @param mark optional mark (can be NULL)
* @return child_cfg_t object
*/
child_cfg_t *child_cfg_create(char *name, lifetime_cfg_t *lifetime,
char *updown, bool hostaccess,
ipsec_mode_t mode, action_t dpd_action,
action_t close_action, bool ipcomp,
u_int32_t inactivity, u_int32_t reqid);
u_int32_t inactivity, u_int32_t reqid,
mark_t *mark);
#endif /** CHILD_CFG_H_ @}*/