FD.io VPP  v21.06
Vector Packet Processing
plugin.c File Reference
+ Include dependency graph for plugin.c:

Go to the source code of this file.

Macros

#define PLUGIN_LOG_DBG(...)   do {vlib_log_debug (vlib_plugin_main.logger, __VA_ARGS__);} while(0)
 
#define PLUGIN_LOG_ERR(...)   do {vlib_log_err (vlib_plugin_main.logger, __VA_ARGS__);} while(0)
 
#define PLUGIN_LOG_NOTICE(...)   do {vlib_log_notice (vlib_plugin_main.logger, __VA_ARGS__);} while(0)
 

Functions

void * vlib_get_plugin_symbol (char *plugin_name, char *symbol_name)
 
static char * str_array_to_vec (char *array, int len)
 
static u8extract (u8 *sp, u8 *ep)
 
static clib_error_tr2_to_reg (elf_main_t *em, vlib_plugin_r2_t *r2, vlib_plugin_registration_t *reg)
 
static int load_one_plugin (plugin_main_t *pm, plugin_info_t *pi, int from_early_init)
 
static u8 ** split_plugin_path (plugin_main_t *pm)
 
static int plugin_name_sort_cmp (void *a1, void *a2)
 
static int index_cmp (void *a1, void *a2)
 
int vlib_load_new_plugins (plugin_main_t *pm, int from_early_init)
 
int vlib_plugin_early_init (vlib_main_t *vm)
 
u8vlib_get_vat_plugin_path (void)
 
u8vlib_get_vat_plugin_name_filter (void)
 
static clib_error_tvlib_plugins_show_cmd_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tconfig_one_plugin (vlib_main_t *vm, char *name, unformat_input_t *input)
 
clib_error_tvlib_plugin_config (vlib_main_t *vm, unformat_input_t *input)
 
static clib_error_tplugins_config (vlib_main_t *vm, unformat_input_t *input)
 

Variables

plugin_main_t vlib_plugin_main
 
char * vlib_plugin_path = ""
 
char * vlib_plugin_app_version = ""
 
static vlib_cli_command_t plugins_show_cmd
 (constructor) VLIB_CLI_COMMAND (plugins_show_cmd) More...
 

Macro Definition Documentation

◆ PLUGIN_LOG_DBG

#define PLUGIN_LOG_DBG (   ...)    do {vlib_log_debug (vlib_plugin_main.logger, __VA_ARGS__);} while(0)

Definition at line 25 of file plugin.c.

◆ PLUGIN_LOG_ERR

#define PLUGIN_LOG_ERR (   ...)    do {vlib_log_err (vlib_plugin_main.logger, __VA_ARGS__);} while(0)

Definition at line 27 of file plugin.c.

◆ PLUGIN_LOG_NOTICE

#define PLUGIN_LOG_NOTICE (   ...)    do {vlib_log_notice (vlib_plugin_main.logger, __VA_ARGS__);} while(0)

Definition at line 29 of file plugin.c.

Function Documentation

◆ config_one_plugin()

static clib_error_t* config_one_plugin ( vlib_main_t vm,
char *  name,
unformat_input_t input 
)
static

Definition at line 664 of file plugin.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ extract()

static u8* extract ( u8 sp,
u8 ep 
)
static

Definition at line 71 of file plugin.c.

+ Here is the caller graph for this function:

◆ index_cmp()

static int index_cmp ( void *  a1,
void *  a2 
)
static

Definition at line 403 of file plugin.c.

+ Here is the caller graph for this function:

◆ load_one_plugin()

static int load_one_plugin ( plugin_main_t pm,
plugin_info_t pi,
int  from_early_init 
)
static

Definition at line 159 of file plugin.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ plugin_name_sort_cmp()

static int plugin_name_sort_cmp ( void *  a1,
void *  a2 
)
static

Definition at line 394 of file plugin.c.

+ Here is the caller graph for this function:

◆ plugins_config()

static clib_error_t* plugins_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 798 of file plugin.c.

+ Here is the call graph for this function:

◆ r2_to_reg()

static clib_error_t* r2_to_reg ( elf_main_t em,
vlib_plugin_r2_t r2,
vlib_plugin_registration_t *  reg 
)
static

Definition at line 91 of file plugin.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ split_plugin_path()

static u8** split_plugin_path ( plugin_main_t pm)
static

Definition at line 367 of file plugin.c.

+ Here is the caller graph for this function:

◆ str_array_to_vec()

static char* str_array_to_vec ( char *  array,
int  len 
)
static

Definition at line 52 of file plugin.c.

+ Here is the caller graph for this function:

◆ 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_name_filter()

u8* vlib_get_vat_plugin_name_filter ( void  )

Definition at line 615 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 608 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 416 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 720 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 587 of file plugin.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_plugins_show_cmd_fn()

static clib_error_t* vlib_plugins_show_cmd_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 622 of file plugin.c.

Variable Documentation

◆ plugins_show_cmd

vlib_cli_command_t plugins_show_cmd
static
Initial value:
=
{
.path = "show plugins",
.short_help = "show loaded plugins",
}
static clib_error_t * vlib_plugins_show_cmd_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: plugin.c:622

(constructor) VLIB_CLI_COMMAND (plugins_show_cmd)

Definition at line 655 of file plugin.c.

◆ vlib_plugin_app_version

char * vlib_plugin_app_version = ""

Definition at line 34 of file plugin.c.

◆ vlib_plugin_main

plugin_main_t vlib_plugin_main

Definition at line 23 of file plugin.c.

◆ vlib_plugin_path

char * vlib_plugin_path = ""

Definition at line 32 of file plugin.c.