ipsec-types: Create new enum hw_offload_t
authorAdi Nissim <adin@mellanox.com>
Mon, 12 Mar 2018 14:34:19 +0000 (16:34 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 21 Mar 2018 09:27:38 +0000 (10:27 +0100)
Add the new enum in order to add HW offload auto mode.

Signed-off-by: Adi Nissim <adin@mellanox.com>
Reviewed-by: Aviv Heller <avivh@mellanox.com>
src/libstrongswan/ipsec/ipsec_types.c
src/libstrongswan/ipsec/ipsec_types.h

index c992eb5..0e94071 100644 (file)
@@ -37,6 +37,12 @@ ENUM(ipcomp_transform_names, IPCOMP_NONE, IPCOMP_LZJH,
        "IPCOMP_LZJH"
 );
 
+ENUM(hw_offload_names, HW_OFFLOAD_NO, HW_OFFLOAD_AUTO,
+       "no",
+       "yes",
+       "auto",
+);
+
 /*
  * See header
  */
index 1db78ba..4324ea4 100644 (file)
@@ -26,6 +26,7 @@ typedef enum policy_dir_t policy_dir_t;
 typedef enum policy_type_t policy_type_t;
 typedef enum policy_priority_t policy_priority_t;
 typedef enum ipcomp_transform_t ipcomp_transform_t;
+typedef enum hw_offload_t hw_offload_t;
 typedef struct ipsec_sa_cfg_t ipsec_sa_cfg_t;
 typedef struct lifetime_cfg_t lifetime_cfg_t;
 typedef struct mark_t mark_t;
@@ -117,6 +118,20 @@ enum ipcomp_transform_t {
 extern enum_name_t *ipcomp_transform_names;
 
 /**
+ * HW offload mode options
+ */
+enum hw_offload_t {
+       HW_OFFLOAD_NO = 0,
+       HW_OFFLOAD_YES = 1,
+       HW_OFFLOAD_AUTO = 2,
+};
+
+/**
+ * enum names for hw_offload_t.
+ */
+extern enum_name_t *hw_offload_names;
+
+/**
  * This struct contains details about IPsec SA(s) tied to a policy.
  */
 struct ipsec_sa_cfg_t {