aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec_if.h
diff options
context:
space:
mode:
authorKingwel Xie <kingwel.xie@ericsson.com>2019-03-20 07:21:58 -0400
committerNeale Ranns <nranns@cisco.com>2019-03-21 07:42:09 +0000
commit1ba5bc8d888d0164dd6e38857cbed09ab7ce1d8b (patch)
treeea87c57b0db7f981878e2cdb66f7f650cbc71447 /src/vnet/ipsec/ipsec_if.h
parenta5efca30f569ff93cfb85ed1bc7742cee824426d (diff)
ipsec: add ipv6 support for ipsec tunnel interface
Change-Id: I6a76907dc7bed2a81282b63669bea2219d6903c9 Signed-off-by: Kingwel Xie <kingwel.xie@ericsson.com> Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/ipsec_if.h')
-rw-r--r--src/vnet/ipsec/ipsec_if.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/vnet/ipsec/ipsec_if.h b/src/vnet/ipsec/ipsec_if.h
index 3d042f0af01..7f0eb08b24c 100644
--- a/src/vnet/ipsec/ipsec_if.h
+++ b/src/vnet/ipsec/ipsec_if.h
@@ -41,6 +41,7 @@ typedef struct
typedef struct
{
u8 is_add;
+ u8 is_ip6;
u8 esn;
u8 anti_replay;
ip46_address_t local_ip, remote_ip;
@@ -62,6 +63,35 @@ typedef struct
u32 tx_table_id;
} ipsec_add_del_tunnel_args_t;
+/* *INDENT-OFF* */
+typedef CLIB_PACKED
+(struct {
+ /*
+ * Key fields: remote ip and spi on incoming packet
+ * all fields in NET byte order
+ */
+ union {
+ struct {
+ u32 remote_ip;
+ u32 spi;
+ };
+ u64 as_u64;
+ };
+}) ipsec4_tunnel_key_t;
+/* *INDENT-ON* */
+
+/* *INDENT-OFF* */
+typedef CLIB_PACKED
+(struct {
+ /*
+ * Key fields: remote ip and spi on incoming packet
+ * all fields in NET byte order
+ */
+ ip6_address_t remote_ip;
+ u32 spi;
+}) ipsec6_tunnel_key_t;
+/* *INDENT-ON* */
+
typedef struct
{
u8 is_add;