FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
session_api.c File Reference
+ Include dependency graph for session_api.c:

Go to the source code of this file.

Macros

#define vl_typedefs   /* define message structures */
 
#define vl_endianfun   /* define message structures */
 
#define vl_print(handle, ...)   vlib_cli_output (handle, __VA_ARGS__)
 
#define vl_printfun
 
#define foreach_session_api_msg
 
#define vl_msg_name_crc_list
 

Functions

static int session_send_fds (vl_api_registration_t *reg, int fds[], int n_fds)
 
static int send_add_segment_callback (u32 api_client_index, u64 segment_handle)
 
static int send_del_segment_callback (u32 api_client_index, u64 segment_handle)
 
static int send_app_cut_through_registration_add (u32 api_client_index, u32 wrk_map_index, u64 mq_addr, u64 peer_mq_addr)
 
static int send_session_accept_callback (stream_session_t *s)
 
static void send_session_disconnect_callback (stream_session_t *s)
 
static void send_session_reset_callback (stream_session_t *s)
 
int send_session_connected_callback (u32 app_wrk_index, u32 api_context, stream_session_t *s, u8 is_fail)
 
static int mq_try_lock_and_alloc_msg (svm_msg_q_t *app_mq, svm_msg_q_msg_t *msg)
 
static int mq_send_session_accepted_cb (stream_session_t *s)
 
static void mq_send_session_disconnected_cb (stream_session_t *s)
 
void mq_send_local_session_disconnected_cb (u32 app_wrk_index, local_session_t *ls)
 
static void mq_send_session_reset_cb (stream_session_t *s)
 
static int mq_send_session_connected_cb (u32 app_wrk_index, u32 api_context, stream_session_t *s, u8 is_fail)
 
static int mq_send_session_bound_cb (u32 app_wrk_index, u32 api_context, session_handle_t handle, int rv)
 
static void vl_api_session_enable_disable_t_handler (vl_api_session_enable_disable_t *mp)
 
static void vl_api_application_attach_t_handler (vl_api_application_attach_t *mp)
 
static void vl_api_application_detach_t_handler (vl_api_application_detach_t *mp)
 
static void vl_api_bind_uri_t_handler (vl_api_bind_uri_t *mp)
 
static void vl_api_unbind_uri_t_handler (vl_api_unbind_uri_t *mp)
 
static void vl_api_connect_uri_t_handler (vl_api_connect_uri_t *mp)
 
static void vl_api_disconnect_session_t_handler (vl_api_disconnect_session_t *mp)
 
static void vl_api_disconnect_session_reply_t_handler (vl_api_disconnect_session_reply_t *mp)
 
static void vl_api_reset_session_reply_t_handler (vl_api_reset_session_reply_t *mp)
 
static void vl_api_accept_session_reply_t_handler (vl_api_accept_session_reply_t *mp)
 
static void vl_api_map_another_segment_reply_t_handler (vl_api_map_another_segment_reply_t *mp)
 
static void vl_api_bind_sock_t_handler (vl_api_bind_sock_t *mp)
 
static void vl_api_unbind_sock_t_handler (vl_api_unbind_sock_t *mp)
 
static void vl_api_connect_sock_t_handler (vl_api_connect_sock_t *mp)
 
static void vl_api_app_worker_add_del_t_handler (vl_api_app_worker_add_del_t *mp)
 
static void vl_api_app_namespace_add_del_t_handler (vl_api_app_namespace_add_del_t *mp)
 
static void vl_api_session_rule_add_del_t_handler (vl_api_session_rule_add_del_t *mp)
 
static void send_session_rule_details4 (mma_rule_16_t *rule, u8 is_local, u8 transport_proto, u32 appns_index, u8 *tag, vl_api_registration_t *reg, u32 context)
 
static void send_session_rule_details6 (mma_rule_40_t *rule, u8 is_local, u8 transport_proto, u32 appns_index, u8 *tag, vl_api_registration_t *reg, u32 context)
 
static void send_session_rules_table_details (session_rules_table_t *srt, u8 fib_proto, u8 tp, u8 is_local, u32 appns_index, vl_api_registration_t *reg, u32 context)
 
static void vl_api_session_rules_dump_t_handler (vl_api_one_map_server_dump_t *mp)
 
static void vl_api_application_tls_cert_add_t_handler (vl_api_application_tls_cert_add_t *mp)
 
static void vl_api_application_tls_key_add_t_handler (vl_api_application_tls_key_add_t *mp)
 
static clib_error_tapplication_reaper_cb (u32 client_index)
 
 VL_MSG_API_REAPER_FUNCTION (application_reaper_cb)
 
static void setup_message_id_table (api_main_t *am)
 
static clib_error_tsession_api_hookup (vlib_main_t *vm)
 
 VLIB_API_INIT_FUNCTION (session_api_hookup)
 

Variables

static session_cb_vft_t session_cb_vft
 
static session_cb_vft_t session_mq_cb_vft
 

Macro Definition Documentation

◆ foreach_session_api_msg

#define foreach_session_api_msg
Value:
_(MAP_ANOTHER_SEGMENT_REPLY, map_another_segment_reply) \
_(APPLICATION_ATTACH, application_attach) \
_(APPLICATION_DETACH, application_detach) \
_(BIND_URI, bind_uri) \
_(UNBIND_URI, unbind_uri) \
_(CONNECT_URI, connect_uri) \
_(DISCONNECT_SESSION, disconnect_session) \
_(DISCONNECT_SESSION_REPLY, disconnect_session_reply) \
_(ACCEPT_SESSION_REPLY, accept_session_reply) \
_(RESET_SESSION_REPLY, reset_session_reply) \
_(BIND_SOCK, bind_sock) \
_(UNBIND_SOCK, unbind_sock) \
_(CONNECT_SOCK, connect_sock) \
_(SESSION_ENABLE_DISABLE, session_enable_disable) \
_(APP_NAMESPACE_ADD_DEL, app_namespace_add_del) \
_(SESSION_RULE_ADD_DEL, session_rule_add_del) \
_(SESSION_RULES_DUMP, session_rules_dump) \
_(APPLICATION_TLS_CERT_ADD, application_tls_cert_add) \
_(APPLICATION_TLS_KEY_ADD, application_tls_key_add) \
_(APP_WORKER_ADD_DEL, app_worker_add_del) \

Definition at line 41 of file session_api.c.

◆ vl_endianfun

#define vl_endianfun   /* define message structures */

Definition at line 29 of file session_api.c.

◆ vl_msg_name_crc_list

#define vl_msg_name_crc_list

Definition at line 1749 of file session_api.c.

◆ vl_print

#define vl_print (   handle,
  ... 
)    vlib_cli_output (handle, __VA_ARGS__)

Definition at line 34 of file session_api.c.

◆ vl_printfun

#define vl_printfun

Definition at line 35 of file session_api.c.

◆ vl_typedefs

#define vl_typedefs   /* define message structures */

Definition at line 25 of file session_api.c.

Function Documentation

◆ application_reaper_cb()

static clib_error_t* application_reaper_cb ( u32  client_index)
static

Definition at line 1734 of file session_api.c.

+ Here is the call graph for this function:

◆ mq_send_local_session_disconnected_cb()

void mq_send_local_session_disconnected_cb ( u32  app_wrk_index,
local_session_t ls 
)

Definition at line 530 of file session_api.c.

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

◆ mq_send_session_accepted_cb()

static int mq_send_session_accepted_cb ( stream_session_t s)
static

Definition at line 418 of file session_api.c.

+ Here is the call graph for this function:

◆ mq_send_session_bound_cb()

static int mq_send_session_bound_cb ( u32  app_wrk_index,
u32  api_context,
session_handle_t  handle,
int  rv 
)
static

Definition at line 652 of file session_api.c.

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

◆ mq_send_session_connected_cb()

static int mq_send_session_connected_cb ( u32  app_wrk_index,
u32  api_context,
stream_session_t s,
u8  is_fail 
)
static

Definition at line 572 of file session_api.c.

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

◆ mq_send_session_disconnected_cb()

static void mq_send_session_disconnected_cb ( stream_session_t s)
static

Definition at line 509 of file session_api.c.

+ Here is the call graph for this function:

◆ mq_send_session_reset_cb()

static void mq_send_session_reset_cb ( stream_session_t s)
static

Definition at line 552 of file session_api.c.

+ Here is the call graph for this function:

◆ mq_try_lock_and_alloc_msg()

static int mq_try_lock_and_alloc_msg ( svm_msg_q_t app_mq,
svm_msg_q_msg_t msg 
)
static

Definition at line 399 of file session_api.c.

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

◆ send_add_segment_callback()

static int send_add_segment_callback ( u32  api_client_index,
u64  segment_handle 
)
static

Definition at line 82 of file session_api.c.

+ Here is the call graph for this function:

◆ send_app_cut_through_registration_add()

static int send_app_cut_through_registration_add ( u32  api_client_index,
u32  wrk_map_index,
u64  mq_addr,
u64  peer_mq_addr 
)
static

Definition at line 153 of file session_api.c.

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

◆ send_del_segment_callback()

static int send_del_segment_callback ( u32  api_client_index,
u64  segment_handle 
)
static

Definition at line 131 of file session_api.c.

+ Here is the call graph for this function:

◆ send_session_accept_callback()

static int send_session_accept_callback ( stream_session_t s)
static

Definition at line 201 of file session_api.c.

+ Here is the call graph for this function:

◆ send_session_connected_callback()

int send_session_connected_callback ( u32  app_wrk_index,
u32  api_context,
stream_session_t s,
u8  is_fail 
)

Definition at line 329 of file session_api.c.

+ Here is the call graph for this function:

◆ send_session_disconnect_callback()

static void send_session_disconnect_callback ( stream_session_t s)
static

Definition at line 286 of file session_api.c.

+ Here is the call graph for this function:

◆ send_session_reset_callback()

static void send_session_reset_callback ( stream_session_t s)
static

Definition at line 308 of file session_api.c.

+ Here is the call graph for this function:

◆ send_session_rule_details4()

static void send_session_rule_details4 ( mma_rule_16_t *  rule,
u8  is_local,
u8  transport_proto,
u32  appns_index,
u8 tag,
vl_api_registration_t reg,
u32  context 
)
static

Definition at line 1517 of file session_api.c.

+ Here is the call graph for this function:

◆ send_session_rule_details6()

static void send_session_rule_details6 ( mma_rule_40_t *  rule,
u8  is_local,
u8  transport_proto,
u32  appns_index,
u8 tag,
vl_api_registration_t reg,
u32  context 
)
static

Definition at line 1554 of file session_api.c.

+ Here is the call graph for this function:

◆ send_session_rules_table_details()

static void send_session_rules_table_details ( session_rules_table_t srt,
u8  fib_proto,
u8  tp,
u8  is_local,
u32  appns_index,
vl_api_registration_t reg,
u32  context 
)
static

Definition at line 1591 of file session_api.c.

+ Here is the caller graph for this function:

◆ session_api_hookup()

static clib_error_t* session_api_hookup ( vlib_main_t vm)
static

Definition at line 1769 of file session_api.c.

+ Here is the call graph for this function:

◆ session_send_fds()

static int session_send_fds ( vl_api_registration_t reg,
int  fds[],
int  n_fds 
)
static

Definition at line 64 of file session_api.c.

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

◆ setup_message_id_table()

static void setup_message_id_table ( api_main_t am)
static

Definition at line 1754 of file session_api.c.

+ Here is the caller graph for this function:

◆ vl_api_accept_session_reply_t_handler()

static void vl_api_accept_session_reply_t_handler ( vl_api_accept_session_reply_t mp)
static

Definition at line 1108 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_app_namespace_add_del_t_handler()

static void vl_api_app_namespace_add_del_t_handler ( vl_api_app_namespace_add_del_t mp)
static

Definition at line 1420 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_app_worker_add_del_t_handler()

static void vl_api_app_worker_add_del_t_handler ( vl_api_app_worker_add_del_t mp)
static

Definition at line 1337 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_application_attach_t_handler()

static void vl_api_application_attach_t_handler ( vl_api_application_attach_t mp)
static

Definition at line 738 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_application_detach_t_handler()

static void vl_api_application_detach_t_handler ( vl_api_application_detach_t mp)
static

Definition at line 842 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_application_tls_cert_add_t_handler()

static void vl_api_application_tls_cert_add_t_handler ( vl_api_application_tls_cert_add_t mp)
static

Definition at line 1654 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_application_tls_key_add_t_handler()

static void vl_api_application_tls_key_add_t_handler ( vl_api_application_tls_key_add_t mp)
static

Definition at line 1694 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_bind_sock_t_handler()

static void vl_api_bind_sock_t_handler ( vl_api_bind_sock_t mp)
static

Definition at line 1161 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_bind_uri_t_handler()

static void vl_api_bind_uri_t_handler ( vl_api_bind_uri_t mp)
static

Definition at line 868 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_connect_sock_t_handler()

static void vl_api_connect_sock_t_handler ( vl_api_connect_sock_t mp)
static

Definition at line 1271 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_connect_uri_t_handler()

static void vl_api_connect_uri_t_handler ( vl_api_connect_uri_t mp)
static

Definition at line 964 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_disconnect_session_reply_t_handler()

static void vl_api_disconnect_session_reply_t_handler ( vl_api_disconnect_session_reply_t mp)
static

Definition at line 1041 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_disconnect_session_t_handler()

static void vl_api_disconnect_session_t_handler ( vl_api_disconnect_session_t mp)
static

Definition at line 1011 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_map_another_segment_reply_t_handler()

static void vl_api_map_another_segment_reply_t_handler ( vl_api_map_another_segment_reply_t *  mp)
static

Definition at line 1154 of file session_api.c.

◆ vl_api_reset_session_reply_t_handler()

static void vl_api_reset_session_reply_t_handler ( vl_api_reset_session_reply_t mp)
static

Definition at line 1065 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_session_enable_disable_t_handler()

static void vl_api_session_enable_disable_t_handler ( vl_api_session_enable_disable_t mp)
static

Definition at line 727 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_session_rule_add_del_t_handler()

static void vl_api_session_rule_add_del_t_handler ( vl_api_session_rule_add_del_t mp)
static

Definition at line 1476 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_session_rules_dump_t_handler()

static void vl_api_session_rules_dump_t_handler ( vl_api_one_map_server_dump_t mp)
static

Definition at line 1630 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_unbind_sock_t_handler()

static void vl_api_unbind_sock_t_handler ( vl_api_unbind_sock_t mp)
static

Definition at line 1239 of file session_api.c.

+ Here is the call graph for this function:

◆ vl_api_unbind_uri_t_handler()

static void vl_api_unbind_uri_t_handler ( vl_api_unbind_uri_t mp)
static

Definition at line 934 of file session_api.c.

+ Here is the call graph for this function:

◆ VL_MSG_API_REAPER_FUNCTION()

VL_MSG_API_REAPER_FUNCTION ( application_reaper_cb  )
+ Here is the caller graph for this function:

◆ VLIB_API_INIT_FUNCTION()

VLIB_API_INIT_FUNCTION ( session_api_hookup  )
+ Here is the caller graph for this function:

Variable Documentation

◆ session_cb_vft

session_cb_vft_t session_cb_vft
static
Initial value:
= {
.session_accept_callback = send_session_accept_callback,
.session_disconnect_callback = send_session_disconnect_callback,
.session_connected_callback = send_session_connected_callback,
.session_reset_callback = send_session_reset_callback,
.add_segment_callback = send_add_segment_callback,
.del_segment_callback = send_del_segment_callback,
}
static int send_del_segment_callback(u32 api_client_index, u64 segment_handle)
Definition: session_api.c:131
int send_session_connected_callback(u32 app_wrk_index, u32 api_context, stream_session_t *s, u8 is_fail)
Definition: session_api.c:329
static void send_session_reset_callback(stream_session_t *s)
Definition: session_api.c:308
static int send_session_accept_callback(stream_session_t *s)
Definition: session_api.c:201
static void send_session_disconnect_callback(stream_session_t *s)
Definition: session_api.c:286
static int send_add_segment_callback(u32 api_client_index, u64 segment_handle)
Definition: session_api.c:82

Definition at line 389 of file session_api.c.

◆ session_mq_cb_vft

session_cb_vft_t session_mq_cb_vft
static
Initial value:
= {
.session_accept_callback = mq_send_session_accepted_cb,
.session_disconnect_callback = mq_send_session_disconnected_cb,
.session_connected_callback = mq_send_session_connected_cb,
.session_reset_callback = mq_send_session_reset_cb,
.add_segment_callback = send_add_segment_callback,
.del_segment_callback = send_del_segment_callback,
}
static void mq_send_session_reset_cb(stream_session_t *s)
Definition: session_api.c:552
static int send_del_segment_callback(u32 api_client_index, u64 segment_handle)
Definition: session_api.c:131
static int mq_send_session_accepted_cb(stream_session_t *s)
Definition: session_api.c:418
static void mq_send_session_disconnected_cb(stream_session_t *s)
Definition: session_api.c:509
static int send_add_segment_callback(u32 api_client_index, u64 segment_handle)
Definition: session_api.c:82
static int mq_send_session_connected_cb(u32 app_wrk_index, u32 api_context, stream_session_t *s, u8 is_fail)
Definition: session_api.c:572

Definition at line 717 of file session_api.c.