Hi, I am a software developer in MakeMyTrip.com. I am creating a plugin in Apache Traffic server 3.2.0. For that below are the steps I have been followed-
1. Created a hello-world.c file #include <stdio.h> #include <ts/ts.h> int check_ts_version() { const char *ts_version = TSTrafficServerVersionGet(); int result = 0; if (ts_version) { int major_ts_version = 0; int minor_ts_version = 0; int patch_ts_version = 0; if (sscanf(ts_version, "%d.%d.%d", &major_ts_version, &minor_ts_version, &patch_ts_version) != 3) { return 0; } /* We need at least Traffic Server 2.0 */ if (major_ts_version >= 2) { result = 1; } } return result; } void TSPluginInit (int argc, const char *argv[]) { TSPluginRegistrationInfo info; info.plugin_name = "hello-world"; info.vendor_name = "MyCompany"; info.support_email = "ts-api-supp...@mycompany.com<mailto:ts-api-supp...@mycompany.com>"; if (!TSPluginRegister (TS_SDK_VERSION_2_0 , &info)) { TSError ("Plugin registration failed. \n"); } if (!check_ts_version()) { TSError ("Plugin requires Traffic Server 2.0 or later\n"); return; } TSDebug ("debug-hello", "Hello World!\n"); } 1. Compiled it with "tsxs -o hello-world.so -c hello-world.c" 2. Installed with "sudo tsxs -o hello-world.so -i" 3. Then updated my plugin.config file by just adding one line # a simple plugin.config for hello-world.so /usr/local/libexec/trafficserver/hello-world.so /usr/local/etc/trafficserver/hello-world.config 1. Then specified the path in records.config file like- CONFIG proxy.config.plugin.plugin_dir STRING /usr/local/libexec/trafficserver After these configuration I restarted my traffic server but I am unable to use this plugin. Basically I need such plugin which can categories the HTTP header user agents and I think it can be resolved by using header_filter plugin. Can you tell me the complete process for creating new plugins or use existing plugins, also tell me that how can I check whether my plugin is working on not. Kindly revert me asap. Thanks and Regards, Raj Sharma | Software Developer - Technology Development +918010833979 +918010833979 | MakeMyTrip.com, 243 SP Infocity, Udyog Vihar Phase 1, Gurgaon, Haryana - 122 016, India [Description: http://www.mailmktg.makemytrip.com/signature/images/bulb-icon.gif] What's New?: Destination Videos - Explore. Travel. Discover these inspiring destinations.<https://www.youtube.com/user/MakeMyTripOfficial> [Description: http://www.mailmktg.makemytrip.com/signature/images/MMT-signature-footer-V4.gif]<http://www.makemytrip.com/> [Description: http://www.mailmktg.makemytrip.com/signature/images/map-icon.gif]<http://www.makemytrip.com/support/gurgaon-travel-agent-office.php> Office Map [Description: http://www.mailmktg.makemytrip.com/signature/images/facebook-icon.gif]<http://www.facebook.com/pages/MakeMyTrip-Deals/120740541030?ref=search&sid=100000077980239.1422657277..1> Facebook [Description: http://www.mailmktg.makemytrip.com/signature/images/twitter-icon.gif]<http://twitter.com/makemytripdeals> Twitter [Description: http://www.mailmktg.makemytrip.com/signature/images/youtube-icon.gif]<https://www.youtube.com/user/MakeMyTripOfficial> YouTube The contents of this email, including the attachments, are PRIVILEGED AND CONFIDENTIAL to the intended recipient at the email address to which it has been addressed. If you receive it in error, please notify the sender immediately by return email and then permanently delete it from your system. The unauthorized use, distribution, copying or alteration of this email, including the attachments, is strictly forbidden. Please note that neither MakeMyTrip nor the sender accepts any responsibility for viruses and it is your responsibility to scan the email and attachments (if any). No contracts may be concluded on behalf of MakeMyTrip by means of email communications.