session vcl: cert key add/del with socket api
[vpp.git] / src / vnet / session / application_interface.h
index 46029f0..ca8dc38 100644 (file)
@@ -223,15 +223,16 @@ typedef enum
   APP_OPTIONS_N_OPTIONS
 } app_attach_options_index_t;
 
-#define foreach_app_options_flags                              \
-  _(ACCEPT_REDIRECT, "Use FIFO with redirects")                        \
-  _(ADD_SEGMENT, "Add segment and signal app if needed")       \
-  _(IS_BUILTIN, "Application is builtin")                      \
-  _(IS_TRANSPORT_APP, "Application is a transport proto")      \
-  _(IS_PROXY, "Application is proxying")                       \
-  _(USE_GLOBAL_SCOPE, "App can use global session scope")      \
-  _(USE_LOCAL_SCOPE, "App can use local session scope")                \
-  _(EVT_MQ_USE_EVENTFD, "Use eventfds for signaling")          \
+#define foreach_app_options_flags                                             \
+  _ (ACCEPT_REDIRECT, "Use FIFO with redirects")                              \
+  _ (ADD_SEGMENT, "Add segment and signal app if needed")                     \
+  _ (IS_BUILTIN, "Application is builtin")                                    \
+  _ (IS_TRANSPORT_APP, "Application is a transport proto")                    \
+  _ (IS_PROXY, "Application is proxying")                                     \
+  _ (USE_GLOBAL_SCOPE, "App can use global session scope")                    \
+  _ (USE_LOCAL_SCOPE, "App can use local session scope")                      \
+  _ (EVT_MQ_USE_EVENTFD, "Use eventfds for signaling")                        \
+  _ (MEMFD_FOR_BUILTIN, "Use memfd for builtin app segs")
 
 typedef enum _app_options
 {
@@ -351,6 +352,7 @@ typedef struct session_bound_msg_
   uword tx_fifo;
   uword vpp_evt_q;
   u64 segment_handle;
+  u32 mq_index;
 } __clib_packed session_bound_msg_t;
 
 typedef struct session_unlisten_msg_
@@ -434,10 +436,8 @@ typedef struct session_connected_msg_
   uword ct_tx_fifo;
   u64 ct_segment_handle;
   uword vpp_event_queue_address;
-  u32 segment_size;
-  u8 segment_name_length;
-  u8 segment_name[64];
   transport_endpoint_t lcl;
+  u32 mq_index;
 } __clib_packed session_connected_msg_t;
 
 typedef struct session_shutdown_msg_
@@ -817,6 +817,8 @@ typedef enum app_sapi_msg_type
   APP_SAPI_MSG_TYPE_ADD_DEL_WORKER,
   APP_SAPI_MSG_TYPE_ADD_DEL_WORKER_REPLY,
   APP_SAPI_MSG_TYPE_SEND_FDS,
+  APP_SAPI_MSG_TYPE_ADD_DEL_CERT_KEY,
+  APP_SAPI_MSG_TYPE_ADD_DEL_CERT_KEY_REPLY,
 } __clib_packed app_sapi_msg_type_e;
 
 typedef struct app_sapi_attach_msg_
@@ -861,6 +863,22 @@ typedef struct app_sapi_worker_add_del_reply_msg_
   u8 is_add;
 } __clib_packed app_sapi_worker_add_del_reply_msg_t;
 
+typedef struct app_sapi_cert_key_add_del_msg_
+{
+  u32 context;
+  u32 index;
+  u16 cert_len;
+  u16 certkey_len;
+  u8 is_add;
+} __clib_packed app_sapi_cert_key_add_del_msg_t;
+
+typedef struct app_sapi_cert_key_add_del_reply_msg_
+{
+  u32 context;
+  i32 retval;
+  u32 index;
+} __clib_packed app_sapi_cert_key_add_del_reply_msg_t;
+
 typedef struct app_sapi_msg_
 {
   app_sapi_msg_type_e type;
@@ -870,6 +888,8 @@ typedef struct app_sapi_msg_
     app_sapi_attach_reply_msg_t attach_reply;
     app_sapi_worker_add_del_msg_t worker_add_del;
     app_sapi_worker_add_del_reply_msg_t worker_add_del_reply;
+    app_sapi_cert_key_add_del_msg_t cert_key_add_del;
+    app_sapi_cert_key_add_del_reply_msg_t cert_key_add_del_reply;
   };
 } __clib_packed app_sapi_msg_t;