| 210 | } |
| 211 | |
| 212 | void |
| 213 | TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED) |
| 214 | { |
| 215 | int i, cc; |
| 216 | TSPluginRegistrationInfo info; |
| 217 | |
| 218 | info.plugin_name = PLUGIN_NAME; |
| 219 | info.vendor_name = "Apache Software Foundation"; |
| 220 | info.support_email = "dev@trafficserver.apache.org"; |
| 221 | |
| 222 | if (TSPluginRegister(&info) != TS_SUCCESS) { |
| 223 | TSError("[%s] Plugin registration failed", PLUGIN_NAME); |
| 224 | } |
| 225 | |
| 226 | /* Build translation table */ |
| 227 | for (i = 0, cc = 0; i < 256; i++) { |
| 228 | base64_codes[i] = 0; |
| 229 | } |
| 230 | for (i = 'A'; i <= 'Z'; i++) { |
| 231 | base64_codes[i] = cc++; |
| 232 | } |
| 233 | for (i = 'a'; i <= 'z'; i++) { |
| 234 | base64_codes[i] = cc++; |
| 235 | } |
| 236 | for (i = '0'; i <= '9'; i++) { |
| 237 | base64_codes[i] = cc++; |
| 238 | } |
| 239 | base64_codes[static_cast<unsigned>('+')] = cc++; |
| 240 | base64_codes[static_cast<unsigned>('/')] = cc++; |
| 241 | |
| 242 | TSHttpHookAdd(TS_HTTP_OS_DNS_HOOK, TSContCreate(auth_plugin, nullptr)); |
| 243 | } |
nothing calls this directly
no test coverage detected