Provided by: trafficserver-dev_5.3.0-2ubuntu2_amd64 bug

NAME

       TSPluginInit - traffic Server plugin loading and registration

SYNOPSIS

       #include <ts/ts.h>

       void TSPluginInit(int argc, const char* argv[])

       TSReturnCode TSPluginRegister(TSSDKVersion sdk_version, TSPluginRegistrationInfo* plugin_info)

DESCRIPTION

       TSPluginInit()  must  be defined by all plugins. Traffic Server calls this initialization routine when it
       loads the plugin and sets argc and argv appropriately based on the values in plugin.config.   argc  is  a
       count  of  the  number  of  arguments in the argument vector, argv. The count is at least one because the
       first argument in the argument vector is the plugins name, which must exist in order for the plugin to be
       loaded. argv is the vector of arguments. The number of arguments in  the  vector  is  argc,  and  argv[0]
       always  contains the name of the plugin shared library.  TSPluginRegister() registers the appropriate SDK
       version for your plugin.  Use this function to make sure that the version of Traffic Server on which your
       plugin is running supports the plugin.

RETURN VALUES

       TSPluginRegister() returns TS_ERROR if the plugin registration failed.

EXAMPLES

          #include <ts/ts.h>

          void
          TSPluginInit (int argc, const char *argv[])
          {
              TSPluginRegistrationInfo info;
              info.plugin_name = "hello-world";
              info.vendor_name = "MyCompany";
              info.support_email = "ts-api-support@MyCompany.com";

              if (TSPluginRegister(TS_SDK_VERSION_3_0 , &info) != TS_SUCCESS) {
                  TSError("Plugin registration failed. 0);
              }
          }

SEE ALSO

       TSAPI(3ts), TSInstallDirGet(3ts)

COPYRIGHT

       2014, dev@trafficserver.apache.org

5.3                                              April 18, 2016                                TSPLUGININIT(3ts)