vat: unload unused vat plugins
[vpp.git] / src / plugins / cdp / cdp_test.c
index 33b5449..2e24ddc 100644 (file)
@@ -150,25 +150,7 @@ cdp_api_hookup (vat_main_t * vam)
 #undef _
 }
 
-clib_error_t *
-vat_plugin_register (vat_main_t * vam)
-{
-  cdp_test_main_t *sm = &cdp_test_main;
-  u8 *name;
-
-  sm->vat_main = vam;
-
-  /* Ask the vpp engine for the first assigned message-id */
-  name = format (0, "cdp_%08x%c", api_version, 0);
-  sm->msg_id_base = vl_client_get_first_plugin_msg_id ((char *) name);
-
-  if (sm->msg_id_base != (u16) ~ 0)
-    cdp_api_hookup (vam);
-
-  vec_free (name);
-
-  return 0;
-}
+VAT_PLUGIN_REGISTER (cdp);
 
 /*
  * fd.io coding-style-patch-verification: ON