session: support registration of custom crypto engines
[vpp.git] / src / vnet / session / application_interface.h
index e5e36b8..f73cd0a 100644 (file)
@@ -166,7 +166,7 @@ typedef enum crypto_engine_type_
   CRYPTO_ENGINE_OPENSSL,
   CRYPTO_ENGINE_VPP,
   CRYPTO_ENGINE_PICOTLS,
-  CRYPTO_N_ENGINES
+  CRYPTO_ENGINE_LAST = CRYPTO_ENGINE_PICOTLS,
 } crypto_engine_type_t;
 
 typedef struct _vnet_app_add_cert_key_pair_args_
@@ -298,6 +298,9 @@ typedef struct session_listen_msg_
   u32 ckpair_index;
 } __clib_packed session_listen_msg_t;
 
+STATIC_ASSERT (sizeof (session_listen_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
+              "msg too large");
+
 typedef struct session_listen_uri_msg_
 {
   u32 client_index;
@@ -305,6 +308,9 @@ typedef struct session_listen_uri_msg_
   u8 uri[56];
 } __clib_packed session_listen_uri_msg_t;
 
+STATIC_ASSERT (sizeof (session_listen_uri_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
+              "msg too large");
+
 typedef struct session_bound_msg_
 {
   u32 context;
@@ -365,12 +371,16 @@ typedef struct session_connect_msg_
   u8 proto;
   u8 is_ip4;
   ip46_address_t ip;
+  ip46_address_t lcl_ip;
   u8 hostname_len;
   u8 hostname[16];
   u64 parent_handle;
   u32 ckpair_index;
 } __clib_packed session_connect_msg_t;
 
+STATIC_ASSERT (sizeof (session_connect_msg_t) <= SESSION_CTRL_MSG_MAX_SIZE,
+              "msg too large");
+
 typedef struct session_connect_uri_msg_
 {
   u32 client_index;
@@ -378,6 +388,9 @@ typedef struct session_connect_uri_msg_
   u8 uri[56];
 } __clib_packed session_connect_uri_msg_t;
 
+STATIC_ASSERT (sizeof (session_connect_uri_msg_t) <=
+              SESSION_CTRL_MSG_MAX_SIZE, "msg too large");
+
 typedef struct session_connected_msg_
 {
   u32 context;