FD.io VPP  v20.05.1-5-g09f167997
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 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 572 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 311 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 85 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 302 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 706 of file plugin.c.

+ Here is the call graph for this function:

◆ split_plugin_path()

static u8** split_plugin_path ( plugin_main_t pm)
static

Definition at line 275 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 523 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 516 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 324 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 628 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 495 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 530 of file plugin.c.

+ Here is the call graph for this function:

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:530

(constructor) VLIB_CLI_COMMAND (plugins_show_cmd)

Definition at line 563 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.