FD.io VPP  v20.05.1-6-gf53edbc3b
Vector Packet Processing
api_shared.c File Reference
+ Include dependency graph for api_shared.c:

Go to the source code of this file.

Macros

#define foreach_msg_api_vector
 

Functions

void vl_msg_api_set_global_main (void *am_arg)
 
void vl_msg_api_increment_missing_client_counter (void)
 
int vl_msg_api_rx_trace_enabled (api_main_t *am)
 
int vl_msg_api_tx_trace_enabled (api_main_t *am)
 
void vl_msg_api_trace (api_main_t *am, vl_api_trace_t *tp, void *msg)
 
int vl_msg_api_trace_onoff (api_main_t *am, vl_api_trace_which_t which, int onoff)
 
int vl_msg_api_trace_free (api_main_t *am, vl_api_trace_which_t which)
 
u8vl_api_serialize_message_table (api_main_t *am, u8 *vector)
 
int vl_msg_api_trace_save (api_main_t *am, vl_api_trace_which_t which, FILE *fp)
 
int vl_msg_api_trace_configure (api_main_t *am, vl_api_trace_which_t which, u32 nitems)
 
void vl_msg_api_barrier_sync (void)
 
void vl_msg_api_barrier_release (void)
 
static void msg_handler_internal (api_main_t *am, void *the_msg, int trace_it, int do_it, int free_it)
 
void vl_msg_api_handler_with_vm_node (api_main_t *am, svm_region_t *vlib_rp, void *the_msg, vlib_main_t *vm, vlib_node_runtime_t *node, u8 is_private)
 
void vl_msg_api_handler (void *the_msg)
 
void vl_msg_api_handler_no_free (void *the_msg)
 
void vl_msg_api_handler_no_trace_no_free (void *the_msg)
 
void vl_msg_api_trace_only (void *the_msg)
 
void vl_msg_api_cleanup_handler (void *the_msg)
 
void vl_msg_api_replay_handler (void *the_msg)
 
u32 vl_msg_api_get_msg_length (void *msg_arg)
 
void vl_msg_api_socket_handler (void *the_msg)
 
void vl_msg_api_config (vl_msg_api_msg_config_t *c)
 
void vl_msg_api_set_handlers (int id, char *name, void *handler, void *cleanup, void *endian, void *print, int size, int traced)
 
void vl_msg_api_clean_handlers (int msg_id)
 
void vl_msg_api_set_cleanup_handler (int msg_id, void *fp)
 
void vl_msg_api_queue_handler (svm_queue_t *q)
 
u32 vl_msg_api_max_length (void *mp)
 
vl_api_trace_tvl_msg_api_trace_get (api_main_t *am, vl_api_trace_which_t which)
 
void vl_noop_handler (void *mp)
 
void vl_msg_api_post_mortem_dump_enable_disable (int enable)
 
void vl_msg_api_post_mortem_dump (void)
 
void vl_msg_api_register_pd_handler (void *fp, u16 msg_id_host_byte_order)
 
int vl_msg_api_pd_handler (void *mp, int rv)
 
void vl_msg_api_set_first_available_msg_id (u16 first_avail)
 
u16 vl_msg_api_get_msg_ids (const char *name, int n)
 
void vl_msg_api_add_msg_name_crc (api_main_t *am, const char *string, u32 id)
 
void vl_msg_api_add_version (api_main_t *am, const char *string, u32 major, u32 minor, u32 patch)
 
u32 vl_msg_api_get_msg_index (u8 *name_and_crc)
 
void * vl_msg_push_heap_w_region (svm_region_t *vlib_rp)
 
void * vl_msg_push_heap (void)
 
void vl_msg_pop_heap_w_region (svm_region_t *vlib_rp, void *oldheap)
 
void vl_msg_pop_heap (void *oldheap)
 
int vl_api_c_string_to_api_string (const char *buf, vl_api_string_t *str)
 
int vl_api_vec_to_api_string (const u8 *vec, vl_api_string_t *str)
 
u32 vl_api_string_len (vl_api_string_t *astr)
 
u8vl_api_format_string (u8 *s, va_list *args)
 
u8vl_api_from_api_to_new_vec (void *mp, vl_api_string_t *astr)
 
char * vl_api_from_api_to_new_c_string (vl_api_string_t *astr)
 
void vl_api_set_elog_main (elog_main_t *m)
 
int vl_api_set_elog_trace_api_messages (int enable)
 
int vl_api_get_elog_trace_api_messages (void)
 

Variables

api_main_t api_global_main
 
__thread api_main_tmy_api_main = &api_global_main
 
void(* vl_msg_api_fuzz_hook )(u16, void *)
 
static u8 post_mortem_dump_enabled
 

Macro Definition Documentation

◆ foreach_msg_api_vector

