FD.io VPP  v19.08.3-2-gbabecb413
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 void app_listener_free (application_t *app, app_listener_t *app_listener)
 
session_handle_t app_listener_handle (app_listener_t *al)
 
app_listener_tapp_listener_get_w_session (session_t *ls)
 
session_handle_t app_listen_session_handle (session_t *ls)
 Get app listener handle for listening session. More...
 
app_listener_tapp_listener_get_w_handle (session_handle_t handle)
 Get app listener for listener session handle. More...
 
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_props_tapplication_segment_manager_properties (application_t *app)
 
segment_manager_props_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

◆ app_interface_check_thread_and_barrier

#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:112
static u8 vlib_thread_is_main_w_barrier(void)
Definition: threads.h:517

Definition at line 24 of file application.c.

Function Documentation

◆ app_get_name()

static const u8* app_get_name ( application_t app)
static

Definition at line 318 of file application.c.

+ Here is the caller graph for this function:

◆ app_listen_session_handle()

session_handle_t app_listen_session_handle ( session_t ls)

Get app listener handle for listening session.

For a given listening session, this can return either the session handle of the app listener associated to the listening session or, if no such app listener exists, the session's handle

Parameters
lslistening session
Returns
app listener or listening session handle

Definition at line 78 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_alloc()

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:

◆ app_listener_alloc_and_init()

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

Definition at line 130 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_cleanup()

void app_listener_cleanup ( app_listener_t al)

Definition at line 230 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_free()

static void app_listener_free ( application_t app,
app_listener_t app_listener 
)
static

Definition at line 52 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_get()

app_listener_t* app_listener_get ( application_t app,
u32  app_listener_index 
)

Definition at line 46 of file application.c.

+ Here is the caller graph for this function:

◆ app_listener_get_local_session()

session_t* app_listener_get_local_session ( app_listener_t al)

Definition at line 281 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_get_session()

session_t* app_listener_get_session ( app_listener_t al)

Definition at line 272 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_get_w_handle()

app_listener_t* app_listener_get_w_handle ( session_handle_t  handle)

Get app listener for listener session handle.

Should only be called on handles that have an app listener, i.e., were obtained at the end of a vnet_listen call.

Parameters
handlehandle of the app listener. This is the handle of either the global or local listener
Returns
pointer to app listener or 0

Definition at line 88 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_get_w_session()

app_listener_t* app_listener_get_w_session ( session_t ls)

Definition at line 67 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_handle()

session_handle_t app_listener_handle ( app_listener_t al)

Definition at line 61 of file application.c.

+ Here is the caller graph for this function:

◆ app_listener_lookup()

app_listener_t* app_listener_lookup ( application_t app,
session_endpoint_cfg_t sep_ext 
)

Definition at line 98 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_listener_select_worker()

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

Definition at line 257 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_name_from_api_index()

static u8* app_name_from_api_index ( u32  api_client_index)
static

Definition at line 789 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_validate_namespace()

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

Definition at line 767 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_worker_map_alloc()

static app_worker_map_t* app_worker_map_alloc ( application_t app)
static

Definition at line 289 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ app_worker_map_free()

static void app_worker_map_free ( application_t app,
app_worker_map_t map 
)
static

Definition at line 304 of file application.c.

+ Here is the caller graph for this function:

◆ app_worker_map_get()

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

Definition at line 310 of file application.c.

+ Here is the caller graph for this function:

◆ app_worker_map_index()

static u32 app_worker_map_index ( application_t app,
app_worker_map_t map 
)
static

Definition at line 298 of file application.c.

+ Here is the caller graph for this function:

◆ application_alloc()

static application_t* application_alloc ( void  )
static

Definition at line 408 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_alloc_and_init()

static int application_alloc_and_init ( app_init_args_t a)
static

Definition at line 475 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_alloc_worker_and_init()

int application_alloc_worker_and_init ( application_t app,
app_worker_t **  wrk 
)

Definition at line 677 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_api_table_add()

static void application_api_table_add ( u32  app_index,
u32  api_client_index 
)
static

Definition at line 361 of file application.c.

+ Here is the caller graph for this function:

◆ application_api_table_del()

static void application_api_table_del ( u32  api_client_index)
static

Definition at line 368 of file application.c.

+ Here is the caller graph for this function:

◆ application_change_listener_owner()

int application_change_listener_owner ( session_t s,
app_worker_t app_wrk 
)

Definition at line 1090 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_detach_process()

static void application_detach_process ( application_t app,
u32  api_client_index 
)
static

Definition at line 600 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_format_all_clients()

void application_format_all_clients ( vlib_main_t vm,
int  verbose 
)

Definition at line 1443 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_format_all_listeners()

void application_format_all_listeners ( vlib_main_t vm,
int  verbose 
)

Definition at line 1423 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_format_connects()

static void application_format_connects ( application_t app,
int  verbose 
)
static

Definition at line 1359 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_format_listeners()

static void application_format_listeners ( application_t app,
int  verbose 
)
static

