+#include <vlibmemory/api.h>
+#include <svm/message_queue.h>
+#include <vnet/session/session_types.h>
+#include <vnet/tls/tls_test.h>
+#include <svm/fifo_segment.h>
+
+typedef struct certificate_
+{
+ u32 *app_interests; /* vec of application index asking for deletion cb */
+ u32 cert_key_index; /* index in cert & key pool */
+ u8 *key;
+ u8 *cert;
+} app_cert_key_pair_t;
+
+typedef struct session_cb_vft_
+{
+ /** Notify server of new segment */
+ int (*add_segment_callback) (u32 app_wrk_index, u64 segment_handle);
+
+ /** Notify server of new segment */
+ int (*del_segment_callback) (u32 app_wrk_index, u64 segment_handle);
+
+ /** Notify server of newly accepted session */
+ int (*session_accept_callback) (session_t * new_session);
+
+ /** Connection request callback */
+ int (*session_connected_callback) (u32 app_wrk_index, u32 opaque,
+ session_t * s, u8 code);
+
+ /** Notify app that session is closing */
+ void (*session_disconnect_callback) (session_t * s);
+
+ /** Notify app that transport is closed */
+ void (*session_transport_closed_callback) (session_t * s);
+
+ /** Notify app that session or transport are about to be removed */
+ void (*session_cleanup_callback) (session_t * s, session_cleanup_ntf_t ntf);
+
+ /** Notify app that session was reset */
+ void (*session_reset_callback) (session_t * s);
+
+ /** Notify app that session pool migration happened */
+ void (*session_migrate_callback) (session_t * s, session_handle_t new_sh);
+
+ /** Direct RX callback for built-in application */
+ int (*builtin_app_rx_callback) (session_t * session);
+
+ /** Direct TX callback for built-in application */
+ int (*builtin_app_tx_callback) (session_t * session);
+
+ /** Cert and key pair delete notification */
+ int (*app_cert_key_pair_delete_callback) (app_cert_key_pair_t * ckpair);
+
+} session_cb_vft_t;
+
+#define foreach_app_init_args \
+ _(u32, api_client_index) \
+ _(u8 *, name) \
+ _(u64 *, options) \
+ _(u8 *, namespace_id) \
+ _(session_cb_vft_t *, session_cb_vft) \
+ _(u32, app_index) \