|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
16 #ifndef SRC_VNET_SESSION_APPLICATION_H_
17 #define SRC_VNET_SESSION_APPLICATION_H_
27 #define APP_DBG(_fmt, _args...) clib_warning (_fmt, ##_args)
29 #define APP_DBG(_fmt, _args...)
210 #define _(_type, _name) _type _name;
215 typedef struct _vnet_app_worker_add_del_args
219 u32 api_client_index;
226 #define APP_INVALID_INDEX ((u32)~0)
227 #define APP_NS_INVALID_INDEX ((u32)~0)
228 #define APP_INVALID_SEGMENT_MANAGER_INDEX ((u32) ~0)
session_handle_t ls_handle
session handle of the local or global listening session that also identifies the app listener
u8 tls_engine
Preferred tls engine.
app_worker_t * application_listener_select_worker(session_t *ls)
u32 app_worker_n_listeners(app_worker_t *app)
session_handle_t * half_open_table
Pool of half-open session handles.
session_t * app_listener_get_local_session(app_listener_t *al)
enum crypto_engine_type_ crypto_engine_type_t
u32 wrk_index
Worker index in global worker pool.
enum session_error_ session_error_t
app_worker_t * application_get_worker(application_t *app, u32 wrk_index)
segment_manager_props_t * application_segment_manager_properties(application_t *app)
struct app_rx_mq_elt_ app_rx_mq_elt_t
session_handle_t app_listener_handle(app_listener_t *app_listener)
struct app_rx_mq_elt_ * next
session_handle_t app_listen_session_handle(session_t *ls)
Get app listener handle for listening session.
svm_msg_q_t * application_rx_mq_get(application_t *app, u32 mq_index)
session_t * app_worker_proxy_listener(app_worker_t *app, u8 fib_proto, u8 transport_proto)
char quic_iv[17]
quic initialization vector
int app_listener_alloc_and_init(application_t *app, session_endpoint_cfg_t *sep, app_listener_t **listener)
struct _vnet_app_worker_add_del_args vnet_app_worker_add_del_args_t
int app_worker_add_half_open(app_worker_t *app_wrk, session_handle_t sh)
u32 local_index
local listening session index
enum app_rx_mq_flags_ app_rx_mq_flags_t
int app_worker_builtin_tx(app_worker_t *app_wrk, session_t *s)
segment_manager_t * app_worker_get_listen_segment_manager(app_worker_t *, session_t *)
void app_worker_format_connects(app_worker_t *app_wrk, int verbose)
int application_is_builtin_proxy(application_t *app)
struct _segment_manager segment_manager_t
struct _session_endpoint_cfg session_endpoint_cfg_t
void application_remove_proxy(application_t *app)
u8 application_use_private_rx_mqs(void)
struct app_listener_ app_listener_t
u32 app_index
App index in app pool.
app_listener_t * listeners
Pool of listeners for the app.
crypto_engine_type_t last_crypto_engine
app_worker_t * app_worker_alloc(application_t *app)
int app_worker_del_segment_notify(app_worker_t *app_wrk, u64 segment_handle)
u8 * format_app_worker_listener(u8 *s, va_list *args)
app_cert_key_pair_t * app_cert_key_pair_get_if_valid(u32 index)
session_t * app_worker_first_listener(app_worker_t *app, u8 fib_proto, u8 transport_proto)
struct app_main_ app_main_t
int app_worker_del_half_open(app_worker_t *app_wrk, session_t *s)
u8 * format_crypto_context(u8 *s, va_list *args)
int app_worker_reset_notify(app_worker_t *app_wrk, session_t *s)
app_rx_mq_elt_t * rx_mqs
Fixed vector of rx mqs that can be a part of pending_rx_mqs linked list maintained by the app sublaye...
application_t * app_worker_get_app(u32 wrk_index)
struct _svm_fifo svm_fifo_t
uword * listeners_table
Lookup tables for listeners.
int app_worker_cleanup_notify(app_worker_t *app_wrk, session_t *s, session_cleanup_ntf_t ntf)
session_t * app_listener_get_session(app_listener_t *al)
int app_worker_init_connected(app_worker_t *app_wrk, session_t *s)
u8 application_has_local_scope(application_t *app)
const u8 * application_name_from_index(u32 app_or_wrk)
Returns app name for app-index.
enum session_ft_action_ session_ft_action_t
u32 session_index
global listening session index
uword * app_by_api_client_index
Hash table of apps by api client index.
u32 app_index
owning app index
int app_worker_stop_listen(app_worker_t *app_wrk, app_listener_t *al)
app_worker_t * application_get_default_worker(application_t *app)
crypto_engine_type_t app_crypto_engine_type_add(void)
fifo_segment_t rx_mqs_segment
Segment where rx mqs were allocated.
application_t * application_lookup_name(const u8 *name)
int app_worker_send_event(app_worker_t *app, session_t *s, u8 evt)
struct _segment_manager_props segment_manager_props_t
application_t * application_get(u32 index)
int app_worker_close_notify(app_worker_t *app_wrk, session_t *s)
app_worker_t * app_worker_get_if_valid(u32 wrk_index)
u8 * format_app_worker(u8 *s, va_list *args)
void application_setup_proxy(application_t *app)
int application_change_listener_owner(session_t *s, app_worker_t *app_wrk)
struct app_rx_mq_elt_ * prev
app_listener_t * app_listener_get_w_handle(session_handle_t handle)
Get app listener for listener session handle.
app_rx_mq_elt_t * pending_rx_mqs
Linked list of mqs with pending messages.
uword * app_by_name
Hash table of builtin apps by name.
app_cert_key_pair_t * cert_key_pair_store
Pool from which we allocate certificates (key, cert)
struct app_rx_mq_handle_ app_rx_mq_handle_t
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
struct app_worker_ app_worker_t
u32 ns_index
Namespace the application belongs to.
int app_worker_init_accepted(session_t *s)
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)
svm_msg_q_t * event_queue
Application listens for events on this svm queue.
app_listener_t * app_listener_get(application_t *app, u32 al_index)
#define foreach_app_init_args
int app_worker_connect_notify(app_worker_t *app_wrk, session_t *s, session_error_t err, u32 opaque)
uword unformat_application_proto(unformat_input_t *input, va_list *args)
app_cert_key_pair_t * app_cert_key_pair_get(u32 index)
clib_spinlock_t detached_seg_managers_lock
Protects detached seg managers.
int app_worker_connect_session(app_worker_t *app, session_endpoint_cfg_t *sep, session_handle_t *rsh)
fifo_segment_t * application_get_rx_mqs_segment(application_t *app)
struct asl_wrk_ appsl_wrk_t
App sublayer per vpp worker state.
void app_worker_free(app_worker_t *app_wrk)
segment_manager_props_t * application_get_segment_manager_properties(u32 app_index)
clib_bitmap_t * workers
workers accepting connections
u32 connects_seg_manager
Segment manager used for outgoing connects issued by the app.
u32 application_session_table(application_t *app, u8 fib_proto)
App sublayer per vpp worker state.
app_worker_map_t * worker_maps
Pool of mappings that keep track of workers associated to this app.
void mq_send_unlisten_reply(app_worker_t *app_wrk, session_handle_t sh, u32 context, int rv)
struct app_init_args_ app_init_args_t
segment_manager_props_t sm_properties
Segment manager properties.
int app_worker_add_segment_notify(app_worker_t *app_wrk, u64 segment_handle)
Send an API message to the external app, to map new segment.
appsl_wrk_t * wrk
App sublayer per-worker state.
int app_worker_lock_and_send_event(app_worker_t *app, session_t *s, u8 evt_type)
Send event to application.
application_t * application_lookup(u32 api_client_index)
app_worker_t * app_worker_get(u32 wrk_index)
app_listener_t * app_listener_lookup(application_t *app, session_endpoint_cfg_t *sep)
u8 app_crypto_engine_n_types(void)
segment_manager_t * app_worker_get_connect_segment_manager(app_worker_t *)
void application_enable_rx_mqs_nodes(u8 is_en)
u32 wrk_map_index
Worker index in app's map pool.
int mq_send_session_connected_cb(u32 app_wrk_index, u32 api_context, session_t *s, session_error_t err)
application_t * application_get_if_valid(u32 index)
int app_worker_session_fifo_tuning(app_worker_t *app_wrk, session_t *s, svm_fifo_t *f, session_ft_action_t act, u32 len)
int app_worker_migrate_notify(app_worker_t *app_wrk, session_t *s, session_handle_t new_sh)
int app_worker_transport_closed_notify(app_worker_t *app_wrk, session_t *s)
struct application_ application_t
application_t * app_pool
Pool from which we allocate all applications.
u32 application_local_session_table(application_t *app)
int app_worker_builtin_rx(app_worker_t *app_wrk, session_t *s)
u8 * format_crypto_engine(u8 *s, va_list *args)
session_cb_vft_t cb_fns
Callbacks: shoulder-taps for the server/client.
u8 * name
Name registered by builtin apps.
u32 * detached_seg_managers
Vector of detached listener segment managers.
u32 app_index
Index of owning app.
struct app_worker_map_ app_worker_map_t
u32 api_client_index
API index for the worker.
int app_worker_start_listen(app_worker_t *app_wrk, app_listener_t *lstnr)
app_listener_t * app_listener_get_w_session(session_t *ls)
int app_worker_accept_notify(app_worker_t *app_wrk, session_t *s)
void app_listener_cleanup(app_listener_t *app_listener)
u8 application_has_global_scope(application_t *app)
int app_worker_own_session(app_worker_t *app_wrk, session_t *s)
u32 al_index
app listener index in app pool
app_cert_key_pair_t * app_cert_key_pair_get_default()
int application_is_builtin(application_t *app)
int mq_send_session_bound_cb(u32 app_wrk_index, u32 api_context, session_handle_t handle, int rv)
void app_worker_del_detached_sm(app_worker_t *app_wrk, u32 sm_index)
u32 accept_rotor
last worker to accept a connection
int application_is_proxy(application_t *app)