aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/sapi/vpp_echo_common.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-09-12 16:02:13 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-10-08 01:12:24 +0000
commit8095b602c79c411999f04ded541db918cf1fabe0 (patch)
tree7a4ddade5c1c6fd00bdf0c340c67918dbfaa0966 /src/plugins/hs_apps/sapi/vpp_echo_common.c
parentcaa7acf5c55a78ef4f7addfb94da0ad788f59a75 (diff)
hsa: make vpp_echo use mq instead of bapi
Type: refactor Change-Id: I4f370b09e22dbbc8920272df9a042dae04825bfc Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/hs_apps/sapi/vpp_echo_common.c')
-rw-r--r--src/plugins/hs_apps/sapi/vpp_echo_common.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/plugins/hs_apps/sapi/vpp_echo_common.c b/src/plugins/hs_apps/sapi/vpp_echo_common.c
index d6ee644ea6b..0f6c2ec7135 100644
--- a/src/plugins/hs_apps/sapi/vpp_echo_common.c
+++ b/src/plugins/hs_apps/sapi/vpp_echo_common.c
@@ -174,6 +174,10 @@ echo_format_app_state (u8 * s, va_list * args)
return format (s, "STATE_START");
if (state == STATE_ATTACHED)
return format (s, "STATE_ATTACHED");
+ if (state == STATE_ATTACHED_NO_CERT)
+ return format (s, "STATE_ATTACHED_NO_CERT");
+ if (state == STATE_ATTACHED_ONE_CERT)
+ return format (s, "STATE_ATTACHED_ONE_CERT");
if (state == STATE_LISTEN)
return format (s, "STATE_LISTEN");
if (state == STATE_READY)
@@ -426,6 +430,40 @@ unformat_ip6_address (unformat_input_t * input, va_list * args)
}
}
+u8 *
+echo_format_crypto_engine (u8 * s, va_list * args)
+{
+ u32 state = va_arg (*args, u32);
+ if (state == TLS_ENGINE_MBEDTLS)
+ return format (s, "mbedtls");
+ if (state == TLS_ENGINE_OPENSSL)
+ return format (s, "openssl");
+ if (state == CRYPTO_ENGINE_PICOTLS)
+ return format (s, "picotls");
+ if (state == CRYPTO_ENGINE_VPP)
+ return format (s, "vpp");
+ else
+ return format (s, "unknown crypto engine");
+}
+
+uword
+echo_unformat_crypto_engine (unformat_input_t * input, va_list * args)
+{
+ u8 *a = va_arg (*args, u8 *);
+ if (unformat (input, "mbedtls"))
+ *a = TLS_ENGINE_MBEDTLS;
+ else if (unformat (input, "openssl"))
+ *a = TLS_ENGINE_OPENSSL;
+ else if (unformat (input, "picotls"))
+ *a = CRYPTO_ENGINE_PICOTLS;
+ else if (unformat (input, "vpp"))
+ *a = CRYPTO_ENGINE_VPP;
+ else
+ return 0;
+ return 1;
+}
+
+
/*
*
* End of format functions