FD.io VPP  v19.04.2-12-g66b1689
Vector Packet Processing
application.c File Reference
+ Include dependency graph for application.c:

Go to the source code of this file.

Macros

#define app_interface_check_thread_and_barrier(_fn, _arg)
 

Functions

static app_listener_tapp_listener_alloc (application_t *app)
 
app_listener_tapp_listener_get (application_t *app, u32 app_listener_index)
 
static app_listener_tapp_listener_get_if_valid (application_t *app, u32 app_listener_index)
 
static void app_listener_free (application_t *app, app_listener_t *app_listener)
 
static u32 app_listener_id (app_listener_t *al)
 
session_handle_t app_listener_handle (app_listener_t *al)
 
static void app_listener_id_parse (u32 listener_id, u32 *app_index, u32 *app_listener_index)
 
void app_listener_handle_parse (session_handle_t handle, u32 *app_index, u32 *app_listener_index)
 
static app_listener_tapp_listener_get_w_id (u32 listener_id)
 
app_listener_tapp_listener_get_w_session (session_t *ls)
 
app_listener_tapp_listener_get_w_handle (session_handle_t handle)
 
app_listener_tapp_listener_lookup (application_t *app, session_endpoint_cfg_t *sep_ext)
 
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 *al)
 
static app_worker_tapp_listener_select_worker (application_t *app, app_listener_t *al)
 
session_tapp_listener_get_session (app_listener_t *al)
 
session_tapp_listener_get_local_session (app_listener_t *al)
 
static app_worker_map_tapp_worker_map_alloc (application_t *app)
 
static u32 app_worker_map_index (application_t *app, app_worker_map_t *map)
 
static void app_worker_map_free (application_t *app, app_worker_map_t *map)
 
static app_worker_map_tapp_worker_map_get (application_t *app, u32 map_index)
 
static const u8app_get_name (application_t *app)
 
u32 application_session_table (application_t *app, u8 fib_proto)
 
u32 application_local_session_table (application_t *app)
 
const u8application_name_from_index (u32 app_index)
 Returns app name for app-index. More...
 
static void application_api_table_add (u32 app_index, u32 api_client_index)
 
static void application_api_table_del (u32 api_client_index)
 
static void application_name_table_add (application_t *app)
 
static void application_name_table_del (application_t *app)
 
application_tapplication_lookup (u32 api_client_index)
 
application_tapplication_lookup_name (const u8 *name)
 
static application_tapplication_alloc (void)
 
application_tapplication_get (u32 app_index)
 
application_tapplication_get_if_valid (u32 app_index)
 
static void application_verify_cb_fns (session_cb_vft_t *cb_fns)
 
static u8 application_verify_cfg (ssvm_segment_type_t st)
 Check app config for given segment type. More...
 
static int application_alloc_and_init (app_init_args_t *a)
 
static void application_free (application_t *app)
 
static void application_detach_process (application_t *app, u32 api_client_index)
 
app_worker_tapplication_get_worker (application_t *app, u32 wrk_map_index)
 
app_worker_tapplication_get_default_worker (application_t *app)
 
u32 application_n_workers (application_t *app)
 
app_worker_tapplication_listener_select_worker (session_t *ls)
 
int application_alloc_worker_and_init (application_t *app, app_worker_t **wrk)
 
int vnet_app_worker_add_del (vnet_app_worker_add_del_args_t *a)
 
static int app_validate_namespace (u8 *namespace_id, u64 secret, u32 *app_ns_index)
 
static u8app_name_from_api_index (u32 api_client_index)
 
int vnet_application_attach (vnet_app_attach_args_t *a)
 Attach application to vpp. More...
 
int vnet_application_detach (vnet_app_detach_args_t *a)
 Detach application from vpp. More...
 
static u8 session_endpoint_in_ns (session_endpoint_t *sep)
 
static void session_endpoint_update_for_app (session_endpoint_cfg_t *sep, application_t *app, u8 is_connect)
 
int vnet_listen (vnet_listen_args_t *a)
 
int vnet_connect (vnet_connect_args_t *a)
 
int vnet_unlisten (vnet_unlisten_args_t *a)
 
int vnet_disconnect_session (vnet_disconnect_args_t *a)
 
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)
 
int application_is_builtin_proxy (application_t *app)
 
u8 application_has_local_scope (application_t *app)
 
u8 application_has_global_scope (application_t *app)
 
static clib_error_tapplication_start_stop_proxy_fib_proto (application_t *app, u8 fib_proto, u8 transport_proto, u8 is_start)
 
static void application_start_stop_proxy_local_scope (application_t *app, u8 transport_proto, u8 is_start)
 
void application_start_stop_proxy (application_t *app, transport_proto_t transport_proto, u8 is_start)
 
void application_setup_proxy (application_t *app)
 
void application_remove_proxy (application_t *app)
 
segment_manager_properties_tapplication_segment_manager_properties (application_t *app)
 
segment_manager_properties_tapplication_get_segment_manager_properties (u32 app_index)
 
clib_error_tvnet_app_add_tls_cert (vnet_app_add_tls_cert_args_t *a)
 
