#if (VPP_API_TEST_BUILTIN==0)
vl_msg_api_set_first_available_msg_id (VL_MSG_FIRST_AVAILABLE);
-#endif
vam->sw_if_index_by_interface_name = hash_create_string (0, sizeof (uword));
vam->function_by_name = hash_create_string (0, sizeof (uword));
vam->help_by_name = hash_create_string (0, sizeof (uword));
+#endif
/* API messages we can send */
#define _(n,h) hash_set_mem (vam->function_by_name, #n, api_##n);
{
plugin_main_t *pm = &vat_plugin_main;
-
pm->plugin_path = format (0, "%s%c", vat_plugin_path, 0);
if (vat_plugin_name_filter)
pm->plugin_name_filter = format (0, "%s%c", vat_plugin_name_filter, 0);
VLIB_INIT_FUNCTION (api_main_init);
+void
+vat_plugin_hash_create (void)
+{
+ vat_main_t *vam = &vat_main;
+
+ vam->sw_if_index_by_interface_name = hash_create_string (0, sizeof (uword));
+ vam->function_by_name = hash_create_string (0, sizeof (uword));
+ vam->help_by_name = hash_create_string (0, sizeof (uword));
+}
+
static clib_error_t *
api_command_fn (vlib_main_t * vm,
unformat_input_t * input, vlib_cli_command_t * cmd)
static void
vpe_main_init (vlib_main_t * vm)
{
+ void vat_plugin_hash_create (void);
+
if (CLIB_DEBUG > 0)
vlib_unix_cli_set_prompt ("DBGvpp# ");
else
/* Turn off network stack components which we don't want */
vlib_mark_init_function_complete (vm, srp_init);
+ /*
+ * Create the binary api plugin hashes before loading plugins
+ */
+ vat_plugin_hash_create ();
}
/*