]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
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 c992eb5add5620e8e561b945c1eb16190bf3a446..0e9407108e180c908b1aa9ce0757c12a5f84353a 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 1db78ba6fc64fa064da780243cd27a2777bf4384..4324ea40a8f827121e1a9473aa9f8cda08f9e057 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;
@@ -116,6 +117,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.
  */