#define foreach_msg_api_vector
Value:
_(msg_names) \
_(msg_handlers) \
_(msg_cleanup_handlers) \
_(msg_endian_handlers) \
_(msg_print_handlers) \
_(api_trace_cfg) \
_(message_bounce) \
_(is_mp_safe)

Definition at line 767 of file api_shared.c.

Function Documentation

◆ msg_handler_internal()

static void msg_handler_internal ( api_main_t am,
void *  the_msg,
int  trace_it,
int  do_it,
int  free_it 
)
inlinestatic

Definition at line 436 of file api_shared.c.

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

◆ vl_api_c_string_to_api_string()

int vl_api_c_string_to_api_string ( const char *  buf,
vl_api_string_t str 
)

Definition at line 1117 of file api_shared.c.

◆ vl_api_format_string()

u8* vl_api_format_string ( u8 s,
va_list *  args 
)

Definition at line 1144 of file api_shared.c.

◆ vl_api_from_api_to_new_c_string()

char* vl_api_from_api_to_new_c_string ( vl_api_string_t astr)

Definition at line 1172 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_api_from_api_to_new_vec()

u8* vl_api_from_api_to_new_vec ( void *  mp,
vl_api_string_t astr 
)

Definition at line 1156 of file api_shared.c.

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

◆ vl_api_get_elog_trace_api_messages()

int vl_api_get_elog_trace_api_messages ( void  )

Definition at line 1202 of file api_shared.c.

◆ vl_api_serialize_message_table()

u8* vl_api_serialize_message_table ( api_main_t am,
u8 vector 
)

Definition at line 203 of file api_shared.c.

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

◆ vl_api_set_elog_main()

void vl_api_set_elog_main ( elog_main_t m)

Definition at line 1184 of file api_shared.c.

+ Here is the call graph for this function:

◆ vl_api_set_elog_trace_api_messages()

int vl_api_set_elog_trace_api_messages ( int  enable)

Definition at line 1191 of file api_shared.c.

◆ vl_api_string_len()

u32 vl_api_string_len ( vl_api_string_t astr)

Definition at line 1138 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_api_vec_to_api_string()

int vl_api_vec_to_api_string ( const u8 vec,
vl_api_string_t str 
)

Definition at line 1129 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_add_msg_name_crc()

void vl_msg_api_add_msg_name_crc ( api_main_t am,
const char *  string,
u32  id 
)

Definition at line 1045 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_add_version()

void vl_msg_api_add_version ( api_main_t am,
const char *  string,
u32  major,
u32  minor,
u32  patch 
)

Definition at line 1063 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_barrier_release()

void vl_msg_api_barrier_release ( void  )

Definition at line 431 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_barrier_sync()

void vl_msg_api_barrier_sync ( void  )

Definition at line 426 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_clean_handlers()

void vl_msg_api_clean_handlers ( int  msg_id)

Definition at line 849 of file api_shared.c.

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

◆ vl_msg_api_cleanup_handler()

void vl_msg_api_cleanup_handler ( void *  the_msg)

Definition at line 710 of file api_shared.c.

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

◆ vl_msg_api_config()

void vl_msg_api_config ( vl_msg_api_msg_config_t c)

Definition at line 778 of file api_shared.c.

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

◆ vl_msg_api_get_msg_ids()

u16 vl_msg_api_get_msg_ids ( const char *  name,
int  n 
)

Definition at line 1001 of file api_shared.c.

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

◆ vl_msg_api_get_msg_index()

u32 vl_msg_api_get_msg_index ( u8 name_and_crc)

Definition at line 1073 of file api_shared.c.

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

◆ vl_msg_api_get_msg_length()

u32 vl_msg_api_get_msg_length ( void *  msg_arg)

Definition at line 748 of file api_shared.c.

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

◆ vl_msg_api_handler()

void vl_msg_api_handler ( void *  the_msg)

Definition at line 661 of file api_shared.c.

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

◆ vl_msg_api_handler_no_free()

void vl_msg_api_handler_no_free ( void *  the_msg)

Definition at line 672 of file api_shared.c.

+ Here is the call graph for this function:

◆ vl_msg_api_handler_no_trace_no_free()

void vl_msg_api_handler_no_trace_no_free ( void *  the_msg)

Definition at line 682 of file api_shared.c.

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

◆ vl_msg_api_handler_with_vm_node()

void vl_msg_api_handler_with_vm_node ( api_main_t am,
svm_region_t vlib_rp,
void *  the_msg,
vlib_main_t vm,
vlib_node_runtime_t node,
u8  is_private 
)

Definition at line 540 of file api_shared.c.

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

◆ vl_msg_api_increment_missing_client_counter()

void vl_msg_api_increment_missing_client_counter ( void  )

Definition at line 54 of file api_shared.c.

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

◆ vl_msg_api_max_length()

u32 vl_msg_api_max_length ( void *  mp)

Definition at line 880 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_pd_handler()

int vl_msg_api_pd_handler ( void *  mp,
int  rv 
)

Definition at line 972 of file api_shared.c.

