18 #ifndef __included_plugin_h__ 19 #define __included_plugin_h__ 23 #include <sys/types.h> 63 const char version_required[32];
64 const char overrides[256];
65 const char *early_init;
66 const char *description;
67 }) vlib_plugin_registration_t;
74 struct stat file_info;
78 vlib_plugin_registration_t *
reg;
123 #define VLIB_PLUGIN_REGISTER() \ 124 vlib_plugin_registration_t vlib_plugin_registration \ 125 CLIB_NOSANITIZE_PLUGIN_REG_SECTION \ 126 __attribute__((__section__(".vlib_plugin_registration"))) 129 #define vlib_call_plugin_init_function(vm,p,x) \ 131 clib_error_t *(*_f)(vlib_main_t *); \ 133 clib_error_t * _error = 0; \ 134 _fptr= vlib_get_plugin_symbol \ 135 (p, CLIB_STRING_MACRO(_vlib_init_function_##x)); \ 138 _error = clib_error_return \ 139 (0, "Plugin %s and/or symbol %s not found.", \ 140 p, CLIB_STRING_MACRO(_vlib_init_function_##x)); \ 144 _f = (void *)(_fptr[0]); \ 146 if (_fptr && ! hash_get (vm->init_functions_called, _f)) \ 148 hash_set1 (vm->init_functions_called, _f); \
uword * plugin_overrides_by_name_hash
u8 * vat_plugin_name_filter
plugin_main_t vlib_plugin_main
clib_error_t * vlib_plugin_config(vlib_main_t *vm, unformat_input_t *input)
uword * config_index_by_name
u8 * vlib_get_vat_plugin_path(void)
vlib_plugin_registration_t * reg
int vlib_plugin_early_init(vlib_main_t *vm)
int vlib_load_new_plugins(plugin_main_t *pm, int from_early_init)
plugin_info_t * plugin_info
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
void * vlib_get_plugin_symbol(char *plugin_name, char *symbol_name)
plugin_config_t * configs
uword * plugin_by_name_hash
u8 plugins_default_disable