aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tunnel/tunnel.c
diff options
context:
space:
mode:
authorMohammed Hawari <mohammed@hawari.fr>2020-12-01 11:30:57 +0100
committerNeale Ranns <nranns@cisco.com>2020-12-08 16:38:01 +0000
commit59b792ffb1d77309b0ab17e441fd14237adb74db (patch)
treef6ea354d07103861147b8e70015eb3d7fc9e50f5 /src/vnet/tunnel/tunnel.c
parentd2fb601022e25055211f6e6ccb960758b8490073 (diff)
tunnel: add cli support for encap_decap flags
Change-Id: I2bf6ba325975309183dba1e14e9519c944710752 Signed-off-by: Mohammed Hawari <mohammed@hawari.fr> Type: improvement
Diffstat (limited to 'src/vnet/tunnel/tunnel.c')
-rw-r--r--src/vnet/tunnel/tunnel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/vnet/tunnel/tunnel.c b/src/vnet/tunnel/tunnel.c
index 96d7fd12b52..38bde34e7f2 100644
--- a/src/vnet/tunnel/tunnel.c
+++ b/src/vnet/tunnel/tunnel.c
@@ -62,6 +62,20 @@ format_tunnel_encap_decap_flags (u8 * s, va_list * args)
return (s);
}
+uword
+unformat_tunnel_encap_decap_flags (unformat_input_t * input, va_list * args)
+{
+ tunnel_encap_decap_flags_t *f =
+ va_arg (*args, tunnel_encap_decap_flags_t *);
+#define _(a,b,c) if (unformat(input, b)) {\
+ *f |= TUNNEL_ENCAP_DECAP_FLAG_##a;\
+ return 1;\
+ }
+ forech_tunnel_encap_decap_flag;
+#undef _
+ return 0;
+}
+
/*
* fd.io coding-style-patch-verification: ON