FD.io VPP  v17.04.2-2-ga8f93f8
Vector Packet Processing
api.h File Reference
+ Include dependency graph for api.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vl_api_registration_
 
struct  trace_cfg_t
 
struct  vl_api_trace_t
 
struct  vl_api_msg_range_t
 
struct  api_main_t
 
struct  vl_msg_api_msg_config_t
 
struct  msgbuf_
 

Macros

#define VL_API_LITTLE_ENDIAN   0x00
 
#define VL_API_BIG_ENDIAN   0x01
 
#define VLIB_API_INIT_FUNCTION(x)   VLIB_DECLARE_INIT_FUNCTION(x,api_init)
 
#define vlib_call_api_init_function(vm, x)
 
#define VL_MSG_API_FUNCTION_SYMBOL(x)   _VL_MSG_API_FUNCTION_SYMBOL(x, reaper)
 
#define VLIB_DECLARE_REAPER_FUNCTION(x, tag)
 
#define VL_MSG_API_REAPER_FUNCTION(x)   VLIB_DECLARE_REAPER_FUNCTION(x,reaper)
 
#define vl_msg_api_call_reaper_function(ci)
 

Typedefs

typedef struct vl_api_registration_ vl_api_registration_t
 
typedef clib_error_t *( vl_msg_api_init_function_t) (u32 client_index)
 
typedef struct msgbuf_ msgbuf_t
 

Enumerations

enum  vl_registration_type_t {
  REGISTRATION_TYPE_FREE = 0, REGISTRATION_TYPE_SHMEM, REGISTRATION_TYPE_SOCKET_LISTEN, REGISTRATION_TYPE_SOCKET_SERVER,
  REGISTRATION_TYPE_SOCKET_CLIENT
}
 
enum  vl_api_trace_which_t { VL_API_TRACE_TX, VL_API_TRACE_RX }
 

Functions

typedef CLIB_PACKED (struct{u8 endian;u8 wrapped;u32 nitems;}) vl_api_trace_file_header_t
 
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)
 
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_handler_with_vm_node (api_main_t *am, void *the_msg, vlib_main_t *vm, vlib_node_runtime_t *node)
 
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)
 
void vl_msg_api_socket_handler (void *the_msg)
 
void vl_msg_api_set_handlers (int msg_id, char *msg_name, void *handler, void *cleanup, void *endian, void *print, int msg_size, int traced)
 
void vl_msg_api_config (vl_msg_api_msg_config_t *)
 
void vl_msg_api_set_cleanup_handler (int msg_id, void *fp)
 
void vl_msg_api_queue_handler (unix_shared_memory_queue_t *q)
 
vl_api_trace_tvl_msg_api_trace_get (api_main_t *am, vl_api_trace_which_t which)
 
void vl_msg_api_barrier_sync (void)
 
void vl_msg_api_barrier_release (void)
 
void vl_msg_api_free (void *)
 
void vl_noop_handler (void *mp)
 
void vl_msg_api_increment_missing_client_counter (void)
 
void vl_msg_api_post_mortem_dump (void)
 
void vl_msg_api_post_mortem_dump_enable_disable (int enable)
 
