summaryrefslogtreecommitdiffstats
path: root/src/vnet/ipsec/ipsec_format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ipsec/ipsec_format.c')
-rw-r--r--src/vnet/ipsec/ipsec_format.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vnet/ipsec/ipsec_format.c b/src/vnet/ipsec/ipsec_format.c
index 8fdc844aec3..6781fe580c1 100644
--- a/src/vnet/ipsec/ipsec_format.c
+++ b/src/vnet/ipsec/ipsec_format.c
@@ -23,6 +23,7 @@
#include <vnet/ipsec/ipsec.h>
#include <vnet/ipsec/ipsec_tun.h>
+#include <vnet/ipsec/ipsec_itf.h>
u8 *
format_ipsec_policy_action (u8 * s, va_list * args)
@@ -427,6 +428,20 @@ format_ipsec6_tunnel_kv (u8 * s, va_list * args)
return (s);
}
+u8 *
+format_ipsec_itf (u8 * s, va_list * a)
+{
+ index_t ii = va_arg (*a, index_t);
+ ipsec_itf_t *itf;
+
+ itf = ipsec_itf_get (ii);
+ s = format (s, "[%d] %U %U",
+ ii, format_vnet_sw_if_index_name, vnet_get_main (),
+ itf->ii_sw_if_index, format_tunnel_mode, itf->ii_mode);
+
+ return (s);
+}
+
/*
* fd.io coding-style-patch-verification: ON
*