FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
srtp.c File Reference
+ Include dependency graph for srtp.c:

Go to the source code of this file.

Functions

static void srtp_disconnect (u32 ctx_handle, u32 thread_index)
 
static void srtp_disconnect_transport (srtp_tc_t *ctx)
 
static u32 srtp_ctx_alloc_w_thread (u32 thread_index)
 
static srtp_tc_tsrtp_ctx_get_w_thread (u32 ctx_index, u32 thread_index)
 
static void srtp_init_policy (srtp_tc_t *ctx, transport_endpt_cfg_srtp_t *cfg)
 
static void srtp_ctx_free_policy (srtp_tc_t *ctx)
 
void srtp_ctx_free (srtp_tc_t *ctx)
 
static u32 srtp_ctx_attach (u32 thread_index, void *ctx_ptr)
 
static void * srtp_ctx_detach (srtp_tc_t *ctx)
 
u32 srtp_listener_ctx_alloc (void)
 
void srtp_listener_ctx_free (srtp_tc_t *ctx)
 
srtp_tc_tsrtp_listener_ctx_get (u32 ctx_index)
 
u32 srtp_listener_ctx_index (srtp_tc_t *ctx)
 
static int srtp_ctx_init_client (srtp_tc_t *ctx)
 
static int srtp_ctx_init_server (srtp_tc_t *ctx)
 
static int srtp_ctx_deinit (srtp_tc_t *ctx)
 
static int srtp_ctx_write (srtp_tc_t *ctx, session_t *app_session, transport_send_params_t *sp)
 
int srtp_add_vpp_q_builtin_rx_evt (session_t *s)
 
void srtp_notify_app_enqueue (srtp_tc_t *ctx, session_t *app_session)
 
static int srtp_ctx_read (srtp_tc_t *ctx, session_t *us)
 
int srtp_add_segment_callback (u32 client_index, u64 segment_handle)
 
int srtp_del_segment_callback (u32 client_index, u64 segment_handle)
 
void srtp_session_disconnect_callback (session_t *us)
 
void srtp_session_reset_callback (session_t *us)
 
static int srtp_session_connected_callback (u32 srtp_app_index, u32 ctx_handle, session_t *us, session_error_t err)
 
int srtp_session_accept_callback (session_t *us)
 
int srtp_app_rx_callback (session_t *us)
 
int srtp_app_tx_callback (session_t *us)
 
static void srtp_app_session_cleanup (session_t *s, session_cleanup_ntf_t ntf)
 
static void srtp_migrate_ctx_reply (void *arg)
 
static void srtp_migrate_ctx (void *arg)
 
static void srtp_session_migrate_callback (session_t *us, session_handle_t new_sh)
 
static clib_error_tsrtp_enable (vlib_main_t *vm, u8 is_en)
 
int srtp_connect (transport_endpoint_cfg_t *tep)
 
static u32 srtp_start_listen (u32 app_listener_index, transport_endpoint_t *tep)
 
u32 srtp_stop_listen (u32 lctx_index)
 
transport_connection_tsrtp_connection_get (u32 ctx_index, u32 thread_index)
 
transport_connection_tsrtp_listener_get (u32 listener_index)
 
int srtp_custom_tx_callback (void *session, transport_send_params_t *sp)
 
u8format_srtp_ctx (u8 *s, va_list *args)
 
static u8format_srtp_listener_ctx (u8 *s, va_list *args)
 
static u8format_srtp_ctx_state (u8 *s, va_list *args)
 
u8format_srtp_connection (u8 *s, va_list *args)
 
u8format_srtp_listener (u8 *s, va_list *args)
 
u8format_srtp_half_open (u8 *s, va_list *args)
 
static void srtp_transport_endpoint_get (u32 ctx_handle, u32 thread_index, transport_endpoint_t *tep, u8 is_lcl)
 
static void srtp_transport_listener_endpoint_get (u32 ctx_handle, transport_endpoint_t *tep, u8 is_lcl)
 
static clib_error_tsrtp_transport_init (vlib_main_t *vm)
 
 VLIB_PLUGIN_REGISTER ()
 

Variables

static srtp_main_t srtp_main
 
static session_cb_vft_t srtp_app_cb_vft
 
static const transport_proto_vft_t srtp_proto
 

Function Documentation

◆ format_srtp_connection()

u8* format_srtp_connection ( u8 s,
va_list *  args 
)

