ipsec: add ipv6 support for ipsec tunnel interface
[vpp.git] / src / vnet / ipsec / ipsec_if.h
index 3d042f0..7f0eb08 100644 (file)
@@ -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;