Definition at line 1330 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_free()

static void application_free ( application_t app)
static

Definition at line 562 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_get()

application_t* application_get ( u32  app_index)

Definition at line 418 of file application.c.

+ Here is the caller graph for this function:

◆ application_get_default_worker()

app_worker_t* application_get_default_worker ( application_t app)

Definition at line 654 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_get_if_valid()

application_t* application_get_if_valid ( u32  app_index)

Definition at line 426 of file application.c.

+ Here is the caller graph for this function:

◆ application_get_segment_manager_properties()

segment_manager_props_t* application_get_segment_manager_properties ( u32  app_index)

Definition at line 1299 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_get_worker()

app_worker_t* application_get_worker ( application_t app,
u32  wrk_map_index 
)

Definition at line 644 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_has_global_scope()

u8 application_has_global_scope ( application_t app)

Definition at line 1147 of file application.c.

+ Here is the caller graph for this function:

◆ application_has_local_scope()

u8 application_has_local_scope ( application_t app)

Definition at line 1141 of file application.c.

+ Here is the caller graph for this function:

◆ application_is_builtin()

int application_is_builtin ( application_t app)

Definition at line 1129 of file application.c.

+ Here is the caller graph for this function:

◆ application_is_builtin_proxy()

int application_is_builtin_proxy ( application_t app)

Definition at line 1135 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_is_proxy()

int application_is_proxy ( application_t app)

Definition at line 1123 of file application.c.

+ Here is the caller graph for this function:

◆ application_listener_select_worker()

app_worker_t* application_listener_select_worker ( session_t ls)

Definition at line 666 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_local_session_table()

u32 application_local_session_table ( application_t app)

Definition at line 339 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_lookup()

application_t* application_lookup ( u32  api_client_index)

Definition at line 386 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_lookup_name()

application_t* application_lookup_name ( const u8 name)

Definition at line 397 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_n_workers()

u32 application_n_workers ( application_t app)

Definition at line 660 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_name_from_index()

const u8* application_name_from_index ( u32  app_index)

Returns app name for app-index.

Definition at line 352 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_name_table_add()

static void application_name_table_add ( application_t app)
static

Definition at line 374 of file application.c.

+ Here is the caller graph for this function:

◆ application_name_table_del()

static void application_name_table_del ( application_t app)
static

Definition at line 380 of file application.c.

+ Here is the caller graph for this function:

◆ application_remove_proxy()

void application_remove_proxy ( application_t app)

Definition at line 1277 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_segment_manager_properties()

segment_manager_props_t* application_segment_manager_properties ( application_t app)

Definition at line 1293 of file application.c.

+ Here is the caller graph for this function:

◆ application_session_table()

u32 application_session_table ( application_t app,
u8  fib_proto 
)

Definition at line 324 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_setup_proxy()

void application_setup_proxy ( application_t app)

Definition at line 1261 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_start_stop_proxy()

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

Definition at line 1245 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_start_stop_proxy_fib_proto()

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 1153 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_start_stop_proxy_local_scope()

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

Definition at line 1218 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ application_verify_cb_fns()

static void application_verify_cb_fns ( session_cb_vft_t cb_fns)
static

Definition at line 435 of file application.c.

+ Here is the caller graph for this function:

◆ application_verify_cfg()

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 453 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ format_application()

u8* format_application ( u8 s,
va_list *  args 
)

Definition at line 1379 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_endpoint_in_ns()

static u8 session_endpoint_in_ns ( session_endpoint_t sep)
static

Definition at line 887 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ session_endpoint_update_for_app()

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

Definition at line 902 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this 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 
)
static

Definition at line 1463 of file application.c.

+ Here is the call graph for this function:

◆ vnet_app_add_tls_cert()

clib_error_t* vnet_app_add_tls_cert ( vnet_app_add_tls_cert_args_t a)

Definition at line 1306 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_app_add_tls_key()

clib_error_t* vnet_app_add_tls_key ( vnet_app_add_tls_key_args_t a)

Definition at line 1318 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_app_worker_add_del()

int vnet_app_worker_add_del ( vnet_app_worker_add_del_args_t a)

Definition at line 717 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_application_attach()

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 809 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_application_detach()

int vnet_application_detach ( vnet_app_detach_args_t a)

Detach application from vpp.

Definition at line 869 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_connect()

int vnet_connect ( vnet_connect_args_t a)

Definition at line 1001 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_disconnect_session()

int vnet_disconnect_session ( vnet_disconnect_args_t a)

Definition at line 1070 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_listen()

int vnet_listen ( vnet_listen_args_t a)

Definition at line 947 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vnet_unlisten()

int vnet_unlisten ( vnet_unlisten_args_t a)

Definition at line 1039 of file application.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ app_main

app_main_t app_main
static

Definition at line 22 of file application.c.

◆ show_app_command

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:1463

(constructor) VLIB_CLI_COMMAND (show_app_command)

Definition at line 1525 of file application.c.