summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec_tun.h
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-06-30 07:47:14 +0000
committerDave Barach <openvpp@barachs.net>2020-07-21 18:42:25 +0000
commitdd4ccf2623b547654d215ffcf42f9813e42aa90c (patch)
tree827d8a6086160b70e5f490dde520be6bc577e1d5 /src/vnet/ipsec/ipsec_tun.h
parent0c65f52bb9395526613493aa9c042ea4f6dbc1fc (diff)
ipsec: Dedicated IPSec interface type
Type: feature Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ie8bd50df163aea2798e9f9d35a13dcadc4a4a4b2
Diffstat (limited to 'src/vnet/ipsec/ipsec_tun.h')
-rw-r--r--src/vnet/ipsec/ipsec_tun.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/vnet/ipsec/ipsec_tun.h b/src/vnet/ipsec/ipsec_tun.h
index 90f299668dc..c5fbe59f2b6 100644
--- a/src/vnet/ipsec/ipsec_tun.h
+++ b/src/vnet/ipsec/ipsec_tun.h
@@ -47,12 +47,21 @@ typedef CLIB_PACKED(struct {
extern u8 *format_ipsec4_tunnel_key (u8 * s, va_list * args);
extern u8 *format_ipsec6_tunnel_key (u8 * s, va_list * args);
+#define foreach_ipsec_protect_flags \
+ _(L2, 1, "l2") \
+ _(ENCAPED, 2, "encapped") \
+ _(ITF, 4, "itf") \
+
typedef enum ipsec_protect_flags_t_
{
- IPSEC_PROTECT_L2 = (1 << 0),
- IPSEC_PROTECT_ENCAPED = (1 << 1),
+ IPSEC_PROTECT_NONE = 0,
+#define _(a,b,c) IPSEC_PROTECT_##a = b,
+ foreach_ipsec_protect_flags
+#undef _
} __clib_packed ipsec_protect_flags_t;
+extern u8 *format_ipsec_tun_protect_flags (u8 * s, va_list * args);
+
typedef struct ipsec_ep_t_
{
ip46_address_t src;
@@ -76,6 +85,7 @@ typedef struct ipsec_tun_protect_t_
ipsec_ep_t itp_crypto;
ipsec_protect_flags_t itp_flags;
+ adj_index_t itp_ai;
ipsec_ep_t itp_tun;