Skip to main content

vlib_plugin_register

Macro vlib_plugin_register 

Source
vlib_plugin_register!() { /* proc-macro */ }
Expand description

Register the plugin so that it can be loaded by VPP

Must only be done once per shared object, or linker errors will result.

§Attributes

  • version: (required, string literal) The version string of the plugin. Must be at most 63 characters.
  • description: (optional, string literal) A description of the plugin.
  • version_required: (optional, &'static str constant expression) VPP refuses to load the plugin unless its own build version starts with this string (a prefix match, not equality); typically vpp_plugin::VPP_BUILD_VER, the build it was compiled against. At most 63 characters, checked at compile time.

§Examples

vlib_plugin_register! {
    version: "1.0",
    description: "Example",
}