aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2018-01-18 11:02:27 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2018-02-26 14:02:55 +0300
commitdfc78ccc51856d4d40aa690e705cdce1a88e582a (patch)
tree08c33857f0d0b66e9a50b3adaa39caf6c4b38c23 /include
parentb5cb45b96f5b04f8d950e8a050424779e55bbcdc (diff)
api: ipsec: IP header parameter types
Create IP header parameter types, so that those can be used also outside of SA parameter struct. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/odp/api/spec/ipsec.h72
1 files changed, 40 insertions, 32 deletions
diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 47e3045f3..c78afbe3f 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -382,6 +382,44 @@ typedef struct odp_ipsec_crypto_param_t {
} odp_ipsec_crypto_param_t;
+/** IPv4 header parameters */
+typedef struct odp_ipsec_ipv4_param_t {
+ /** IPv4 source address (NETWORK ENDIAN) */
+ void *src_addr;
+
+ /** IPv4 destination address (NETWORK ENDIAN) */
+ void *dst_addr;
+
+ /** IPv4 Differentiated Services Code Point */
+ uint8_t dscp;
+
+ /** IPv4 Don't Fragment bit */
+ uint8_t df;
+
+ /** IPv4 Time To Live */
+ uint8_t ttl;
+
+} odp_ipsec_ipv4_param_t;
+
+/** IPv6 header parameters */
+typedef struct odp_ipsec_ipv6_param_t {
+ /** IPv6 source address (NETWORK ENDIAN) */
+ void *src_addr;
+
+ /** IPv6 destination address (NETWORK ENDIAN) */
+ void *dst_addr;
+
+ /** IPv6 flow label */
+ uint32_t flabel;
+
+ /** IPv6 Differentiated Services Code Point */
+ uint8_t dscp;
+
+ /** IPv6 hop limit */
+ uint8_t hlimit;
+
+} odp_ipsec_ipv6_param_t;
+
/**
* IPSEC tunnel parameters
*
@@ -397,40 +435,10 @@ typedef struct odp_ipsec_tunnel_param_t {
/** Variant mappings for tunnel parameters */
union {
/** IPv4 header parameters */
- struct {
- /** IPv4 source address (NETWORK ENDIAN) */
- void *src_addr;
-
- /** IPv4 destination address (NETWORK ENDIAN) */
- void *dst_addr;
-
- /** IPv4 Differentiated Services Code Point */
- uint8_t dscp;
-
- /** IPv4 Don't Fragment bit */
- uint8_t df;
-
- /** IPv4 Time To Live */
- uint8_t ttl;
- } ipv4;
+ odp_ipsec_ipv4_param_t ipv4;
/** IPv6 header parameters */
- struct {
- /** IPv6 source address (NETWORK ENDIAN) */
- void *src_addr;
-
- /** IPv6 destination address (NETWORK ENDIAN) */
- void *dst_addr;
-
- /** IPv6 Differentiated Services Code Point */
- uint8_t dscp;
-
- /** IPv6 flow label */
- uint32_t flabel;
-
- /** IPv6 hop limit */
- uint8_t hlimit;
- } ipv6;
+ odp_ipsec_ipv6_param_t ipv6;
};
} odp_ipsec_tunnel_param_t;