18 #ifndef __included_plugin_h__ 19 #define __included_plugin_h__ 23 #include <sys/types.h> 63 const char version_required[32];
64 const char *early_init;
65 const char *description;
66 }) vlib_plugin_registration_t;
73 struct stat file_info;
77 vlib_plugin_registration_t *
reg;
118 #define VLIB_PLUGIN_REGISTER() \ 119 vlib_plugin_registration_t vlib_plugin_registration \ 120 __attribute__((__section__(".vlib_plugin_registration"))) 123 #define vlib_call_plugin_init_function(vm,p,x) \ 125 clib_error_t *(*_f)(vlib_main_t *); \ 127 clib_error_t * _error = 0; \ 128 _fptr= vlib_get_plugin_symbol \ 129 (p, CLIB_STRING_MACRO(_vlib_init_function_##x)); \ 132 _error = clib_error_return \ 133 (0, "Plugin %s and/or symbol %s not found.", \ 134 p, CLIB_STRING_MACRO(_vlib_init_function_##x)); \ 138 _f = (void *)(_fptr[0]); \ 140 if (_fptr && ! hash_get (vm->init_functions_called, _f)) \ 142 hash_set1 (vm->init_functions_called, _f); \
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
void * vlib_get_plugin_symbol(char *plugin_name, char *symbol_name)
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
plugin_config_t * configs
uword * plugin_by_name_hash
u8 plugins_default_disable