FD.io VPP  v18.07-34-g55fbdb9
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 *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

#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)) \
{ \
_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:82
uword * init_functions_called
Definition: main.h:173
vlib_main_t * vm
Definition: buffer.c:294
#define hash_set1(h, key)
Definition: hash.h:258
void * vlib_get_plugin_symbol(char *plugin_name, char *symbol_name)
Definition: plugin.c:31
u64 uword
Definition: types.h:112

Definition at line 123 of file plugin.h.

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

Definition at line 118 of file plugin.h.

Function Documentation

typedef CLIB_PACKED ( struct{u8 default_disabled;const char version[32];const char version_required[32];const char *early_init;const char *description;}  )
void* vlib_get_plugin_symbol ( char *  plugin_name,
char *  symbol_name 
)

Definition at line 31 of file plugin.c.

u8* vlib_get_vat_plugin_path ( void  )

Definition at line 370 of file plugin.c.

+ Here is the caller graph for this function:

int vlib_load_new_plugins ( plugin_main_t pm,
int  from_early_init 
)

Definition at line 237 of file plugin.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* vlib_plugin_config ( vlib_main_t vm,
unformat_input_t input 
)

Definition at line 481 of file plugin.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vlib_plugin_early_init ( vlib_main_t vm)

Definition at line 354 of file plugin.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

plugin_main_t vlib_plugin_main

Definition at line 23 of file plugin.c.