You can use vlib_get_plugin_symbol (char *plugin_name, char *symbol_name) to
find the symbol you need.
Clib_error_t (*fp)(vlib_main_t *) = vlib_get_plugin_symbo (“otherplugin”,
“init_function_name”);
if (fp == 0)
Oops(other_plugin_AWOL)
if ((error = (*fp)(vm)))
return error;
From: [email protected] <[email protected]> On Behalf Of Satya Murthy
Sent: Thursday, June 6, 2019 4:27 AM
To: [email protected]
Subject: Re: [vpp-dev] About the order of VLIB_INIT_FUNCTION called between
different plugins
Hi Neale,
Thanks for the information.
I have been trying to use this approach but not successful.
I am trying to call acl plugin's init function from my custom plugin. But,
looks like, it is not able to get the acl_init symbol, and hence the custom
plugin loading itself is failing.
Following is the code I tried:
========================
static clib_error_t *
custom_module_init (vlib_main_t * vm)
{
if ((error = vlib_call_init_function (vm, acl_init))) <<<<< trying to
call ACL plugin's init
return (error);
} ;
I am getting following error while loading my custom plugin.
{"log":"load_one_plugin:145: /usr/lib/vpp_plugins/custom_plugin.so: undefined
symbol: _vlib_init_function_acl_init\r\n" }
I also tried to call some other init function like "ip_main_init" from my
custom plugin, and it seems to be working fine. But, acl_init is not working.
Is there anything ACL plugin need to do to allow other plugins to call it's
init.
Appreciate your inputs on this.
--
Thanks & Regards,
Murthy
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#13226): https://lists.fd.io/g/vpp-dev/message/13226
Mute This Topic: https://lists.fd.io/mt/10642182/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-