FD.io VPP  v20.01-46-g7006026de
Vector Packet Processing
api.h File Reference
+ Include dependency graph for api.h:

Go to the source code of this file.

Macros

#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)
 

Functions

typedef CLIB_PACKED (struct { u32 nitems;u32 msgtbl_size;u8 wrapped;}) vl_api_trace_file_header_t
 
int vl_msg_api_trace_save (api_main_t *am, vl_api_trace_which_t which, FILE *fp)
 
static u32 vl_msg_api_get_msg_length_inline (void *msg_arg)
 
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_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, svm_region_t *vlib_rp, void *the_msg, vlib_main_t *vm, vlib_node_runtime_t *node, u8 is_private)
 
vl_api_trace_tvl_msg_api_trace_get (api_main_t *am, vl_api_trace_which_t which)
 
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)
 
u8vlib_node_serialize (vlib_main_t *vm, vlib_node_t ***node_dups, u8 *vector, int include_nexts, int include_stats)
 
vlib_node_t *** vlib_node_unserialize (u8 *vector)
 
u32 vl_msg_api_get_msg_length (void *msg_arg)
 

Macro Definition Documentation

◆ vl_msg_api_call_reaper_function

#define vl_msg_api_call_reaper_function (   ci)
Value:
({ \
vlib_init_function_t * _f = VLIB_INIT_FUNCTION_SYMBOL (reaper); \
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:110

Definition at line 82 of file api.h.

◆ VL_MSG_API_FUNCTION_SYMBOL

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

Definition at line 61 of file api.h.

◆ VL_MSG_API_REAPER_FUNCTION

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

Definition at line 79 of file api.h.

◆ VLIB_API_INIT_FUNCTION

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

Definition at line 42 of file api.h.

◆ vlib_call_api_init_function

#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; \
{ \
hash_set1 (vm->init_functions_called, _f); \
_error = _f (vm); \
} \
_error; \
})
#define hash_get(h, key)
Definition: hash.h:249
uword * init_functions_called
Definition: main.h:215
vlib_main_t * vm
Definition: in2out_ed.c:1810
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
Definition: init.h:51

Definition at line 45 of file api.h.

◆ VLIB_DECLARE_REAPER_FUNCTION

#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 = vlibapi_get_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; \
}
clib_error_t *() vl_msg_api_init_function_t(u32 client_index)
Definition: api_common.h:208
static api_main_t * vlibapi_get_main(void)
Definition: api_common.h:378

Definition at line 64 of file api.h.

Function Documentation

◆ CLIB_PACKED()

typedef CLIB_PACKED ( struct { u32 nitems;u32 msgtbl_size;u8 wrapped;}  )

◆ 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 1024 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 1042 of file api_shared.c.

+ 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 742 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_inline()

static u32 vl_msg_api_get_msg_length_inline ( void *  msg_arg)
inlinestatic

Definition at line 91 of file api.h.

+ 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 538 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_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 874 of file api_shared.c.

+ 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:

◆ vlib_node_serialize()

u8* vlib_node_serialize ( vlib_main_t vm,
vlib_node_t ***  node_dups,
u8 vector,
int  include_nexts,
int  include_stats 
)

Definition at line 51 of file node_serialize.c.

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

◆ vlib_node_unserialize()

vlib_node_t*** vlib_node_unserialize ( u8 vector)

Definition at line 161 of file node_serialize.c.

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