Definition at line 882 of file srtp.c.

+ Here is the call graph for this function:

◆ format_srtp_ctx()

u8* format_srtp_ctx ( u8 s,
va_list *  args 
)

Definition at line 825 of file srtp.c.

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

◆ format_srtp_ctx_state()

static u8* format_srtp_ctx_state ( u8 s,
va_list *  args 
)
static

Definition at line 857 of file srtp.c.

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

◆ format_srtp_half_open()

u8* format_srtp_half_open ( u8 s,
va_list *  args 
)

Definition at line 919 of file srtp.c.

◆ format_srtp_listener()

u8* format_srtp_listener ( u8 s,
va_list *  args 
)

Definition at line 905 of file srtp.c.

◆ format_srtp_listener_ctx()

static u8* format_srtp_listener_ctx ( u8 s,
va_list *  args 
)
static

Definition at line 839 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_add_segment_callback()

int srtp_add_segment_callback ( u32  client_index,
u64  segment_handle 
)

Definition at line 372 of file srtp.c.

◆ srtp_add_vpp_q_builtin_rx_evt()

int srtp_add_vpp_q_builtin_rx_evt ( session_t s)

Definition at line 303 of file srtp.c.

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

◆ srtp_app_rx_callback()

int srtp_app_rx_callback ( session_t us)

Definition at line 462 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_app_session_cleanup()

static void srtp_app_session_cleanup ( session_t s,
session_cleanup_ntf_t  ntf 
)
static

Definition at line 483 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_app_tx_callback()

int srtp_app_tx_callback ( session_t us)

Definition at line 472 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_connect()

int srtp_connect ( transport_endpoint_cfg_t tep)

Definition at line 628 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_connection_get()

transport_connection_t* srtp_connection_get ( u32  ctx_index,
u32  thread_index 
)

Definition at line 790 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_ctx_alloc_w_thread()

static u32 srtp_ctx_alloc_w_thread ( u32  thread_index)
inlinestatic

Definition at line 26 of file srtp.c.

+ Here is the caller graph for this function:

◆ srtp_ctx_attach()

static u32 srtp_ctx_attach ( u32  thread_index,
void *  ctx_ptr 
)
inlinestatic

Definition at line 83 of file srtp.c.

+ Here is the caller graph for this function:

◆ srtp_ctx_deinit()

static int srtp_ctx_deinit ( srtp_tc_t ctx)
static

Definition at line 217 of file srtp.c.

+ Here is the caller graph for this function:

◆ srtp_ctx_detach()

static void* srtp_ctx_detach ( srtp_tc_t ctx)
inlinestatic

Definition at line 96 of file srtp.c.

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

◆ srtp_ctx_free()

void srtp_ctx_free ( srtp_tc_t ctx)

Definition at line 75 of file srtp.c.

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

◆ srtp_ctx_free_policy()

static void srtp_ctx_free_policy ( srtp_tc_t ctx)
static

Definition at line 68 of file srtp.c.

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

◆ srtp_ctx_get_w_thread()

static srtp_tc_t* srtp_ctx_get_w_thread ( u32  ctx_index,
u32  thread_index 
)
inlinestatic

Definition at line 37 of file srtp.c.

+ Here is the caller graph for this function:

◆ srtp_ctx_init_client()

static int srtp_ctx_init_client ( srtp_tc_t ctx)
static

Definition at line 138 of file srtp.c.

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

◆ srtp_ctx_init_server()

static int srtp_ctx_init_server ( srtp_tc_t ctx)
static

Definition at line 184 of file srtp.c.

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

◆ srtp_ctx_read()

static int srtp_ctx_read ( srtp_tc_t ctx,
session_t us 
)
inlinestatic

Definition at line 320 of file srtp.c.

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

◆ srtp_ctx_write()

static int srtp_ctx_write ( srtp_tc_t ctx,
session_t app_session,
transport_send_params_t sp 
)
inlinestatic

Definition at line 225 of file srtp.c.

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

◆ srtp_custom_tx_callback()

int srtp_custom_tx_callback ( void *  session,
transport_send_params_t sp 
)

Definition at line 806 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_del_segment_callback()

int srtp_del_segment_callback ( u32  client_index,
u64  segment_handle 
)

Definition at line 379 of file srtp.c.

◆ srtp_disconnect()

static void srtp_disconnect ( u32  ctx_handle,
u32  thread_index 
)
static

