summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-08 18:27:29 -0800
committerDamjan Marion <dmarion@me.com>2019-02-11 16:05:37 +0000
commitc1a4265b4b76bf7874b53e866549371c8daf70f4 (patch)
treecce5e97b1b36433d4211fd05b2b4794a40bccf76 /src/vnet/session/application.h
parentc69ac31208059a8ed8b9ef6056b6aaf6e6629cb8 (diff)
session: cleanup application interface
Change-Id: I89d240753b3f3c5e984aa303a7c8fa35fa59bf7f Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application.h')
-rw-r--r--src/vnet/session/application.h46
1 files changed, 3 insertions, 43 deletions
diff --git a/src/vnet/session/application.h b/src/vnet/session/application.h
index d641263497c..0eaca8bc95a 100644
--- a/src/vnet/session/application.h
+++ b/src/vnet/session/application.h
@@ -16,9 +16,10 @@
#ifndef SRC_VNET_SESSION_APPLICATION_H_
#define SRC_VNET_SESSION_APPLICATION_H_
+#include <vnet/session/application_interface.h>
+#include <vnet/session/application_namespace.h>
#include <vnet/session/session_types.h>
#include <vnet/session/segment_manager.h>
-#include <vnet/session/application_namespace.h>
#define APP_DEBUG 0
@@ -28,35 +29,6 @@
#define APP_DBG(_fmt, _args...)
#endif
-typedef struct _stream_session_cb_vft
-{
- /** Notify server of new segment */
- int (*add_segment_callback) (u32 api_client_index, u64 segment_handle);
-
- /** Notify server of new segment */
- int (*del_segment_callback) (u32 api_client_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 session was reset */
- void (*session_reset_callback) (session_t * s);
-
- /** 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);
-
-} session_cb_vft_t;
-
typedef struct app_worker_
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
@@ -188,14 +160,6 @@ typedef struct app_main_
uword *app_by_name;
} app_main_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) \
-
typedef struct app_init_args_
{
#define _(_type, _name) _type _name;
@@ -231,10 +195,6 @@ app_listener_t *app_listener_get_w_session (session_t * ls);
app_worker_t *app_listener_select_worker (app_listener_t * al);
session_t *app_listener_get_session (app_listener_t * al);
-application_t *application_alloc (void);
-int application_alloc_and_init (app_init_args_t * args);
-void application_free (application_t * app);
-void application_detach_process (application_t * app, u32 api_client_index);
application_t *application_get (u32 index);
application_t *application_get_if_valid (u32 index);
application_t *application_lookup (u32 api_client_index);
@@ -296,7 +256,7 @@ session_t *app_worker_proxy_listener (app_worker_t * app, u8 fib_proto,
u8 *format_app_worker (u8 * s, va_list * args);
u8 *format_app_worker_listener (u8 * s, va_list * args);
void app_worker_format_connects (app_worker_t * app_wrk, int verbose);
-clib_error_t *vnet_app_worker_add_del (vnet_app_worker_add_del_args_t * a);
+int vnet_app_worker_add_del (vnet_app_worker_add_del_args_t * a);
/*
* Local session