X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fsnat%2Fsnat.c;h=750cc925d7f120b3a7147da8af7081aeb7a98766;hb=3b46cba8f4e909bc363403c6c92215159abb2f11;hp=0fcd6ce86066e5b29e6154040590e5ecf312d03c;hpb=2ae991e27afb3fe2944dd4f60eb2b03f29365c95;p=vpp.git diff --git a/src/plugins/snat/snat.c b/src/plugins/snat/snat.c index 0fcd6ce8606..750cc925d7f 100644 --- a/src/plugins/snat/snat.c +++ b/src/plugins/snat/snat.c @@ -28,6 +28,7 @@ #include #include #include +#include snat_main_t snat_main; @@ -129,27 +130,11 @@ VNET_FEATURE_INIT (ip4_snat_out2in_fast, static) = { .runs_before = VNET_FEATURES ("ip4-lookup"), }; - -/* - * This routine exists to convince the vlib plugin framework that - * we haven't accidentally copied a random .dll into the plugin directory. - * - * Also collects global variable pointers passed from the vpp engine - */ - -clib_error_t * -vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h, - int from_early_init) -{ - snat_main_t * sm = &snat_main; - clib_error_t * error = 0; - - sm->vlib_main = vm; - sm->vnet_main = h->vnet_main; - sm->ethernet_main = h->ethernet_main; - - return error; -} +/* *INDENT-OFF* */ +VLIB_PLUGIN_REGISTER () = { + .version = VPP_BUILD_VER, +}; +/* *INDENT-ON* */ /*$$$$$ move to an installed header file */ #if (1 || CLIB_DEBUG > 0) /* "trust, but verify" */