Call a plugin init function by name 80/9480/2
authorDave Barach <dave@barachs.net>
Sat, 18 Nov 2017 13:43:06 +0000 (08:43 -0500)
committerFlorin Coras <florin.coras@gmail.com>
Sat, 18 Nov 2017 17:04:34 +0000 (17:04 +0000)
Use this macro to arrange init function ordering between friend
plugins.  Fails in the usual manner if the plugin doesn't exist, or if
the init function symbol is AWOL.

clib_error_t *
thisplug_init (vlib_main_t *vm)
{
  clib_error_t *error = 0;

  if ((error = vlib_plugin_init_function ("otherplug.so", otherplug_init)))
     return error;

  <etc>
  return error;
}
VLIB_INIT_FUNCTION(thisplug_init);

Change-Id: Ideecaf46bc0b1546e85096e54be8ddef87946565
Signed-off-by: Dave Barach <dave@barachs.net>

No differences found