FD.io VPP  v20.05.1-5-g09f167997
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  plugin_info_t
 
struct  plugin_config_t
 
struct  plugin_main_t
 

Macros

#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

◆ 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; \
})
#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:92
uword * init_functions_called
Definition: main.h:215
vlib_main_t * vm
Definition: in2out_ed.c:1599
void * vlib_get_plugin_symbol(char *plugin_name, char *symbol_name)
Definition: plugin.c:38

Definition at line 128 of file plugin.h.

◆ VLIB_PLUGIN_REGISTER

#define VLIB_PLUGIN_REGISTER ( )
Value:
vlib_plugin_registration_t vlib_plugin_registration \
__attribute__((__section__(".vlib_plugin_registration")))

Definition at line 123 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 516 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 324 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 628 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 495 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.