summaryrefslogtreecommitdiffstats
path: root/src/plugins/lb
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/lb')
-rw-r--r--src/plugins/lb/lb_test.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/plugins/lb/lb_test.c b/src/plugins/lb/lb_test.c
index 00ad673d354..4ac306bba1c 100644
--- a/src/plugins/lb/lb_test.c
+++ b/src/plugins/lb/lb_test.c
@@ -349,8 +349,8 @@ _(lb_add_del_vip, "<prefix> " \
_(lb_add_del_as, "<vip-prefix> [protocol (tcp|udp) port <n>] " \
"[<address>] [del] [flush]")
-static void
-lb_vat_api_hookup (vat_main_t *vam)
+static void
+lb_api_hookup (vat_main_t *vam)
{
lb_test_main_t * lbtm = &lb_test_main;
/* Hook up handlers for replies from the data plane plug-in */
@@ -376,22 +376,4 @@ lb_vat_api_hookup (vat_main_t *vam)
#undef _
}
-clib_error_t * vat_plugin_register (vat_main_t *vam)
-{
- lb_test_main_t * lbtm = &lb_test_main;
-
- u8 * name;
-
- lbtm->vat_main = vam;
-
- /* Ask the vpp engine for the first assigned message-id */
- name = format (0, "lb_%08x%c", api_version, 0);
- lbtm->msg_id_base = vl_client_get_first_plugin_msg_id ((char *) name);
-
- if (lbtm->msg_id_base != (u16) ~0)
- lb_vat_api_hookup (vam);
-
- vec_free(name);
-
- return 0;
-}
+VAT_PLUGIN_REGISTER(lb);