X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fmap%2Fmap.c;fp=src%2Fvnet%2Fmap%2Fmap.c;h=6d9730f3b067db0ec8582ee6438c5e242fa9744a;hb=381e9a90748bb659f56081123052e3e95501a4b4;hp=702b5f80e5288fcaf459f298a76766b62d7af4de;hpb=e4d5a652a392c9f74501da5778a7fe161b183476;p=vpp.git diff --git a/src/vnet/map/map.c b/src/plugins/map/map.c similarity index 99% rename from src/vnet/map/map.c rename to src/plugins/map/map.c index 702b5f80e52..6d9730f3b06 100644 --- a/src/vnet/map/map.c +++ b/src/plugins/map/map.c @@ -18,9 +18,10 @@ #include #include #include -#include +#include #include - +#include +#include #include "map.h" map_main_t map_main; @@ -2245,6 +2246,12 @@ VLIB_CLI_COMMAND(show_map_fragments_command, static) = { .short_help = "show map fragments", .function = show_map_fragments_command_fn, }; + +VLIB_PLUGIN_REGISTER() = { + .version = VPP_BUILD_VER, + .description = "Mapping of address and port (MAP)", +}; + /* *INDENT-ON* */ static clib_error_t * @@ -2276,6 +2283,7 @@ clib_error_t * map_init (vlib_main_t * vm) { map_main_t *mm = &map_main; + clib_error_t *error = 0; mm->vnet_main = vnet_get_main (); mm->vlib_main = vm; @@ -2349,7 +2357,9 @@ map_init (vlib_main_t * vm) #endif map_dpo_module_init (); - return 0; + error = map_plugin_api_hookup (vm); + + return error; } VLIB_INIT_FUNCTION (map_init);