summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/application.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/application.h')
-rw-r--r--src/vnet/session/application.h39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/vnet/session/application.h b/src/vnet/session/application.h
index e5bb00e2b14..d641263497c 100644
--- a/src/vnet/session/application.h
+++ b/src/vnet/session/application.h
@@ -116,6 +116,9 @@ typedef struct app_listener_
clib_bitmap_t *workers; /**< workers accepting connections */
u32 accept_rotor; /**< last worker to accept a connection */
u32 al_index;
+ u32 app_index;
+ u32 local_index;
+ u32 session_index;
} app_listener_t;
typedef struct application_
@@ -215,6 +218,19 @@ typedef struct _vnet_app_worker_add_del_args
#define APP_NS_INVALID_INDEX ((u32)~0)
#define APP_INVALID_SEGMENT_MANAGER_INDEX ((u32) ~0)
+app_listener_t *app_listener_get (application_t * app, u32 al_index);
+int app_listener_alloc_and_init (application_t * app,
+ session_endpoint_cfg_t * sep,
+ app_listener_t ** listener);
+void app_listener_cleanup (app_listener_t * app_listener);
+session_handle_t app_listener_handle (app_listener_t * app_listener);
+app_listener_t *app_listener_lookup (application_t * app,
+ session_endpoint_cfg_t * sep);
+app_listener_t *app_listener_get_w_handle (session_handle_t handle);
+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);
@@ -225,13 +241,7 @@ application_t *application_lookup (u32 api_client_index);
application_t *application_lookup_name (const u8 * name);
app_worker_t *application_get_worker (application_t * app, u32 wrk_index);
app_worker_t *application_get_default_worker (application_t * app);
-app_worker_t *application_listener_select_worker (session_t * ls,
- u8 is_local);
-int application_start_listen (application_t * app,
- session_endpoint_cfg_t * tep,
- session_handle_t * handle);
-int application_stop_listen (u32 app_index, u32 app_or_wrk,
- session_handle_t handle);
+app_worker_t *application_listener_select_worker (session_t * ls);
int application_change_listener_owner (session_t * s, app_worker_t * app_wrk);
int application_is_proxy (application_t * app);
int application_is_builtin (application_t * app);
@@ -263,10 +273,10 @@ app_worker_t *app_worker_get_if_valid (u32 wrk_index);
application_t *app_worker_get_app (u32 wrk_index);
int app_worker_own_session (app_worker_t * app_wrk, session_t * s);
void app_worker_free (app_worker_t * app_wrk);
-int app_worker_open_session (app_worker_t * app, session_endpoint_t * tep,
- u32 api_context);
-int app_worker_start_listen (app_worker_t * app_wrk, session_t * ls);
-int app_worker_stop_listen (app_worker_t * app_wrk, session_handle_t handle);
+int app_worker_connect_session (app_worker_t * app, session_endpoint_t * tep,
+ u32 api_context);
+int app_worker_start_listen (app_worker_t * app_wrk, app_listener_t * lstnr);
+int app_worker_stop_listen (app_worker_t * app_wrk, app_listener_t * al);
segment_manager_t *app_worker_get_listen_segment_manager (app_worker_t *,
session_t *);
segment_manager_t *app_worker_get_connect_segment_manager (app_worker_t *);
@@ -298,13 +308,6 @@ local_session_t *app_worker_get_local_session (app_worker_t * app,
u32 session_index);
local_session_t *app_worker_get_local_session_from_handle (session_handle_t
handle);
-local_session_t
- * application_get_local_listen_session_from_handle (session_handle_t lh);
-int application_start_local_listen (application_t * server,
- session_endpoint_cfg_t * sep,
- session_handle_t * handle);
-int application_stop_local_listen (u32 app_index, u32 app_or_wrk,
- session_handle_t lh);
int app_worker_local_session_connect (app_worker_t * client,
app_worker_t * server,
local_session_t * ls, u32 opaque);