MCPcopy Create free account
hub / github.com/apache/trafficserver / TSPluginInit

Function TSPluginInit

plugins/authproxy/authproxy.cc:794–816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792#undef LONGOPT_OPTION_CAST
793
794void
795TSPluginInit(int argc, const char *argv[])
796{
797 TSPluginRegistrationInfo info;
798
799 info.plugin_name = (char *)"authproxy";
800 info.vendor_name = (char *)"Apache Software Foundation";
801 info.support_email = (char *)"dev@trafficserver.apache.org";
802
803 if (TSPluginRegister(&info) != TS_SUCCESS) {
804 AuthLogError("plugin registration failed");
805 }
806
807 TSReleaseAssert(TSUserArgIndexReserve(TS_USER_ARGS_TXN, "AuthProxy", "AuthProxy authorization tag", &AuthTaggedRequestArg) ==
808 TS_SUCCESS);
809
810 AuthOsDnsContinuation = TSContCreate(AuthProxyGlobalHook, nullptr);
811 AuthGlobalOptions = AuthParseOptions(argc, argv);
812 AuthLogDebug("using authorization proxy at %s:%d", AuthGlobalOptions->hostname.c_str(), AuthGlobalOptions->hostport);
813
814 // Use the appropriate hook for consistent auth checks.
815 TSHttpHookAdd(TS_HTTP_POST_REMAP_HOOK, AuthOsDnsContinuation);
816}
817
818TSReturnCode
819TSRemapInit(TSRemapInterface * /* api ATS_UNUSED */, char * /* err ATS_UNUSED */, int /* errsz ATS_UNUSED */)

Callers

nothing calls this directly

Calls 6

TSPluginRegisterFunction · 0.85
TSUserArgIndexReserveFunction · 0.85
TSContCreateFunction · 0.85
AuthParseOptionsFunction · 0.85
TSHttpHookAddFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected