FD.io VPP  v17.04-9-g99c0734
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 send_add_segment_callback (u32 api_client_index, const u8 *segment_name, u32 segment_size)
 
static int send_session_accept_uri_callback (stream_session_t *s)
 
static void send_session_disconnect_uri_callback (stream_session_t *s)
 
static void send_session_reset_uri_callback (stream_session_t *s)
 
static int send_session_connected_uri_callback (u32 api_client_index, stream_session_t *s, u8 is_fail)
 
static int redirect_connect_uri_callback (u32 server_api_client_index, void *mp_arg)
 Redirect a connect_uri message to the indicated server. More...
 
static u64 make_session_handle (stream_session_t *s)
 
static int send_session_accept_callback (stream_session_t *s)
 
static int send_session_connected_callback (u32 api_client_index, stream_session_t *s, u8 is_fail)
 
static void send_session_disconnect_callback (stream_session_t *s)
 
static void send_session_reset_callback (stream_session_t *s)
 
static int redirect_connect_callback (u32 server_api_client_index, void *mp_arg)
 Redirect a connect_uri message to the indicated server. More...
 
static int api_session_not_valid (u32 session_index, u32 thread_index)
 
static void vl_api_session_enable_disable_t_handler (vl_api_session_enable_disable_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_disconnect_sock_t_handler (vl_api_disconnect_sock_t *mp)
 
static void vl_api_disconnect_sock_reply_t_handler (vl_api_disconnect_sock_reply_t *mp)
 
static void vl_api_reset_sock_reply_t_handler (vl_api_reset_sock_reply_t *mp)
 
static void vl_api_accept_sock_reply_t_handler (vl_api_accept_sock_reply_t *mp)
 
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 uri_session_cb_vft
 
static session_cb_vft_t session_cb_vft
 

Macro Definition Documentation

#define foreach_session_api_msg
Value:
_(MAP_ANOTHER_SEGMENT_REPLY, map_another_segment_reply) \
_(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) \
_(DISCONNECT_SOCK, disconnect_sock) \
_(DISCONNECT_SOCK_REPLY, disconnect_sock_reply) \
_(ACCEPT_SOCK_REPLY, accept_sock_reply) \
_(RESET_SOCK_REPLY, reset_sock_reply) \
_(SESSION_ENABLE_DISABLE, session_enable_disable) \

Definition at line 39 of file session_api.c.

#define vl_endianfun   /* define message structures */

Definition at line 27 of file session_api.c.

#define vl_msg_name_crc_list

Definition at line 853 of file session_api.c.

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

Definition at line 32 of file session_api.c.

#define vl_printfun

Definition at line 33 of file session_api.c.

#define vl_typedefs   /* define message structures */

Definition at line 23 of file session_api.c.

Function Documentation

static int api_session_not_valid ( u32  session_index,
u32  thread_index 
)
static

Definition at line 473 of file session_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u64 make_session_handle ( stream_session_t s)
static

Definition at line 274 of file session_api.c.

+ Here is the caller graph for this function:

static int redirect_connect_callback ( u32  server_api_client_index,
void *  mp_arg 
)
static

Redirect a connect_uri message to the indicated server.

Only sent if the server has bound the related port with URI_OPTIONS_FLAGS_USE_FIFO

Definition at line 397 of file session_api.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int redirect_connect_uri_callback ( u32  server_api_client_index,
void *  mp_arg 
)
static

Redirect a connect_uri message to the indicated server.

Only sent if the server has bound the related port with URI_OPTIONS_FLAGS_USE_FIFO

Definition at line 216 of file session_api.c.

+ Here is the call graph for this function:

static int send_add_segment_callback ( u32  api_client_index,
const u8 segment_name,
u32  segment_size 
)
static

Definition at line 59 of file session_api.c.

+ Here is the call graph for this function:

static int send_session_accept_callback ( stream_session_t s)
static

Definition at line 280 of file session_api.c.

+ Here is the call graph for this function:

static int send_session_accept_uri_callback ( stream_session_t s)
static

Definition at line 83 of file session_api.c.

+ Here is the call graph for this function:

static int send_session_connected_callback ( u32  api_client_index,
stream_session_t s,
u8  is_fail 
)
static

Definition at line 308 of file session_api.c.

+ Here is the call graph for this function:

static int send_session_connected_uri_callback ( u32  api_client_index,
stream_session_t s,
u8  is_fail 
)
static

Definition at line 155 of file session_api.c.

+ Here is the call graph for this function:

static void send_session_disconnect_callback ( stream_session_t s)
static

Definition at line 352 of file session_api.c.

+ Here is the call graph for this function:

static void send_session_disconnect_uri_callback ( stream_session_t s)
static

Definition at line 113 of file session_api.c.

+ Here is the call graph for this function:

static void send_session_reset_callback ( stream_session_t s)
static

Definition at line 372 of file session_api.c.

+ Here is the call graph for this function:

static void send_session_reset_uri_callback ( stream_session_t s)
static

Definition at line 134 of file session_api.c.

+ Here is the call graph for this function:

static clib_error_t* session_api_hookup ( vlib_main_t vm)
static

Definition at line 873 of file session_api.c.

+ Here is the call graph for this function:

static void setup_message_id_table ( api_main_t am)
static

Definition at line 858 of file session_api.c.

+ Here is the caller graph for this function:

static void vl_api_accept_session_reply_t_handler ( vl_api_accept_session_reply_t mp)
static

Definition at line 647 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_accept_sock_reply_t_handler ( vl_api_accept_sock_reply_t mp)
static

Definition at line 831 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_bind_sock_t_handler ( vl_api_bind_sock_t mp)
static

Definition at line 676 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_bind_uri_t_handler ( vl_api_bind_uri_t mp)
static

Definition at line 501 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_connect_sock_t_handler ( vl_api_connect_sock_t mp)
static

Definition at line 741 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_connect_uri_t_handler ( vl_api_connect_uri_t mp)
static

Definition at line 559 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_disconnect_session_reply_t_handler ( vl_api_disconnect_session_reply_t mp)
static

Definition at line 601 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_disconnect_session_t_handler ( vl_api_disconnect_session_t mp)
static

Definition at line 587 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_disconnect_sock_reply_t_handler ( vl_api_disconnect_sock_reply_t mp)
static

Definition at line 787 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_disconnect_sock_t_handler ( vl_api_disconnect_sock_t mp)
static

Definition at line 773 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_map_another_segment_reply_t_handler ( vl_api_map_another_segment_reply_t mp)
static

Definition at line 669 of file session_api.c.

static void vl_api_reset_session_reply_t_handler ( vl_api_reset_session_reply_t mp)
static

Definition at line 622 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_reset_sock_reply_t_handler ( vl_api_reset_sock_reply_t mp)
static

Definition at line 805 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_session_enable_disable_t_handler ( vl_api_session_enable_disable_t mp)
static

Definition at line 490 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_unbind_sock_t_handler ( vl_api_unbind_sock_t mp)
static

Definition at line 726 of file session_api.c.

+ Here is the call graph for this function:

static void vl_api_unbind_uri_t_handler ( vl_api_unbind_uri_t mp)
static

Definition at line 548 of file session_api.c.

+ Here is the call graph for this function:

VLIB_API_INIT_FUNCTION ( session_api_hookup  )

+ Here is the caller graph for this function:

Variable Documentation

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,
.redirect_connect_callback = redirect_connect_callback
}
static int send_session_connected_callback(u32 api_client_index, stream_session_t *s, u8 is_fail)
Definition: session_api.c:308
static void send_session_reset_callback(stream_session_t *s)
Definition: session_api.c:372
static int send_session_accept_callback(stream_session_t *s)
Definition: session_api.c:280
static int redirect_connect_callback(u32 server_api_client_index, void *mp_arg)
Redirect a connect_uri message to the indicated server.
Definition: session_api.c:397
static int send_add_segment_callback(u32 api_client_index, const u8 *segment_name, u32 segment_size)
Definition: session_api.c:59
static void send_session_disconnect_callback(stream_session_t *s)
Definition: session_api.c:352

Definition at line 463 of file session_api.c.

session_cb_vft_t uri_session_cb_vft
static
Initial value:
= {
.session_accept_callback = send_session_accept_uri_callback,
.session_disconnect_callback = send_session_disconnect_uri_callback,
.session_connected_callback = send_session_connected_uri_callback,
.session_reset_callback = send_session_reset_uri_callback,
.add_segment_callback = send_add_segment_callback,
.redirect_connect_callback = redirect_connect_uri_callback
}
static int send_session_connected_uri_callback(u32 api_client_index, stream_session_t *s, u8 is_fail)
Definition: session_api.c:155
static void send_session_disconnect_uri_callback(stream_session_t *s)
Definition: session_api.c:113
static int redirect_connect_uri_callback(u32 server_api_client_index, void *mp_arg)
Redirect a connect_uri message to the indicated server.
Definition: session_api.c:216
static void send_session_reset_uri_callback(stream_session_t *s)
Definition: session_api.c:134
static int send_add_segment_callback(u32 api_client_index, const u8 *segment_name, u32 segment_size)
Definition: session_api.c:59
static int send_session_accept_uri_callback(stream_session_t *s)
Definition: session_api.c:83

Definition at line 454 of file session_api.c.