16 #ifndef SRC_VNET_SESSION_APPLICATION_H_ 17 #define SRC_VNET_SESSION_APPLICATION_H_ 23 typedef struct _stream_session_cb_vft
26 int (*add_segment_callback) (
u32 api_client_index,
29 int (*del_segment_callback) (
u32 api_client_index,
36 int (*session_connected_callback) (
u32 app_index,
u32 opaque,
53 typedef struct _application
87 u32 connects_seg_manager;
90 uword *listeners_table;
97 u32 first_segment_manager;
98 u8 first_segment_manager_in_use;
103 u16 proxied_transports;
110 u32 local_segment_manager;
119 uword *local_connects;
135 #define APP_INVALID_INDEX ((u32)~0) 136 #define APP_NS_INVALID_INDEX ((u32)~0) 137 #define APP_INVALID_SEGMENT_MANAGER_INDEX ((u32) ~0) 220 *app_index = ls_id >> 16;
221 *session_index = ls_id & 0xFFF;
230 bottom = (handle & 0xFFFFFFFF);
250 u32 server_index, session_index;
session_type_t listener_session_type
Has transport embedded when listener not purely local.
static session_handle_t application_local_session_handle(local_session_t *ls)
int application_stop_listen(application_t *srv, session_handle_t handle)
Stop listening on session associated to handle.
struct _segment_manager_properties segment_manager_properties_t
application_t * application_lookup_name(const u8 *name)
application_t * application_get_if_valid(u32 index)
void application_remove_proxy(application_t *app)
int application_connect(u32 client_index, u32 api_context, session_endpoint_t *sep)
int application_start_local_listen(application_t *server, session_endpoint_t *sep, session_handle_t *handle)
int application_add_segment_notify(u32 app_index, ssvm_private_t *fs)
Send an API message to the external app, to map new segment.
u32 application_n_listeners(application_t *app)
#define SESSION_LOCAL_HANDLE_PREFIX
local_session_t * application_get_local_session_from_handle(session_handle_t handle)
application_t * application_lookup(u32 api_client_index)
segment_manager_properties_t * application_get_segment_manager_properties(u32 app_index)
uword unformat_application_proto(unformat_input_t *input, va_list *args)
struct _stream_session_cb_vft session_cb_vft_t
static local_session_t * application_get_local_listen_session(application_t *app, u32 session_index)
int application_init(application_t *app, u32 api_client_index, u8 *name, u64 *options, session_cb_vft_t *cb_fns)
segment_manager_t * application_get_listen_segment_manager(application_t *app, stream_session_t *ls)
struct _stream_session_t stream_session_t
application_t * application_new()
local_session_t * application_get_local_session(application_t *app, u32 session_index)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
struct _session_endpoint session_endpoint_t
static void local_session_parse_handle(session_handle_t handle, u32 *server_index, u32 *session_index)
int application_is_builtin(application_t *app)
static u8 application_local_session_listener_has_transport(local_session_t *ls)
static u32 local_session_id(local_session_t *ll)
int application_local_session_disconnect_w_index(u32 app_index, u32 ls_index)
stream_session_t * application_first_listener(application_t *app, u8 fib_proto, u8 transport_proto)
segment_manager_t * application_get_connect_segment_manager(application_t *app)
static transport_proto_t session_type_transport_proto(session_type_t st)
u32 application_get_index(application_t *app)
local_session_t * application_alloc_local_session(application_t *app)
struct _application application_t
u8 * application_name_from_index(u32 app_index)
Returns app name.
int application_open_session(application_t *app, session_endpoint_t *tep, u32 api_context)
void application_free_local_session(application_t *app, local_session_t *ls)
u8 application_has_global_scope(application_t *app)
application_t * application_get(u32 index)
static local_session_t * application_get_local_listener_w_handle(session_handle_t handle)
int application_is_proxy(application_t *app)
static void local_session_parse_id(u32 ls_id, u32 *app_index, u32 *session_index)
u32 application_session_table(application_t *app, u8 fib_proto)
int application_start_listen(application_t *app, session_endpoint_t *tep, session_handle_t *handle)
Start listening local transport endpoint for requested transport.
u32 application_local_session_table(application_t *app)
void send_local_session_disconnect_callback(u32 app_index, local_session_t *ls)
enum _transport_proto transport_proto_t
segment_manager_properties_t * application_segment_manager_properties(application_t *app)
u32 session_index
Session index.
struct _segment_manager segment_manager_t
int application_alloc_connects_segment_manager(application_t *app)
struct _svm_queue svm_queue_t
u8 application_has_local_scope(application_t *app)
int application_is_builtin_proxy(application_t *app)
int application_stop_local_listen(application_t *server, session_handle_t listener_handle)
Clean up local session table.
int application_local_session_disconnect(u32 app_index, local_session_t *ls)
int application_api_queue_is_full(application_t *app)
int application_local_session_connect_notify(local_session_t *ls)
int application_local_session_connect(u32 table_index, application_t *client, application_t *server, local_session_t *ll, u32 opaque)
void application_setup_proxy(application_t *app)
void application_del(application_t *app)
void application_local_sessions_del(application_t *app)
u32 app_index
Server index.