FD.io VPP  v21.01.1
Vector Packet Processing
plugin.h File Reference
+ Include dependency graph for plugin.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vlib_r2_string_t
 
struct  vlib_plugin_r2_t
 
struct  plugin_info_t
 
struct  plugin_config_t
 
struct  plugin_main_t
 

Macros

#define foreach_r2_string_field
 
#define VLIB_PLUGIN_REGISTER()
 
#define vlib_call_plugin_init_function(vm, p, x)
 

Functions

typedef CLIB_PACKED (struct { u8 default_disabled;const char version[32];const char version_required[32];const char overrides[256];const char *early_init;const char *description;}) vlib_plugin_registration_t
 
clib_error_tvlib_plugin_config (vlib_main_t *vm, unformat_input_t *input)
 
int vlib_plugin_early_init (vlib_main_t *vm)
 
int vlib_load_new_plugins (plugin_main_t *pm, int from_early_init)
 
void * vlib_get_plugin_symbol (char *plugin_name, char *symbol_name)
 
u8vlib_get_vat_plugin_path (void)
 

Variables

plugin_main_t vlib_plugin_main
 

Macro Definition Documentation

◆ foreach_r2_string_field

#define foreach_r2_string_field
Value:
_(version) \
_(version_required) \
_(overrides) \
_(early_init) \
_(description)
option version
Definition: sample.api:19

Definition at line 90 of file plugin.h.

◆ vlib_call_plugin_init_function

#define vlib_call_plugin_init_function (   vm,
  p,
 
)
Value:
({ \
clib_error_t *(*_f)(vlib_main_t *); \
uword *_fptr = 0; \
clib_error_t * _error = 0; \
(p, CLIB_STRING_MACRO(_vlib_init_function_##x)); \
if (_fptr == 0) \
{ \
_error = clib_error_return \
(0, "Plugin %s and/or symbol %s not found.", \
p, CLIB_STRING_MACRO(_vlib_init_function_##x)); \
} \
else \
{ \
_f = (void *)(_fptr[0]); \
} \
if (_fptr && ! hash_get (vm->init_functions_called, _f)) \
{ \
hash_set1 (vm->init_functions_called, _f); \
_error = _f (vm); \
} \
_error; \
})
vlib_main_t * vm
Definition: in2out_ed.c:1580
#define clib_error_return(e, args...)
Definition: error.h:99
#define hash_get(h, key)
Definition: hash.h:249
#define CLIB_STRING_MACRO(x)
Definition: clib.h:93
uword * init_functions_called
Definition: main.h:247
void * vlib_get_plugin_symbol(char *plugin_name, char *symbol_name)
Definition: plugin.c:38

Definition at line 156 of file plugin.h.

◆ VLIB_PLUGIN_REGISTER

#define VLIB_PLUGIN_REGISTER ( )
Value:
vlib_plugin_registration_t vlib_plugin_registration \
CLIB_NOSANITIZE_PLUGIN_REG_SECTION \
__clib_export __clib_section(".vlib_plugin_registration")

Definition at line 150 of file plugin.h.

Function Documentation

◆ CLIB_PACKED()

typedef CLIB_PACKED ( struct { u8 default_disabled;const char version[32];const char version_required[32];const char overrides[256];const char *early_init;const char *description;}  )

◆ vlib_get_plugin_symbol()

void* vlib_get_plugin_symbol ( char *  plugin_name,
char *  symbol_name 
)

Definition at line 38 of file plugin.c.

+ Here is the caller graph for this function:

◆ vlib_get_vat_plugin_path()

u8* vlib_get_vat_plugin_path ( void  )

Definition at line 608 of file plugin.c.

+ Here is the caller graph for this function:

◆ vlib_load_new_plugins()

int vlib_load_new_plugins ( plugin_main_t pm,
int  from_early_init 
)

Definition at line 416 of file plugin.c.

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

◆ vlib_plugin_config()

clib_error_t* vlib_plugin_config ( vlib_main_t vm,
unformat_input_t input 
)

Definition at line 720 of file plugin.c.

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

◆ vlib_plugin_early_init()

int vlib_plugin_early_init ( vlib_main_t vm)

Definition at line 587 of file plugin.c.

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

Variable Documentation

◆ vlib_plugin_main

plugin_main_t vlib_plugin_main

Definition at line 23 of file plugin.c.