aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib/unix')
-rw-r--r--src/vlib/unix/plugin.c20
-rw-r--r--src/vlib/unix/plugin.h5
2 files changed, 24 insertions, 1 deletions
diff --git a/src/vlib/unix/plugin.c b/src/vlib/unix/plugin.c
index c2741aaa074..058afcfcae0 100644
--- a/src/vlib/unix/plugin.c
+++ b/src/vlib/unix/plugin.c
@@ -361,6 +361,20 @@ vlib_plugin_early_init (vlib_main_t * vm)
return vlib_load_new_plugins (pm, 1 /* from_early_init */ );
}
+u8 *
+vlib_get_vat_plugin_path (void)
+{
+ plugin_main_t *pm = &vlib_plugin_main;
+ return (pm->vat_plugin_path);
+}
+
+u8 *
+vlib_get_vat_plugin_name_filter (void)
+{
+ plugin_main_t *pm = &vlib_plugin_main;
+ return (pm->vat_plugin_name_filter);
+}
+
static clib_error_t *
vlib_plugins_show_cmd_fn (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
@@ -497,6 +511,12 @@ done:
u8 *s = 0;
if (unformat (input, "path %s", &s))
pm->plugin_path = s;
+ else if (unformat (input, "name-filter %s", &s))
+ pm->plugin_name_filter = s;
+ else if (unformat (input, "vat-path %s", &s))
+ pm->vat_plugin_path = s;
+ else if (unformat (input, "vat-name-filter %s", &s))
+ pm->vat_plugin_name_filter = s;
else if (unformat (input, "plugin %s %U", &s,
unformat_vlib_cli_sub_input, &sub_input))
{
diff --git a/src/vlib/unix/plugin.h b/src/vlib/unix/plugin.h
index 52da7436e61..aad1ca30b3c 100644
--- a/src/vlib/unix/plugin.h
+++ b/src/vlib/unix/plugin.h
@@ -92,9 +92,11 @@ typedef struct
plugin_info_t *plugin_info;
uword *plugin_by_name_hash;
- /* path and name filter */
+ /* paths and name filters */
u8 *plugin_path;
u8 *plugin_name_filter;
+ u8 *vat_plugin_path;
+ u8 *vat_plugin_name_filter;
/* plugin configs and hash by name */
plugin_config_t *configs;
@@ -110,6 +112,7 @@ clib_error_t *vlib_plugin_config (vlib_main_t * vm, unformat_input_t * input);
int vlib_plugin_early_init (vlib_main_t * vm);
int vlib_load_new_plugins (plugin_main_t * pm, int from_early_init);
void *vlib_get_plugin_symbol (char *plugin_name, char *symbol_name);
+u8 *vlib_get_vat_plugin_path (void);
#define VLIB_PLUGIN_REGISTER() \
vlib_plugin_registration_t vlib_plugin_registration \