+ Here is the call graph for this function:

◆ vl_msg_api_post_mortem_dump()

void vl_msg_api_post_mortem_dump ( void  )

Definition at line 923 of file api_shared.c.

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

◆ vl_msg_api_post_mortem_dump_enable_disable()

void vl_msg_api_post_mortem_dump_enable_disable ( int  enable)

Definition at line 917 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_queue_handler()

void vl_msg_api_queue_handler ( svm_queue_t q)

Definition at line 871 of file api_shared.c.

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

◆ vl_msg_api_register_pd_handler()

void vl_msg_api_register_pd_handler ( void *  fp,
u16  msg_id_host_byte_order 
)

Definition at line 958 of file api_shared.c.

+ Here is the call graph for this function:

◆ vl_msg_api_replay_handler()

void vl_msg_api_replay_handler ( void *  the_msg)

Definition at line 730 of file api_shared.c.

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

◆ vl_msg_api_rx_trace_enabled()

int vl_msg_api_rx_trace_enabled ( api_main_t am)

Definition at line 61 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_set_cleanup_handler()

void vl_msg_api_set_cleanup_handler ( int  msg_id,
void *  fp 
)

Definition at line 861 of file api_shared.c.

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

◆ vl_msg_api_set_first_available_msg_id()

void vl_msg_api_set_first_available_msg_id ( u16  first_avail)

Definition at line 993 of file api_shared.c.

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

◆ vl_msg_api_set_global_main()

void vl_msg_api_set_global_main ( void *  am_arg)

Definition at line 47 of file api_shared.c.

◆ vl_msg_api_set_handlers()

void vl_msg_api_set_handlers ( int  id,
char *  name,
void *  handler,
void *  cleanup,
void *  endian,
void *  print,
int  size,
int  traced 
)

Definition at line 827 of file api_shared.c.

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

◆ vl_msg_api_socket_handler()

void vl_msg_api_socket_handler ( void *  the_msg)

Definition at line 757 of file api_shared.c.

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

◆ vl_msg_api_trace()

void vl_msg_api_trace ( api_main_t am,
vl_api_trace_t tp,
void *  msg 
)

Definition at line 76 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_trace_configure()

int vl_msg_api_trace_configure ( api_main_t am,
vl_api_trace_which_t  which,
u32  nitems 
)

Definition at line 365 of file api_shared.c.

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

◆ vl_msg_api_trace_free()

int vl_msg_api_trace_free ( api_main_t am,
vl_api_trace_which_t  which 
)

Definition at line 166 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_trace_get()

vl_api_trace_t* vl_msg_api_trace_get ( api_main_t am,
vl_api_trace_which_t  which 
)

Definition at line 895 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_api_trace_only()

void vl_msg_api_trace_only ( void *  the_msg)

Definition at line 699 of file api_shared.c.

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

◆ vl_msg_api_trace_onoff()

int vl_msg_api_trace_onoff ( api_main_t am,
vl_api_trace_which_t  which,
int  onoff 
)

Definition at line 124 of file api_shared.c.

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

◆ vl_msg_api_trace_save()

int vl_msg_api_trace_save ( api_main_t am,
vl_api_trace_which_t  which,
FILE *  fp 
)

Definition at line 226 of file api_shared.c.

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

◆ vl_msg_api_tx_trace_enabled()

int vl_msg_api_tx_trace_enabled ( api_main_t am)

Definition at line 67 of file api_shared.c.

+ Here is the caller graph for this function:

◆ vl_msg_pop_heap()

void vl_msg_pop_heap ( void *  oldheap)

Definition at line 1109 of file api_shared.c.

+ Here is the call graph for this function:

◆ vl_msg_pop_heap_w_region()

void vl_msg_pop_heap_w_region ( svm_region_t vlib_rp,
void *  oldheap 
)

Definition at line 1102 of file api_shared.c.

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

◆ vl_msg_push_heap()

void* vl_msg_push_heap ( void  )

Definition at line 1095 of file api_shared.c.

+ Here is the call graph for this function:

◆ vl_msg_push_heap_w_region()

void* vl_msg_push_heap_w_region ( svm_region_t vlib_rp)

Definition at line 1088 of file api_shared.c.

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

◆ vl_noop_handler()

void vl_noop_handler ( void *  mp)

Definition at line 909 of file api_shared.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ api_global_main

api_main_t api_global_main
Initial value:
=
{
.region_name = "/unset",
.api_uid = -1,
.api_gid = -1,
}

Definition at line 35 of file api_shared.c.

◆ my_api_main

__thread api_main_t* my_api_main = &api_global_main

Definition at line 44 of file api_shared.c.

◆ post_mortem_dump_enabled

u8 post_mortem_dump_enabled
static

Definition at line 914 of file api_shared.c.

◆ vl_msg_api_fuzz_hook

void(* vl_msg_api_fuzz_hook) (u16, void *)

Definition at line 536 of file api_shared.c.