void vl_msg_api_register_pd_handler (void *handler, 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 (char *name, int n)
 
void vl_msg_api_add_msg_name_crc (api_main_t *am, char *string, u32 id)
 
u32 vl_api_get_msg_index (u8 *name_and_crc)
 
u8vlib_node_serialize (vlib_node_main_t *nm, u8 *vector, u32 max_threads, int include_nexts, int include_stats)
 
vlib_node_t ** vlib_node_unserialize (u8 *vector)
 

Variables

api_main_t api_main
 

Macro Definition Documentation

#define VL_API_BIG_ENDIAN   0x01

Definition at line 106 of file api.h.

#define VL_API_LITTLE_ENDIAN   0x00

Definition at line 105 of file api.h.

#define vl_msg_api_call_reaper_function (   ci)
Value:
({ \
clib_error_t * _error = 0; \
_error = _f (ci); \
})
clib_error_t *( vlib_init_function_t)(struct vlib_main_t *vm)
Definition: init.h:51
#define VLIB_INIT_FUNCTION_SYMBOL(x)
Definition: init.h:85

Definition at line 330 of file api.h.

#define VL_MSG_API_FUNCTION_SYMBOL (   x)    _VL_MSG_API_FUNCTION_SYMBOL(x, reaper)

Definition at line 309 of file api.h.

#define VL_MSG_API_REAPER_FUNCTION (   x)    VLIB_DECLARE_REAPER_FUNCTION(x,reaper)

Definition at line 327 of file api.h.

#define VLIB_API_INIT_FUNCTION (   x)    VLIB_DECLARE_INIT_FUNCTION(x,api_init)

Definition at line 289 of file api.h.

#define vlib_call_api_init_function (   vm,
 
)
Value:
({ \
extern vlib_init_function_t * _VLIB_INIT_FUNCTION_SYMBOL (x,api_init); \
vlib_init_function_t * _f = _VLIB_INIT_FUNCTION_SYMBOL (x,api_init); \
clib_error_t * _error = 0; \
{ \
_error = _f (vm); \
} \
_error; \
})
#define hash_get(h, key)
Definition: hash.h:248
uword * init_functions_called
Definition: main.h:156
vlib_main_t * vm
Definition: buffer.c:276
clib_error_t *( vlib_init_function_t)(struct vlib_main_t *vm)
Definition: init.h:51
#define hash_set1(h, key)
Definition: hash.h:257

Definition at line 292 of file api.h.

#define VLIB_DECLARE_REAPER_FUNCTION (   x,
  tag 
)
Value:
vl_msg_api_init_function_t * _VL_MSG_API_FUNCTION_SYMBOL (x, tag) = x; \
static void __vl_msg_api_add_##tag##_function_##x (void) \
__attribute__((__constructor__)) ; \
\
static void __vl_msg_api_add_##tag##_function_##x (void) \
{ \
api_main_t * am = &api_main; \
static _vl_msg_api_function_list_elt_t _vl_msg_api_function; \
_vl_msg_api_function.next_init_function \
= am->tag##_function_registrations; \
am->tag##_function_registrations = &_vl_msg_api_function; \
_vl_msg_api_function.f = &x; \
}
api_main_t api_main
Definition: api_shared.c:35
clib_error_t *( vl_msg_api_init_function_t)(u32 client_index)
Definition: api.h:115

Definition at line 312 of file api.h.

Typedef Documentation

typedef struct msgbuf_ msgbuf_t
typedef clib_error_t*( vl_msg_api_init_function_t) (u32 client_index)

Definition at line 115 of file api.h.

Enumeration Type Documentation

Enumerator
VL_API_TRACE_TX 
VL_API_TRACE_RX 

Definition at line 99 of file api.h.

Enumerator
REGISTRATION_TYPE_FREE 
REGISTRATION_TYPE_SHMEM 
REGISTRATION_TYPE_SOCKET_LISTEN 
REGISTRATION_TYPE_SOCKET_SERVER 
REGISTRATION_TYPE_SOCKET_CLIENT 

Definition at line 29 of file api.h.

Function Documentation

typedef CLIB_PACKED ( struct{u8 endian;u8 wrapped;u32 nitems;}  )
u32 vl_api_get_msg_index ( u8 name_and_crc)

Definition at line 609 of file memory_shared.c.

+ Here is the caller graph for this function:

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

Definition at line 875 of file api_shared.c.

void vl_msg_api_barrier_release ( void  )

Definition at line 388 of file api_shared.c.

+ Here is the caller graph for this function:

void vl_msg_api_barrier_sync ( void  )

Definition at line 383 of file api_shared.c.

+ Here is the caller graph for this function:

void vl_msg_api_cleanup_handler ( void *  the_msg)