Definition at line 681 of file srtp.c.

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

◆ srtp_disconnect_transport()

static void srtp_disconnect_transport ( srtp_tc_t ctx)
static

Definition at line 669 of file srtp.c.

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

◆ srtp_enable()

static clib_error_t* srtp_enable ( vlib_main_t vm,
u8  is_en 
)
static

Definition at line 580 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_init_policy()

static void srtp_init_policy ( srtp_tc_t ctx,
transport_endpt_cfg_srtp_t cfg 
)
static

Definition at line 43 of file srtp.c.

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

◆ srtp_listener_ctx_alloc()

u32 srtp_listener_ctx_alloc ( void  )

Definition at line 107 of file srtp.c.

+ Here is the caller graph for this function:

◆ srtp_listener_ctx_free()

void srtp_listener_ctx_free ( srtp_tc_t ctx)

Definition at line 117 of file srtp.c.

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

◆ srtp_listener_ctx_get()

srtp_tc_t* srtp_listener_ctx_get ( u32  ctx_index)

Definition at line 126 of file srtp.c.

+ Here is the caller graph for this function:

◆ srtp_listener_ctx_index()

u32 srtp_listener_ctx_index ( srtp_tc_t ctx)

Definition at line 132 of file srtp.c.

◆ srtp_listener_get()

transport_connection_t* srtp_listener_get ( u32  listener_index)

Definition at line 798 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_migrate_ctx()

static void srtp_migrate_ctx ( void *  arg)
static

Definition at line 513 of file srtp.c.

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

◆ srtp_migrate_ctx_reply()

static void srtp_migrate_ctx_reply ( void *  arg)
static

Definition at line 503 of file srtp.c.

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

◆ srtp_notify_app_enqueue()

void srtp_notify_app_enqueue ( srtp_tc_t ctx,
session_t app_session 
)

Definition at line 311 of file srtp.c.

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

◆ srtp_session_accept_callback()

int srtp_session_accept_callback ( session_t us)

Definition at line 424 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_session_connected_callback()

static int srtp_session_connected_callback ( u32  srtp_app_index,
u32  ctx_handle,
session_t us,
session_error_t  err 
)
static

Definition at line 397 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_session_disconnect_callback()

void srtp_session_disconnect_callback ( session_t us)

Definition at line 385 of file srtp.c.

◆ srtp_session_migrate_callback()

static void srtp_session_migrate_callback ( session_t us,
session_handle_t  new_sh 
)
static

Definition at line 547 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_session_reset_callback()

void srtp_session_reset_callback ( session_t us)

Definition at line 391 of file srtp.c.

◆ srtp_start_listen()

static u32 srtp_start_listen ( u32  app_listener_index,
transport_endpoint_t tep 
)
static

Definition at line 705 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_stop_listen()

u32 srtp_stop_listen ( u32  lctx_index)

Definition at line 756 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_transport_endpoint_get()

static void srtp_transport_endpoint_get ( u32  ctx_handle,
u32  thread_index,
transport_endpoint_t tep,
u8  is_lcl 
)
static

Definition at line 925 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_transport_init()

static clib_error_t* srtp_transport_init ( vlib_main_t vm)
static

Definition at line 971 of file srtp.c.

+ Here is the call graph for this function:

◆ srtp_transport_listener_endpoint_get()

static void srtp_transport_listener_endpoint_get ( u32  ctx_handle,
transport_endpoint_t tep,
u8  is_lcl 
)
static

Definition at line 936 of file srtp.c.

+ Here is the call graph for this function:

◆ VLIB_PLUGIN_REGISTER()

VLIB_PLUGIN_REGISTER ( )

Variable Documentation

◆ srtp_app_cb_vft

session_cb_vft_t srtp_app_cb_vft
static
Initial value:
= {
.session_accept_callback = srtp_session_accept_callback,
.session_disconnect_callback = srtp_session_disconnect_callback,
.session_connected_callback = srtp_session_connected_callback,
.session_reset_callback = srtp_session_reset_callback,
.add_segment_callback = srtp_add_segment_callback,
.del_segment_callback = srtp_del_segment_callback,
.builtin_app_rx_callback = srtp_app_rx_callback,
.builtin_app_tx_callback = srtp_app_tx_callback,
.session_migrate_callback = srtp_session_migrate_callback,
.session_cleanup_callback = srtp_app_session_cleanup,
}

