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;
90 #define foreach_r2_string_field \ 101 struct stat file_info;
105 vlib_plugin_registration_t *
reg;
150 #define VLIB_PLUGIN_REGISTER() \ 151 vlib_plugin_registration_t vlib_plugin_registration \ 152 CLIB_NOSANITIZE_PLUGIN_REG_SECTION \ 153 __clib_export __clib_section(".vlib_plugin_registration") 156 #define vlib_call_plugin_init_function(vm,p,x) \ 158 clib_error_t *(*_f)(vlib_main_t *); \ 160 clib_error_t * _error = 0; \ 161 _fptr= vlib_get_plugin_symbol \ 162 (p, CLIB_STRING_MACRO(_vlib_init_function_##x)); \ 165 _error = clib_error_return \ 166 (0, "Plugin %s and/or symbol %s not found.", \ 167 p, CLIB_STRING_MACRO(_vlib_init_function_##x)); \ 171 _f = (void *)(_fptr[0]); \ 173 if (_fptr && ! hash_get (vm->init_functions_called, _f)) \ 175 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
vlib_r2_string_t early_init
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
vlib_r2_string_t description
vlib_r2_string_t version_required
vlib_r2_string_t overrides
void * vlib_get_plugin_symbol(char *plugin_name, char *symbol_name)
uword data_segment_offset
plugin_config_t * configs
uword * plugin_by_name_hash
u8 plugins_default_disable