clib_error_tvnet_app_add_tls_key (vnet_app_add_tls_key_args_t *a)
 
static void application_format_listeners (application_t *app, int verbose)
 
static void application_format_connects (application_t *app, int verbose)
 
u8format_application (u8 *s, va_list *args)
 
void application_format_all_listeners (vlib_main_t *vm, int verbose)
 
void application_format_all_clients (vlib_main_t *vm, int verbose)
 
static clib_error_tshow_app_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static app_main_t app_main
 
static vlib_cli_command_t show_app_command
 (constructor) VLIB_CLI_COMMAND (show_app_command) More...
 

Macro Definition Documentation

#define app_interface_check_thread_and_barrier (   _fn,
  _arg 
)
Value:
{ \
vlib_rpc_call_main_thread (_fn, (u8 *) _arg, sizeof(*_arg)); \
return 0; \
}
unsigned char u8
Definition: types.h:56
#define PREDICT_FALSE(x)
Definition: clib.h:111
static u8 vlib_thread_is_main_w_barrier(void)
Definition: threads.h:511
void vlib_rpc_call_main_thread(void *callback, u8 *args, u32 arg_size)
Definition: threads.c:1823

Definition at line 24 of file application.c.

Function Documentation

static const u8* app_get_name ( application_t app)
static

Definition at line 347 of file application.c.

+ Here is the caller graph for this function:

static app_listener_t* app_listener_alloc ( application_t app)
static

Definition at line 32 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int app_listener_alloc_and_init ( application_t app,
session_endpoint_cfg_t sep,
app_listener_t **  listener 
)

Definition at line 162 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void app_listener_cleanup ( app_listener_t al)

Definition at line 259 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void app_listener_free ( application_t app,
app_listener_t app_listener 
)
static

Definition at line 59 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

app_listener_t* app_listener_get ( application_t app,
u32  app_listener_index 
)

Definition at line 45 of file application.c.

+ Here is the caller graph for this function:

static app_listener_t* app_listener_get_if_valid ( application_t app,
u32  app_listener_index 
)
static

Definition at line 51 of file application.c.

+ Here is the caller graph for this function:

session_t* app_listener_get_local_session ( app_listener_t al)

Definition at line 310 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

session_t* app_listener_get_session ( app_listener_t al)

Definition at line 301 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

app_listener_t* app_listener_get_w_handle ( session_handle_t  handle)

Definition at line 120 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static app_listener_t* app_listener_get_w_id ( u32  listener_id)
static

Definition at line 96 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

app_listener_t* app_listener_get_w_session ( session_t ls)

Definition at line 109 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

session_handle_t app_listener_handle ( app_listener_t al)

Definition at line 75 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void app_listener_handle_parse ( session_handle_t  handle,
u32 app_index,
u32 app_listener_index 
)

Definition at line 89 of file application.c.

+ Here is the call graph for this function:

static u32 app_listener_id ( app_listener_t al)
static

Definition at line 68 of file application.c.

+ Here is the caller graph for this function:

static void app_listener_id_parse ( u32  listener_id,
u32 app_index,
u32 app_listener_index 
)
static

Definition at line 81 of file application.c.

+ Here is the caller graph for this function:

app_listener_t* app_listener_lookup ( application_t app,
session_endpoint_cfg_t sep_ext 
)

Definition at line 130 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static app_worker_t* app_listener_select_worker ( application_t app,
app_listener_t al 
)
static

Definition at line 286 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* app_name_from_api_index ( u32  api_client_index)
static

Definition at line 819 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int app_validate_namespace ( u8 namespace_id,
u64  secret,
u32 app_ns_index 
)
static

Definition at line 797 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static app_worker_map_t* app_worker_map_alloc ( application_t app)
static

Definition at line 318 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void app_worker_map_free ( application_t app,
app_worker_map_t map 
)
static

Definition at line 333 of file application.c.

+ Here is the caller graph for this function:

static app_worker_map_t* app_worker_map_get ( application_t app,
u32  map_index 
)
static

Definition at line 339 of file application.c.

+ Here is the caller graph for this function:

static u32 app_worker_map_index ( application_t app,
app_worker_map_t map 
)
static

Definition at line 327 of file application.c.

+ Here is the caller graph for this function:

static application_t* application_alloc ( void  )
static

Definition at line 437 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int application_alloc_and_init ( app_init_args_t a)
static

Definition at line 504 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int application_alloc_worker_and_init ( application_t app,
app_worker_t **  wrk 
)

Definition at line 707 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_api_table_add ( u32  app_index,
u32  api_client_index 
)
static

Definition at line 390 of file application.c.

+ Here is the caller graph for this function:

static void application_api_table_del ( u32  api_client_index)
static

Definition at line 397 of file application.c.

+ Here is the caller graph for this function:

int application_change_listener_owner ( session_t s,
app_worker_t app_wrk 
)

Definition at line 1114 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_detach_process ( application_t app,
u32  api_client_index 
)
static

Definition at line 630 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void application_format_all_clients ( vlib_main_t vm,
int  verbose 
)