Definition at line 566 of file srtp.c.

◆ srtp_main

srtp_main_t srtp_main
static

Definition at line 20 of file srtp.c.

◆ srtp_proto

const transport_proto_vft_t srtp_proto
static
Initial value:
= {
.enable = srtp_enable,
.connect = srtp_connect,
.close = srtp_disconnect,
.start_listen = srtp_start_listen,
.stop_listen = srtp_stop_listen,
.get_connection = srtp_connection_get,
.get_listener = srtp_listener_get,
.format_connection = format_srtp_connection,
.format_half_open = format_srtp_half_open,
.format_listener = format_srtp_listener,
.get_transport_endpoint = srtp_transport_endpoint_get,
.get_transport_listener_endpoint = srtp_transport_listener_endpoint_get,
.transport_options = {
.name = "srtp",
.short_name = "R",
.service_type = TRANSPORT_SERVICE_APP,
},
}

Definition at line 948 of file srtp.c.

format_srtp_half_open
u8 * format_srtp_half_open(u8 *s, va_list *args)
Definition: srtp.c:919
srtp_add_segment_callback
int srtp_add_segment_callback(u32 client_index, u64 segment_handle)
Definition: srtp.c:372
srtp_enable
static clib_error_t * srtp_enable(vlib_main_t *vm, u8 is_en)
Definition: srtp.c:580
srtp_app_tx_callback
int srtp_app_tx_callback(session_t *us)
Definition: srtp.c:472
srtp_transport_endpoint_get
static void srtp_transport_endpoint_get(u32 ctx_handle, u32 thread_index, transport_endpoint_t *tep, u8 is_lcl)
Definition: srtp.c:925
srtp_app_session_cleanup
static void srtp_app_session_cleanup(session_t *s, session_cleanup_ntf_t ntf)
Definition: srtp.c:483
srtp_app_rx_callback
int srtp_app_rx_callback(session_t *us)
Definition: srtp.c:462
srtp_session_accept_callback
int srtp_session_accept_callback(session_t *us)
Definition: srtp.c:424
srtp_session_migrate_callback
static void srtp_session_migrate_callback(session_t *us, session_handle_t new_sh)
Definition: srtp.c:547
srtp_start_listen
static u32 srtp_start_listen(u32 app_listener_index, transport_endpoint_t *tep)
Definition: srtp.c:705
srtp_session_reset_callback
void srtp_session_reset_callback(session_t *us)
Definition: srtp.c:391
srtp_custom_tx_callback
int srtp_custom_tx_callback(void *session, transport_send_params_t *sp)
Definition: srtp.c:806
TRANSPORT_SERVICE_APP
@ TRANSPORT_SERVICE_APP
app transport service
Definition: transport_types.h:41
srtp_session_connected_callback
static int srtp_session_connected_callback(u32 srtp_app_index, u32 ctx_handle, session_t *us, session_error_t err)
Definition: srtp.c:397
srtp_session_disconnect_callback
void srtp_session_disconnect_callback(session_t *us)
Definition: srtp.c:385
TRANSPORT_TX_INTERNAL
@ TRANSPORT_TX_INTERNAL
apps acting as transports
Definition: transport_types.h:32
srtp_del_segment_callback
int srtp_del_segment_callback(u32 client_index, u64 segment_handle)
Definition: srtp.c:379
srtp_stop_listen
u32 srtp_stop_listen(u32 lctx_index)
Definition: srtp.c:756
format_srtp_listener
u8 * format_srtp_listener(u8 *s, va_list *args)
Definition: srtp.c:905
srtp_transport_listener_endpoint_get
static void srtp_transport_listener_endpoint_get(u32 ctx_handle, transport_endpoint_t *tep, u8 is_lcl)
Definition: srtp.c:936
srtp_listener_get
transport_connection_t * srtp_listener_get(u32 listener_index)
Definition: srtp.c:798
srtp_connection_get
transport_connection_t * srtp_connection_get(u32 ctx_index, u32 thread_index)
Definition: srtp.c:790
srtp_connect
int srtp_connect(transport_endpoint_cfg_t *tep)
Definition: srtp.c:628
format_srtp_connection
u8 * format_srtp_connection(u8 *s, va_list *args)
Definition: srtp.c:882
srtp_disconnect
static void srtp_disconnect(u32 ctx_handle, u32 thread_index)
Definition: srtp.c:681