FD.io VPP  v21.06-3-gbb25fbf28
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)
 
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_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); \
})

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; \
if (! hash_get (vm->init_functions_called, _f)) \
{ \
hash_set1 (vm->init_functions_called, _f); \
_error = _f (vm); \
} \
_error; \
})

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; \
}

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 1091 of file api_shared.c.

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

◆ vl_msg_api_get_msg_length()

u32 vl_msg_api_get_msg_length ( void *  msg_arg)

Definition at line 791 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 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 557 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 926 of file api_shared.c.

+ 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 62 of file api_shared.c.

◆ vl_msg_api_trace()

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

Definition at line 77 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_configure()

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

Definition at line 366 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 167 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 941 of file api_shared.c.

◆ 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 125 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 227 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 68 of file api_shared.c.

◆ 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:
VLIB_INIT_FUNCTION_SYMBOL
#define VLIB_INIT_FUNCTION_SYMBOL(x)
Definition: init.h:110
am
app_main_t * am
Definition: application.c:489
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
hash_get
#define hash_get(h, key)
Definition: hash.h:249
vlibapi_get_main
static api_main_t * vlibapi_get_main(void)
Definition: api_common.h:390
vl_msg_api_init_function_t
clib_error_t *() vl_msg_api_init_function_t(u32 client_index)
Definition: api_common.h:211
vlib_init_function_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
Definition: init.h:51