Definition at line 1467 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void application_format_all_listeners ( vlib_main_t vm,
int  verbose 
)

Definition at line 1447 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_format_connects ( application_t app,
int  verbose 
)
static

Definition at line 1383 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_format_listeners ( application_t app,
int  verbose 
)
static

Definition at line 1354 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_free ( application_t app)
static

Definition at line 591 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

application_t* application_get ( u32  app_index)

Definition at line 447 of file application.c.

+ Here is the caller graph for this function:

app_worker_t* application_get_default_worker ( application_t app)

Definition at line 684 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

application_t* application_get_if_valid ( u32  app_index)

Definition at line 455 of file application.c.

+ Here is the caller graph for this function:

segment_manager_properties_t* application_get_segment_manager_properties ( u32  app_index)

Definition at line 1323 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

app_worker_t* application_get_worker ( application_t app,
u32  wrk_map_index 
)

Definition at line 674 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8 application_has_global_scope ( application_t app)

Definition at line 1171 of file application.c.

+ Here is the caller graph for this function:

u8 application_has_local_scope ( application_t app)

Definition at line 1165 of file application.c.

+ Here is the caller graph for this function:

int application_is_builtin ( application_t app)

Definition at line 1153 of file application.c.

+ Here is the caller graph for this function:

int application_is_builtin_proxy ( application_t app)

Definition at line 1159 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int application_is_proxy ( application_t app)

Definition at line 1147 of file application.c.

+ Here is the caller graph for this function:

app_worker_t* application_listener_select_worker ( session_t ls)

Definition at line 696 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 application_local_session_table ( application_t app)

Definition at line 368 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

application_t* application_lookup ( u32  api_client_index)

Definition at line 415 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

application_t* application_lookup_name ( const u8 name)

Definition at line 426 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 application_n_workers ( application_t app)

Definition at line 690 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

const u8* application_name_from_index ( u32  app_index)

Returns app name for app-index.

Definition at line 381 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_name_table_add ( application_t app)
static

Definition at line 403 of file application.c.

+ Here is the caller graph for this function:

static void application_name_table_del ( application_t app)
static

Definition at line 409 of file application.c.

+ Here is the caller graph for this function:

void application_remove_proxy ( application_t app)

Definition at line 1301 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

segment_manager_properties_t* application_segment_manager_properties ( application_t app)

Definition at line 1317 of file application.c.

+ Here is the caller graph for this function:

u32 application_session_table ( application_t app,
u8  fib_proto 
)

Definition at line 353 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void application_setup_proxy ( application_t app)

Definition at line 1285 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void application_start_stop_proxy ( application_t app,
transport_proto_t  transport_proto,
u8  is_start 
)

Definition at line 1269 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* application_start_stop_proxy_fib_proto ( application_t app,
u8  fib_proto,
u8  transport_proto,
u8  is_start 
)
static

Definition at line 1177 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_start_stop_proxy_local_scope ( application_t app,
u8  transport_proto,
u8  is_start 
)
static

Definition at line 1242 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void application_verify_cb_fns ( session_cb_vft_t cb_fns)
static

Definition at line 464 of file application.c.

+ Here is the caller graph for this function:

static u8 application_verify_cfg ( ssvm_segment_type_t  st)
static

Check app config for given segment type.

Returns 1 on success and 0 otherwise

Definition at line 482 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_application ( u8 s,
va_list *  args 
)

Definition at line 1403 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8 session_endpoint_in_ns ( session_endpoint_t sep)
static

Definition at line 917 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void session_endpoint_update_for_app ( session_endpoint_cfg_t sep,
application_t app,
u8  is_connect 
)
static

Definition at line 932 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* show_app_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 1487 of file application.c.

+ Here is the call graph for this function:

clib_error_t* vnet_app_add_tls_cert ( vnet_app_add_tls_cert_args_t a)

Definition at line 1330 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vnet_app_add_tls_key ( vnet_app_add_tls_key_args_t a)

Definition at line 1342 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_app_worker_add_del ( vnet_app_worker_add_del_args_t a)

Definition at line 747 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_application_attach ( vnet_app_attach_args_t a)

Attach application to vpp.

Allocates a vpp app, i.e., a structure that keeps back pointers to external app and a segment manager for shared memory fifo based communication with the external app.

Definition at line 839 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_application_detach ( vnet_app_detach_args_t a)

Detach application from vpp.

Definition at line 899 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_connect ( vnet_connect_args_t a)

Definition at line 1029 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_disconnect_session ( vnet_disconnect_args_t a)

Definition at line 1094 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_listen ( vnet_listen_args_t a)

Definition at line 977 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_unlisten ( vnet_unlisten_args_t a)

Definition at line 1065 of file application.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

app_main_t app_main
static

Definition at line 22 of file application.c.

vlib_cli_command_t show_app_command
static
Initial value:
=
{
.path = "show app",
.short_help = "show app [server|client] [verbose]",
.function = show_app_command_fn,
}
static clib_error_t * show_app_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: application.c:1487

(constructor) VLIB_CLI_COMMAND (show_app_command)

Definition at line 1549 of file application.c.