diff options
author | Neale Ranns <nranns@cisco.com> | 2020-06-30 07:47:14 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-07-21 18:42:25 +0000 |
commit | dd4ccf2623b547654d215ffcf42f9813e42aa90c (patch) | |
tree | 827d8a6086160b70e5f490dde520be6bc577e1d5 /src/vnet/ipsec/ipsec_format.c | |
parent | 0c65f52bb9395526613493aa9c042ea4f6dbc1fc (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_format.c')
-rw-r--r-- | src/vnet/ipsec/ipsec_format.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/vnet/ipsec/ipsec_format.c b/src/vnet/ipsec/ipsec_format.c index 98de779b0de..e3c6f22bf00 100644 --- a/src/vnet/ipsec/ipsec_format.c +++ b/src/vnet/ipsec/ipsec_format.c @@ -353,6 +353,21 @@ format_ipsec_tun_protect_index (u8 * s, va_list * args) return (format (s, "%U", format_ipsec_tun_protect, itp)); } +u8 * +format_ipsec_tun_protect_flags (u8 * s, va_list * args) +{ + ipsec_protect_flags_t flags = va_arg (*args, int); + + if (IPSEC_PROTECT_NONE == flags) + s = format (s, "none"); +#define _(a,b,c) \ + else if (flags & IPSEC_PROTECT_##a) \ + s = format (s, "%s", c); \ + foreach_ipsec_protect_flags +#undef _ + + return (s); +} u8 * format_ipsec_tun_protect (u8 * s, va_list * args) @@ -360,8 +375,9 @@ format_ipsec_tun_protect (u8 * s, va_list * args) ipsec_tun_protect_t *itp = va_arg (*args, ipsec_tun_protect_t *); u32 sai; - s = format (s, "%U", format_vnet_sw_if_index_name, - vnet_get_main (), itp->itp_sw_if_index); + s = format (s, "%U flags:[%U]", format_vnet_sw_if_index_name, + vnet_get_main (), itp->itp_sw_if_index, + format_ipsec_tun_protect_flags, itp->itp_flags); if (!ip_address_is_zero (itp->itp_key)) s = format (s, ": %U", format_ip_address, itp->itp_key); s = format (s, "\n output-sa:"); |