Definition at line 590 of file api_shared.c.

+ Here is the call graph for this function:

void vl_msg_api_config ( vl_msg_api_msg_config_t )

Definition at line 652 of file api_shared.c.

+ Here is the caller graph for this function:

void vl_msg_api_free ( void *  )

Definition at line 208 of file memory_shared.c.

+ Here is the caller graph for this function:

u16 vl_msg_api_get_msg_ids ( char *  name,
int  n 
)

Definition at line 831 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_msg_api_handler ( void *  the_msg)

Definition at line 541 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_msg_api_handler_no_free ( void *  the_msg)

Definition at line 328 of file threads.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_msg_api_handler_no_trace_no_free ( void *  the_msg)

Definition at line 562 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_msg_api_handler_with_vm_node ( api_main_t am,
void *  the_msg,
vlib_main_t vm,
vlib_node_runtime_t node 
)

Definition at line 465 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_msg_api_increment_missing_client_counter ( void  )

Definition at line 44 of file api_shared.c.

+ Here is the caller graph for this function:

int vl_msg_api_pd_handler ( void *  mp,
int  rv 
)

Definition at line 802 of file api_shared.c.

void vl_msg_api_post_mortem_dump ( void  )

Definition at line 753 of file api_shared.c.

void vl_msg_api_post_mortem_dump_enable_disable ( int  enable)

Definition at line 747 of file api_shared.c.

+ Here is the caller graph for this function:

void vl_msg_api_queue_handler ( unix_shared_memory_queue_t q)

Definition at line 716 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_msg_api_register_pd_handler ( void *  handler,
u16  msg_id_host_byte_order 
)

Definition at line 788 of file api_shared.c.

void vl_msg_api_replay_handler ( void *  the_msg)

Definition at line 610 of file api_shared.c.

int vl_msg_api_rx_trace_enabled ( api_main_t am)

Definition at line 51 of file api_shared.c.

void vl_msg_api_set_cleanup_handler ( int  msg_id,
void *  fp 
)

Definition at line 706 of file api_shared.c.

void vl_msg_api_set_first_available_msg_id ( u16  first_avail)

Definition at line 823 of file api_shared.c.

+ Here is the caller graph for this function:

void vl_msg_api_set_handlers ( int  msg_id,
char *  msg_name,
void *  handler,
void *  cleanup,
void *  endian,
void *  print,
int  msg_size,
int  traced 
)

Definition at line 684 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vl_msg_api_socket_handler ( void *  the_msg)

Definition at line 631 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 66 of file api_shared.c.

+ Here is the caller graph for this function:

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

Definition at line 322 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vl_msg_api_trace_free ( api_main_t am,
vl_api_trace_which_t  which 
)

Definition at line 154 of file api_shared.c.

+ Here is the caller graph for this function:

vl_api_trace_t* vl_msg_api_trace_get ( api_main_t am,
vl_api_trace_which_t  which 
)

Definition at line 725 of file api_shared.c.

void vl_msg_api_trace_only ( void *  the_msg)

Definition at line 579 of file api_shared.c.

+ Here is the call graph for this function:

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

Definition at line 112 of file api_shared.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 191 of file api_shared.c.

+ Here is the caller graph for this function:

int vl_msg_api_tx_trace_enabled ( api_main_t am)

Definition at line 57 of file api_shared.c.

void vl_noop_handler ( void *  mp)

Definition at line 739 of file api_shared.c.

+ Here is the caller graph for this function:

u8* vlib_node_serialize ( vlib_node_main_t nm,
u8 vector,
u32  max_threads,
int  include_nexts,
int  include_stats 
)

Definition at line 55 of file node_serialize.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

vlib_node_t** vlib_node_unserialize ( u8 vector)

Definition at line 212 of file node_serialize.c.

+ Here is the call graph for this function:

Variable Documentation

api_main_t api_main

Definition at line 35 of file api_shared.c.