You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2010/11/30 02:43:06 UTC

svn commit: r1040383 [37/38] - in /trafficserver/traffic/branches/wccp: ./ build/ contrib/ contrib/perl/AdminClient/lib/Apache/TS/ example/ example/add-header/ example/app-template/ example/append-transform/ example/basic-auth/ example/blacklist-0/ exa...

Modified: trafficserver/traffic/branches/wccp/test/plugin/session-2/session_2_spec.htm
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/session-2/session_2_spec.htm?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/session-2/session_2_spec.htm (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/session-2/session_2_spec.htm Tue Nov 30 01:42:55 2010
@@ -27,28 +27,28 @@
 <p><b><font size="+1">Overview</font></b></p>
 <p>This plugin covers the APIs in the following categories:</p>
 <ul>
-  <li> INKHttpSsn*</li>
-  <li> INKConfig*</li>
-  <li> INKStat*</li>
-  <li>INKThread*</li>
+  <li> TSHttpSsn*</li>
+  <li> TSConfig*</li>
+  <li> TSStat*</li>
+  <li>TSThread*</li>
 </ul>
 <p>It does the following things:</p>
 <ol>
   <li>Create a thread and destroy it.</li>
-  <li>Create three INKStat statistic variables transaction_count, session_count 
+  <li>Create three TSStat statistic variables transaction_count, session_count 
     and avg_transactions and update them at every new session or transaction.</li>
-  <li>Play with INKConfig family of functions to set and get config data.</li>
+  <li>Play with TSConfig family of functions to set and get config data.</li>
 </ol>
 <p><font size="+1"><b>Plugin Specification</b></font></p>
-<p>In INKPluginInit(), the plugin creates a thread, waits for 5 seconds and destroys 
-  it. It creates three INKStat statistic variables: transaction_count, session_count 
+<p>In TSPluginInit(), the plugin creates a thread, waits for 5 seconds and destroys 
+  it. It creates three TSStat statistic variables: transaction_count, session_count 
   and avg_transactions. It also creates a ConfigData with one element num_ssns 
-  and sets it to INKConfig. Then it registers a handler function for the global 
-  hook INK_HTTP_SSN_START_HOOK.</p>
-<p>On INK_HTTP_SSN_START_HOOK, it increments the INKStat statistic variable session_count 
-  and num_ssns in INKConfig. Then it prints out both values. It adds a session 
-  hook INK_HTTP_TXN_START_HOOK.</p>
-<p>The handler function on INK_HTTP_TXN_START_HOOK increments transaction_count 
+  and sets it to TSConfig. Then it registers a handler function for the global 
+  hook TS_HTTP_SSN_START_HOOK.</p>
+<p>On TS_HTTP_SSN_START_HOOK, it increments the TSStat statistic variable session_count 
+  and num_ssns in TSConfig. Then it prints out both values. It adds a session 
+  hook TS_HTTP_TXN_START_HOOK.</p>
+<p>The handler function on TS_HTTP_TXN_START_HOOK increments transaction_count 
   and recalculates avg_transactions, then prints out both values.</p>
 <p>&nbsp;</p>
 </body>

Modified: trafficserver/traffic/branches/wccp/test/plugin/test-mgmt/test-mgmt.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/test-mgmt/test-mgmt.c?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/test-mgmt/test-mgmt.c (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/test-mgmt/test-mgmt.c Tue Nov 30 01:42:55 2010
@@ -25,12 +25,12 @@
  * test-mgmt:
  * This sample plugins calls the Plugin Management APIs
  * The API covered in this plugin are -
- * 		- INKMgmtCounterGet
- *		- INKMgmtFloatGet
- * 		- INKMgmtIntGet
- * 		- INKMgmtSringGet
- * 		- INKInstallDirGet
- *		- INKPluginDirGet
+ * 		- TSMgmtCounterGet
+ *		- TSMgmtFloatGet
+ * 		- TSMgmtIntGet
+ * 		- TSMgmtSringGet
+ * 		- TSInstallDirGet
+ *		- TSPluginDirGet
  **************************************************************/
 
 #include <stdio.h>
@@ -54,11 +54,11 @@
 const char *counterVariables[] = {
   "proxy.process.socks.connections_unsuccessful",
   "proxy.process.socks.connections_successful",
-  "proxy.process.log2.log_files_open",
-  "proxy.process.log2.event_log_error",
-  "proxy.process.log2.event_log_access",
-  "proxy.process.log2.event_log_access_fail",
-  "proxy.process.log2.event_log_access_skip",
+  "proxy.process.log.log_files_open",
+  "proxy.process.log.event_log_error",
+  "proxy.process.log.event_log_access",
+  "proxy.process.log.event_log_access_fail",
+  "proxy.process.log.event_log_access_skip",
   '\0'
 };
 
@@ -223,32 +223,31 @@ const char *intVariables[] = {
   "proxy.config.hostdb.ttl_mode",
   "proxy.config.hostdb.timeout",
   "proxy.config.hostdb.strict_round_robin",
-  "proxy.config.log2.logging_enabled",
-  "proxy.config.log2.max_secs_per_buffer",
-  "proxy.config.log2.max_space_mb_for_logs",
-  "proxy.config.log2.max_space_mb_for_orphan_logs",
-  "proxy.config.log2.max_space_mb_headroom",
-  "proxy.config.log2.custom_logs_enabled",
-  "proxy.config.log2.xml_logs_config",
-  "proxy.config.log2.squid_log_enabled",
-  "proxy.config.log2.squid_log_is_ascii",
-  "proxy.config.log2.common_log_enabled",
-  "proxy.config.log2.common_log_is_ascii",
-  "proxy.config.log2.extended_log_enabled",
-  "proxy.config.log2.extended_log_is_ascii",
-  "proxy.config.log2.extended2_log_enabled",
-  "proxy.config.log2.extended2_log_is_ascii",
-  "proxy.config.log2.separate_icp_logs",
-  "proxy.config.log2.separate_host_logs",
-  "roxy.local.log2.collation_mode",
-  "proxy.config.log2.collation_port",
-  "proxy.config.log2.collation_host_tagged",
-  "proxy.config.log2.collation_retry_sec",
-  "proxy.config.log2.rolling_enabled",
-  "proxy.config.log2.rolling_interval_sec",
-  "proxy.config.log2.rolling_offset_hr",
-  "proxy.config.log2.auto_delete_rolled_files",
-  "proxy.config.log2.sampling_frequency",
+  "proxy.config.log.logging_enabled",
+  "proxy.config.log.max_secs_per_buffer",
+  "proxy.config.log.max_space_mb_for_logs",
+  "proxy.config.log.max_space_mb_for_orphan_logs",
+  "proxy.config.log.max_space_mb_headroom",
+  "proxy.config.log.custom_logs_enabled",
+  "proxy.config.log.squid_log_enabled",
+  "proxy.config.log.squid_log_is_ascii",
+  "proxy.config.log.common_log_enabled",
+  "proxy.config.log.common_log_is_ascii",
+  "proxy.config.log.extended_log_enabled",
+  "proxy.config.log.extended_log_is_ascii",
+  "proxy.config.log.extended2_log_enabled",
+  "proxy.config.log.extended2_log_is_ascii",
+  "proxy.config.log.separate_icp_logs",
+  "proxy.config.log.separate_host_logs",
+  "proxy.local.log.collation_mode",
+  "proxy.config.log.collation_port",
+  "proxy.config.log.collation_host_tagged",
+  "proxy.config.log.collation_retry_sec",
+  "proxy.config.log.rolling_enabled",
+  "proxy.config.log.rolling_interval_sec",
+  "proxy.config.log.rolling_offset_hr",
+  "proxy.config.log.auto_delete_rolled_files",
+  "proxy.config.log.sampling_frequency",
   "proxy.config.reverse_proxy.enabled",
   "proxy.config.url_remap.default_to_server_pac",
   "proxy.config.url_remap.default_to_server_pac_port",
@@ -299,7 +298,7 @@ const char *stringVariables[] = {
   "proxy.config.header.parse.no_host_url_redirect",
   "proxy.config.http.server_port_attr",
   "proxy.config.http.server_other_ports",
-  "proxy.config.http.ssl_ports",
+  "proxy.config.http.connect_ports",
   "proxy.config.http.parent_proxies",
   "proxy.config.http.anonymize_other_header_list",
   "proxy.config.http.cache.vary_default_text",
@@ -309,19 +308,19 @@ const char *stringVariables[] = {
   "proxy.config.cluster.ethernet_interface",
   "proxy.config.dns.splitdns.def_domain",
   "proxy.config.dns.url_expansions",
-  "proxy.config.log2.hostname",
-  "proxy.config.log2.logfile_dir",
-  "proxy.config.log2.logfile_perm",
-  "proxy.config.log2.squid_log_name",
-  "proxy.config.log2.squid_log_header",
-  "proxy.config.log2.common_log_name",
-  "proxy.config.log2.common_log_header",
-  "proxy.config.log2.extended_log_name",
-  "proxy.config.log2.extended_log_header",
-  "proxy.config.log2.extended2_log_name",
-  "proxy.config.log2.extended2_log_header",
-  "proxy.config.log2.collation_host",
-  "proxy.config.log2.collation_secret",
+  "proxy.config.log.hostname",
+  "proxy.config.log.logfile_dir",
+  "proxy.config.log.logfile_perm",
+  "proxy.config.log.squid_log_name",
+  "proxy.config.log.squid_log_header",
+  "proxy.config.log.common_log_name",
+  "proxy.config.log.common_log_header",
+  "proxy.config.log.extended_log_name",
+  "proxy.config.log.extended_log_header",
+  "proxy.config.log.extended2_log_name",
+  "proxy.config.log.extended2_log_header",
+  "proxy.config.log.collation_host",
+  "proxy.config.log.collation_secret",
   "proxy.config.ssl.server.cert.filename",
   "proxy.config.ssl.server.cert.path",
   "proxy.config.ssl.server.private_key.filename",
@@ -355,10 +354,10 @@ static void
 handleTxnStart()
 {
   const char **p;
-  INKMgmtCounter counterValue = 0;
-  INKMgmtFloat floatValue = 0.0;
-  INKMgmtInt intValue = 0;
-  INKMgmtString stringValue = '\0';
+  TSMgmtCounter counterValue = 0;
+  TSMgmtFloat floatValue = 0.0;
+  TSMgmtInt intValue = 0;
+  TSMgmtString stringValue = '\0';
 
   char errorLine[STRING_SIZE];
 
@@ -367,16 +366,16 @@ handleTxnStart()
 
   /* Print each of the COUNTER variables */
 
-  INKDebug(PLUGIN_NAME, "\n============= COUNTER =============");
+  TSDebug(PLUGIN_NAME, "\n============= COUNTER =============");
 
   p = counterVariables;
 
   while (*p) {
-    if (!INKMgmtCounterGet(*p, &counterValue)) {
+    if (!TSMgmtCounterGet(*p, &counterValue)) {
       sprintf(errorLine, "ERROR: couldn't retrieve [%s] ", *p);
-      LOG_AUTO_ERROR("INKMgmtCounterGet", errorLine);
+      LOG_AUTO_ERROR("TSMgmtCounterGet", errorLine);
     } else {
-      INKDebug(PLUGIN_NAME, "%s = %lld", *p, counterValue);
+      TSDebug(PLUGIN_NAME, "%s = %lld", *p, counterValue);
     }
 
     *p++;
@@ -384,16 +383,16 @@ handleTxnStart()
 
   /* Print each of the FLOAT variables */
 
-  INKDebug(PLUGIN_NAME, "\n============= FLOAT =============");
+  TSDebug(PLUGIN_NAME, "\n============= FLOAT =============");
 
   p = floatVariables;
 
   while (*p) {
-    if (!INKMgmtFloatGet(*p, &floatValue)) {
+    if (!TSMgmtFloatGet(*p, &floatValue)) {
       sprintf(errorLine, "ERROR: couldn't retrieve [%s] ", *p);
-      LOG_AUTO_ERROR("INKMgmtFloatGet", errorLine);
+      LOG_AUTO_ERROR("TSMgmtFloatGet", errorLine);
     } else {
-      INKDebug(PLUGIN_NAME, "%s = %f", *p, floatValue);
+      TSDebug(PLUGIN_NAME, "%s = %f", *p, floatValue);
     }
 
     *p++;
@@ -401,16 +400,16 @@ handleTxnStart()
 
   /* Print each of the FLOAT variables */
 
-  INKDebug(PLUGIN_NAME, "\n============= INT =============");
+  TSDebug(PLUGIN_NAME, "\n============= INT =============");
 
   p = intVariables;
 
   while (*p) {
-    if (!INKMgmtIntGet(*p, &intValue)) {
+    if (!TSMgmtIntGet(*p, &intValue)) {
       sprintf(errorLine, "ERROR: couldn't retrieve [%s] ", *p);
-      LOG_AUTO_ERROR("INKMgmtIntGet", errorLine);
+      LOG_AUTO_ERROR("TSMgmtIntGet", errorLine);
     } else {
-      INKDebug(PLUGIN_NAME, "%s = %lld", *p, intValue);
+      TSDebug(PLUGIN_NAME, "%s = %lld", *p, intValue);
     }
 
     *p++;
@@ -418,16 +417,16 @@ handleTxnStart()
 
   /* Print each of the FLOAT variables */
 
-  INKDebug(PLUGIN_NAME, "\n============= STRING =============");
+  TSDebug(PLUGIN_NAME, "\n============= STRING =============");
 
   p = stringVariables;
 
   while (*p) {
-    if (INKMgmtStringGet(*p, &stringValue)) {
+    if (TSMgmtStringGet(*p, &stringValue)) {
       sprintf(errorLine, "ERROR: couldn't retrieve [%s] ", *p);
-      LOG_AUTO_ERROR("INKMgmtStringGet", errorLine);
+      LOG_AUTO_ERROR("TSMgmtStringGet", errorLine);
     } else {
-      INKDebug(PLUGIN_NAME, "%s = %s", *p, stringValue);
+      TSDebug(PLUGIN_NAME, "%s = %s", *p, stringValue);
     }
 
     *p++;
@@ -437,10 +436,10 @@ handleTxnStart()
 
 
 void
-INKPluginInit(int argc, const char *argv[])
+TSPluginInit(int argc, const char *argv[])
 {
-  const char *ts_install_dir = INKInstallDirGet();
-  const char *plugin_dir = INKPluginDirGet();
+  const char *ts_install_dir = TSInstallDirGet();
+  const char *plugin_dir = TSPluginDirGet();
 
   /* Print the Traffic Server install and the plugin directory */
   printf("TS install dir: %s\n", ts_install_dir);

Modified: trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.c?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.c (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.c Tue Nov 30 01:42:55 2010
@@ -23,106 +23,106 @@
 
 #include "test-protocol.h"
 
-static INKAction actionp;
+static TSAction actionp;
 
 /*
  * Cleanup continuation data and destroy the continuation
  */
 static void
-clean_and_exit(INKCont contp)
+clean_and_exit(TSCont contp)
 {
   LOG_SET_FUNCTION_NAME("clean_and_exit");
 
-  ConnData *conn_data = (ConnData *) INKContDataGet(contp);
+  ConnData *conn_data = (ConnData *) TSContDataGet(contp);
 
-  INKDebug(DEBUG_TAG, "Entered clean_and_exit");
+  TSDebug(DEBUG_TAG, "Entered clean_and_exit");
 
-  if (conn_data->pending_action && !INKActionDone(conn_data->pending_action)) {
-    INKActionCancel(conn_data->pending_action);
+  if (conn_data->pending_action && !TSActionDone(conn_data->pending_action)) {
+    TSActionCancel(conn_data->pending_action);
   }
 
   if (conn_data->client_vconn) {
-    INKVConnClose(conn_data->client_vconn);
+    TSVConnClose(conn_data->client_vconn);
   }
 
   if (conn_data->client_request) {
-    INKfree(conn_data->client_request);
+    TSfree(conn_data->client_request);
   }
 
   if (conn_data->client_response) {
-    INKfree(conn_data->client_response);
+    TSfree(conn_data->client_response);
   }
 
   if (conn_data->pattern) {
-    INKfree(conn_data->pattern);
+    TSfree(conn_data->pattern);
   }
 
   if (conn_data->client_request_buffer) {
     if (conn_data->client_request_buffer_reader) {
-      INKIOBufferReaderFree(conn_data->client_request_buffer_reader);
+      TSIOBufferReaderFree(conn_data->client_request_buffer_reader);
     }
-    INKIOBufferDestroy(conn_data->client_request_buffer);
+    TSIOBufferDestroy(conn_data->client_request_buffer);
   }
 
   if (conn_data->client_response_buffer) {
     if (conn_data->client_response_buffer_reader) {
-      INKIOBufferReaderFree(conn_data->client_response_buffer_reader);
+      TSIOBufferReaderFree(conn_data->client_response_buffer_reader);
     }
-    INKIOBufferDestroy(conn_data->client_response_buffer);
+    TSIOBufferDestroy(conn_data->client_response_buffer);
   }
 
-  INKfree(conn_data);
-  INKContDestroy(contp);
+  TSfree(conn_data);
+  TSContDestroy(contp);
 }
 
 /*
  * Get the remote ip and port of the net vconnection
  */
 static void
-get_remote_ip(INKVConn client_vconn)
+get_remote_ip(TSVConn client_vconn)
 {
   LOG_SET_FUNCTION_NAME("get_remote_ip");
 
   unsigned int ip;
   int port;
 
-  INKDebug(DEBUG_TAG, "Entered get_remote_ip");
+  TSDebug(DEBUG_TAG, "Entered get_remote_ip");
 
   /* get the remote ip */
-  if (INKNetVConnRemoteIPGet(client_vconn, &ip) == INK_SUCCESS) {
-    if (INKTextLogObjectWrite(plugin_log, "Netvconn remote ip: %d", ip) != INK_SUCCESS) {
-      LOG_ERROR("INKTextLogObjectWrite");
+  if (TSNetVConnRemoteIPGet(client_vconn, &ip) == TS_SUCCESS) {
+    if (TSTextLogObjectWrite(plugin_log, "Netvconn remote ip: %d", ip) != TS_SUCCESS) {
+      LOG_ERROR("TSTextLogObjectWrite");
     }
   } else {
-    LOG_ERROR("INKNetVConnRemoteIPGet");
+    LOG_ERROR("TSNetVConnRemoteIPGet");
   }
 
-  /* negative test for INKNetVConnRemoteIPGet */
+  /* negative test for TSNetVConnRemoteIPGet */
 #ifdef DEBUG
-  if (INKNetVConnRemoteIPGet(NULL, &ip) != INK_ERROR) {
-    LOG_ERROR_NEG("INKNetVConnRemoteIPGet(NULL,...)");
+  if (TSNetVConnRemoteIPGet(NULL, &ip) != TS_ERROR) {
+    LOG_ERROR_NEG("TSNetVConnRemoteIPGet(NULL,...)");
   }
 #endif
 
   /* get the remote port */
-  if (INKNetVConnRemotePortGet(client_vconn, &port) == INK_SUCCESS) {
-    if (INKTextLogObjectWrite(plugin_log, "Netvconn remote port: %d", port) != INK_SUCCESS) {
-      LOG_ERROR("INKTextLogObjectWrite");
+  if (TSNetVConnRemotePortGet(client_vconn, &port) == TS_SUCCESS) {
+    if (TSTextLogObjectWrite(plugin_log, "Netvconn remote port: %d", port) != TS_SUCCESS) {
+      LOG_ERROR("TSTextLogObjectWrite");
     }
   } else {
-    LOG_ERROR("INKNetVConnRemotePortGet");
+    LOG_ERROR("TSNetVConnRemotePortGet");
   }
 
-  /* negative test for INKNetVConnRemotePortGet */
+  /* negative test for TSNetVConnRemotePortGet */
 #ifdef DEBUG
-  if (INKNetVConnRemotePortGet(NULL, &port) != INK_ERROR) {
-    LOG_ERROR_NEG("INKNetVConnRemotePortGet(NULL,...)");
+  if (TSNetVConnRemotePortGet(NULL, &port) != TS_ERROR) {
+    LOG_ERROR_NEG("TSNetVConnRemotePortGet(NULL,...)");
   }
 #endif
 
   /* flush the log */
-  if (INKTextLogObjectFlush(plugin_log) != INK_SUCCESS) {
-    LOG_ERROR("INKTextLogObjectFlush");
+  if (TSTextLogObjectFlush(plugin_log) != TS_SUCCESS) {
+    LOG_ERROR("TSTextLogObjectFlush");
   }
 }
 
@@ -134,8 +134,8 @@ parse_request(ConnData * conn_data)
 
   char *temp = strtok(conn_data->client_request, " ");
 
-  INKDebug(DEBUG_TAG, "Entered parse_request");
-  INKDebug(DEBUG_TAG, "client request: \n%s", conn_data->client_request);
+  TSDebug(DEBUG_TAG, "Entered parse_request");
+  TSDebug(DEBUG_TAG, "client request: \n%s", conn_data->client_request);
 
   if ((temp != NULL) && (strlen(temp) <= MAX_PATTERN_LENGTH))
     strcpy(conn_data->pattern, temp);
@@ -160,27 +160,27 @@ log_request(ConnData * conn_data)
 {
   LOG_SET_FUNCTION_NAME("log_request");
 
-  INKDebug(DEBUG_TAG, "Entered log_request");
+  TSDebug(DEBUG_TAG, "Entered log_request");
 
   /* write to the log object */
-  if (INKTextLogObjectWrite(plugin_log, "Client request: %s %d", conn_data->pattern, conn_data->number) != INK_SUCCESS) {
-    LOG_ERROR("INKTextLogObjectWrite");
+  if (TSTextLogObjectWrite(plugin_log, "Client request: %s %d", conn_data->pattern, conn_data->number) != TS_SUCCESS) {
+    LOG_ERROR("TSTextLogObjectWrite");
   }
 
-  /* negative test for INKTextLogObjectWrite */
+  /* negative test for TSTextLogObjectWrite */
 #ifdef DEBUG
-  if (INKTextLogObjectWrite(NULL, "negative test") != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectWrite(NULL,...)");
+  if (TSTextLogObjectWrite(NULL, "negative test") != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectWrite(NULL,...)");
   }
 #endif
 
   /* flush the log object */
-  if (INKTextLogObjectFlush(plugin_log) != INK_SUCCESS) {
-    LOG_ERROR("INKTextLogObjectFlush");
+  if (TSTextLogObjectFlush(plugin_log) != TS_SUCCESS) {
+    LOG_ERROR("TSTextLogObjectFlush");
   }
 #ifdef DEBUG
-  if (INKTextLogObjectFlush(NULL) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectFlush(NULL)");
+  if (TSTextLogObjectFlush(NULL) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectFlush(NULL)");
   }
 #endif
 
@@ -196,43 +196,43 @@ generate_response(ConnData * conn_data)
 
   int response_length, i;
 
-  INKDebug(DEBUG_TAG, "Entered generate_response");
+  TSDebug(DEBUG_TAG, "Entered generate_response");
 
   /* repeat the pattern in number of times and save it to conn_data->client_response */
   response_length = conn_data->number * strlen(conn_data->pattern) + 1;
-  conn_data->client_response = (char *) INKmalloc(response_length * sizeof(char));
+  conn_data->client_response = (char *) TSmalloc(response_length * sizeof(char));
   conn_data->client_response[0] = '\0';
 
   for (i = 0; i < conn_data->number; i++) {
     strcat(conn_data->client_response, conn_data->pattern);
   }
 
-  INKDebug(DEBUG_TAG, "client response is:\n%s\n", conn_data->client_response);
+  TSDebug(DEBUG_TAG, "client response is:\n%s\n", conn_data->client_response);
 }
 
 /*
- * callback function for INKVConnWrite
+ * callback function for TSVConnWrite
  */
 int
-send_response_handler(INKCont contp, INKEvent event, void *data)
+send_response_handler(TSCont contp, TSEvent event, void *data)
 {
   LOG_SET_FUNCTION_NAME("send_response_handler");
 
   ConnData *conn_data;
 
-  conn_data = (ConnData *) INKContDataGet(contp);
+  conn_data = (ConnData *) TSContDataGet(contp);
 
-  INKDebug(DEBUG_TAG, "Entered send_response_handler");
+  TSDebug(DEBUG_TAG, "Entered send_response_handler");
 
   switch (event) {
-  case INK_EVENT_VCONN_WRITE_READY:
-    if (INKVIOReenable(conn_data->client_write_vio) != INK_SUCCESS) {
-      LOG_ERROR("INKVIOReenable");
+  case TS_EVENT_VCONN_WRITE_READY:
+    if (TSVIOReenable(conn_data->client_write_vio) != TS_SUCCESS) {
+      LOG_ERROR("TSVIOReenable");
       clean_and_exit(contp);
       return -1;
     }
     break;
-  case INK_EVENT_VCONN_WRITE_COMPLETE:
+  case TS_EVENT_VCONN_WRITE_COMPLETE:
     clean_and_exit(contp);
     break;
   default:
@@ -248,113 +248,113 @@ send_response_handler(INKCont contp, INK
  * Send response to teh client
  */
 static void
-send_response(ConnData * conn_data, INKCont contp)
+send_response(ConnData * conn_data, TSCont contp)
 {
   LOG_SET_FUNCTION_NAME("send_response");
 
   int copied_length;
 
-  INKDebug(DEBUG_TAG, "Entered send_response");
+  TSDebug(DEBUG_TAG, "Entered send_response");
 
-  /* negative test for INKIOBufferSizedCreate */
+  /* negative test for TSIOBufferSizedCreate */
 #ifdef DEBUG
-  if (INKIOBufferSizedCreate(-1) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKIOBufferSizedCreate(-1)");
+  if (TSIOBufferSizedCreate(-1) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSIOBufferSizedCreate(-1)");
   }
 #endif
 
   /* create the response IOBuffer */
-  conn_data->client_response_buffer = INKIOBufferSizedCreate(INK_IOBUFFER_SIZE_INDEX_1K);
+  conn_data->client_response_buffer = TSIOBufferSizedCreate(TS_IOBUFFER_SIZE_INDEX_1K);
 
-  if (conn_data->client_response_buffer == INK_ERROR_PTR || conn_data->client_response_buffer == NULL) {
-    LOG_ERROR("INKIOBufferSizedCreate");
+  if (conn_data->client_response_buffer == TS_ERROR_PTR || conn_data->client_response_buffer == NULL) {
+    LOG_ERROR("TSIOBufferSizedCreate");
     clean_and_exit(contp);
     return;
   }
 
   /* get the IOBuffer reader */
   if ((conn_data->client_response_buffer_reader =
-       INKIOBufferReaderAlloc(conn_data->client_response_buffer)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKIOBufferReaderAlloc");
+       TSIOBufferReaderAlloc(conn_data->client_response_buffer)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSIOBufferReaderAlloc");
     clean_and_exit(contp);
     return;
   }
 
-  /* negative test for INKIOBufferWrite */
+  /* negative test for TSIOBufferWrite */
 #ifdef DEBUG
-  if (INKIOBufferWrite(NULL, conn_data->client_response, strlen(conn_data->client_response)) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWrite(NULL,...)");
+  if (TSIOBufferWrite(NULL, conn_data->client_response, strlen(conn_data->client_response)) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWrite(NULL,...)");
   }
-  if (INKIOBufferWrite(conn_data->client_response_buffer, NULL, strlen(conn_data->client_response)) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWrite(conn_data->client_response_buffer,NULL,...)");
+  if (TSIOBufferWrite(conn_data->client_response_buffer, NULL, strlen(conn_data->client_response)) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWrite(conn_data->client_response_buffer,NULL,...)");
   }
 #endif
 
   /* copy the response to the IOBuffer */
   copied_length =
-    INKIOBufferWrite(conn_data->client_response_buffer, conn_data->client_response, strlen(conn_data->client_response));
+    TSIOBufferWrite(conn_data->client_response_buffer, conn_data->client_response, strlen(conn_data->client_response));
 
-  if (copied_length == INK_ERROR) {
-    LOG_ERROR("INKIOBufferWrite");
+  if (copied_length == TS_ERROR) {
+    LOG_ERROR("TSIOBufferWrite");
     clean_and_exit(contp);
     return;
   }
 
   /* send the response to the client */
   conn_data->current_handler = &send_response_handler;
-  if ((conn_data->client_write_vio = INKVConnWrite(conn_data->client_vconn, contp,
+  if ((conn_data->client_write_vio = TSVConnWrite(conn_data->client_vconn, contp,
                                                    conn_data->client_response_buffer_reader,
-                                                   copied_length)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKVConnWrite");
+                                                   copied_length)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSVConnWrite");
     clean_and_exit(contp);
     return;
   }
 }
 
 /*
- * callback function for INKVConnRead
+ * callback function for TSVConnRead
  */
 int
-read_request_handler(INKCont contp, INKEvent event, void *data)
+read_request_handler(TSCont contp, TSEvent event, void *data)
 {
   LOG_SET_FUNCTION_NAME("read_request_handler");
 
   ConnData *conn_data;
   int read_avail, output_len, block_avail;
-  INKIOBufferBlock block;
+  TSIOBufferBlock block;
   char *buf = NULL;
   const char *block_start;
 
-  conn_data = (ConnData *) INKContDataGet(contp);
+  conn_data = (ConnData *) TSContDataGet(contp);
 
-  INKDebug(DEBUG_TAG, "Entered read_request_handler");
+  TSDebug(DEBUG_TAG, "Entered read_request_handler");
 
   switch (event) {
-  case INK_EVENT_VCONN_READ_READY:
+  case TS_EVENT_VCONN_READ_READY:
 
-    if ((read_avail = INKIOBufferReaderAvail(conn_data->client_request_buffer_reader)) == INK_ERROR) {
-      LOG_ERROR("INKIOBufferReaderAvail");
+    if ((read_avail = TSIOBufferReaderAvail(conn_data->client_request_buffer_reader)) == TS_ERROR) {
+      LOG_ERROR("TSIOBufferReaderAvail");
       clean_and_exit(contp);
       return -1;
     }
 
-    INKDebug(DEBUG_TAG, "read_avail = %d \n", read_avail);
+    TSDebug(DEBUG_TAG, "read_avail = %d \n", read_avail);
 
     if (read_avail > 0) {
       /* copy the partly read client request from IOBuffer to conn_data->client_request */
-      buf = (char *) INKmalloc(read_avail + 1);
+      buf = (char *) TSmalloc(read_avail + 1);
 
       output_len = 0;
       while (read_avail > 0) {
-        if ((block = INKIOBufferReaderStart(conn_data->client_request_buffer_reader)) == INK_ERROR_PTR) {
-          LOG_ERROR("INKIOBufferReaderStart");
+        if ((block = TSIOBufferReaderStart(conn_data->client_request_buffer_reader)) == TS_ERROR_PTR) {
+          LOG_ERROR("TSIOBufferReaderStart");
           clean_and_exit(contp);
           return -1;
         }
         if ((block_start =
-             (char *) INKIOBufferBlockReadStart(block, conn_data->client_request_buffer_reader,
-                                                &block_avail)) == INK_ERROR_PTR) {
-          LOG_ERROR("INKIOBufferBlockReadStart");
+             (char *) TSIOBufferBlockReadStart(block, conn_data->client_request_buffer_reader,
+                                                &block_avail)) == TS_ERROR_PTR) {
+          LOG_ERROR("TSIOBufferBlockReadStart");
           clean_and_exit(contp);
           return -1;
         }
@@ -365,8 +365,8 @@ read_request_handler(INKCont contp, INKE
 
         memcpy(buf + output_len, block_start, block_avail);
         output_len += block_avail;
-        if (INKIOBufferReaderConsume(conn_data->client_request_buffer_reader, block_avail) != INK_SUCCESS) {
-          LOG_ERROR("INKIOBufferReaderConsume");
+        if (TSIOBufferReaderConsume(conn_data->client_request_buffer_reader, block_avail) != TS_SUCCESS) {
+          LOG_ERROR("TSIOBufferReaderConsume");
           clean_and_exit(contp);
           return -1;
         }
@@ -375,14 +375,14 @@ read_request_handler(INKCont contp, INKE
       buf[output_len] = '\0';
 
       if ((strlen(conn_data->client_request) + strlen(buf)) > MAX_REQUEST_LENGTH) {
-        INKDebug(PLUGIN_NAME, "Client request length exceeds the limit");
+        TSDebug(PLUGIN_NAME, "Client request length exceeds the limit");
         clean_and_exit(contp);
         return -1;
       }
 
       strcat(conn_data->client_request, buf);
 
-      INKfree(buf);
+      TSfree(buf);
 
       /* check if the end of the client request has been reached */
       if (strstr(conn_data->client_request, "\r\n\r\n") != NULL) {
@@ -399,8 +399,8 @@ read_request_handler(INKCont contp, INKE
     }
 
     /* continue reading data from the client */
-    if (INKVIOReenable(conn_data->client_read_vio) == INK_ERROR) {
-      LOG_ERROR("INKVIOReenable");
+    if (TSVIOReenable(conn_data->client_read_vio) == TS_ERROR) {
+      LOG_ERROR("TSVIOReenable");
       clean_and_exit(contp);
       return -1;
     }
@@ -414,62 +414,62 @@ read_request_handler(INKCont contp, INKE
 }
 
 int
-start_handler(INKCont contp, INKEvent event, void *data)
+start_handler(TSCont contp, TSEvent event, void *data)
 {
   LOG_SET_FUNCTION_NAME("start_handler");
 
   ConnData *conn_data;
   int watermark;
 
-  conn_data = (ConnData *) INKContDataGet(contp);
+  conn_data = (ConnData *) TSContDataGet(contp);
 
-  INKDebug(DEBUG_TAG, "Entered start_handler");
+  TSDebug(DEBUG_TAG, "Entered start_handler");
 
   /* create client request IOBuffer and buffer reader */
-  if ((conn_data->client_request_buffer = INKIOBufferCreate()) == INK_ERROR_PTR) {
-    LOG_ERROR("INKIOBufferCreate");
+  if ((conn_data->client_request_buffer = TSIOBufferCreate()) == TS_ERROR_PTR) {
+    LOG_ERROR("TSIOBufferCreate");
     clean_and_exit(contp);
     return -1;
   }
   if ((conn_data->client_request_buffer_reader =
-       INKIOBufferReaderAlloc(conn_data->client_request_buffer)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKIOBufferReaderAlloc");
+       TSIOBufferReaderAlloc(conn_data->client_request_buffer)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSIOBufferReaderAlloc");
     clean_and_exit(contp);
     return -1;
   }
 
-  /* negative test cases for INKIOBufferWaterMarkSet */
+  /* negative test cases for TSIOBufferWaterMarkSet */
 #ifdef DEBUG
-  if (INKIOBufferWaterMarkSet(NULL, WATER_MARK) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWaterMarkSet(NULL,...)");
+  if (TSIOBufferWaterMarkSet(NULL, WATER_MARK) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWaterMarkSet(NULL,...)");
   }
-  if (INKIOBufferWaterMarkSet(conn_data->client_request_buffer, -1) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWaterMarkSet(conn_data->client_request_buffer,-1)");
+  if (TSIOBufferWaterMarkSet(conn_data->client_request_buffer, -1) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWaterMarkSet(conn_data->client_request_buffer,-1)");
   }
 #endif
-  /* negative test cases for INKIOBufferWaterMarkGet */
+  /* negative test cases for TSIOBufferWaterMarkGet */
 #ifdef DEBUG
-  if (INKIOBufferWaterMarkGet(NULL, &watermark) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWaterMarkGet(NULL,...)");
+  if (TSIOBufferWaterMarkGet(NULL, &watermark) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWaterMarkGet(NULL,...)");
   }
 #endif
 
   /* set the watermark of the client request iobuffer */
-  if (INKIOBufferWaterMarkSet(conn_data->client_request_buffer, WATER_MARK) != INK_SUCCESS) {
-    LOG_ERROR("INKIOBufferWaterMarkSet");
+  if (TSIOBufferWaterMarkSet(conn_data->client_request_buffer, WATER_MARK) != TS_SUCCESS) {
+    LOG_ERROR("TSIOBufferWaterMarkSet");
   }
-  if (INKIOBufferWaterMarkGet(conn_data->client_request_buffer, &watermark) != INK_SUCCESS) {
-    LOG_ERROR("INKIOBufferWaterMarkGet");
+  if (TSIOBufferWaterMarkGet(conn_data->client_request_buffer, &watermark) != TS_SUCCESS) {
+    LOG_ERROR("TSIOBufferWaterMarkGet");
   } else if (watermark != WATER_MARK) {
-    LOG_ERROR("INKIOBufferWaterMarkSet");
+    LOG_ERROR("TSIOBufferWaterMarkSet");
   }
 
   conn_data->current_handler = &read_request_handler;
 
   /* start reading request from the client */
-  if ((conn_data->client_read_vio = INKVConnRead(conn_data->client_vconn, (INKCont) contp,
-                                                 conn_data->client_request_buffer, INT_MAX)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKVConnRead");
+  if ((conn_data->client_read_vio = TSVConnRead(conn_data->client_vconn, (TSCont) contp,
+                                                 conn_data->client_request_buffer, INT_MAX)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSVConnRead");
     clean_and_exit(contp);
     return -1;
   }
@@ -477,11 +477,11 @@ start_handler(INKCont contp, INKEvent ev
 }
 
 static int
-main_handler(INKCont contp, INKEvent event, void *data)
+main_handler(TSCont contp, TSEvent event, void *data)
 {
   LOG_SET_FUNCTION_NAME("main_handler");
 
-  ConnData *conn_data = (ConnData *) INKContDataGet(contp);
+  ConnData *conn_data = (ConnData *) TSContDataGet(contp);
   ConnHandler current_handler = conn_data->current_handler;
   return (*current_handler) (contp, event, data);
 }
@@ -489,23 +489,23 @@ main_handler(INKCont contp, INKEvent eve
 /*
  * Create the state machine that handles the connection between the client and proxy
  */
-static INKCont
-conn_sm_create(INKMutex conn_mutex, INKVConn client_vconn)
+static TSCont
+conn_sm_create(TSMutex conn_mutex, TSVConn client_vconn)
 {
   LOG_SET_FUNCTION_NAME("conn_sm_create");
 
-  INKCont contp;
+  TSCont contp;
   ConnData *conn_data;
 
-  conn_data = (ConnData *) INKmalloc(sizeof(ConnData));
+  conn_data = (ConnData *) TSmalloc(sizeof(ConnData));
 
   conn_data->mutex = conn_mutex;
   conn_data->pending_action = NULL;
   conn_data->client_vconn = client_vconn;
-  conn_data->client_request = (char *) INKmalloc((MAX_REQUEST_LENGTH + 1) * sizeof(char));
+  conn_data->client_request = (char *) TSmalloc((MAX_REQUEST_LENGTH + 1) * sizeof(char));
   conn_data->client_request[0] = '\0';
   conn_data->client_response = NULL;
-  conn_data->pattern = (char *) INKmalloc((MAX_PATTERN_LENGTH + 1) * sizeof(char));
+  conn_data->pattern = (char *) TSmalloc((MAX_PATTERN_LENGTH + 1) * sizeof(char));
   conn_data->number = 0;
   conn_data->client_read_vio = NULL;
   conn_data->client_write_vio = NULL;
@@ -516,67 +516,67 @@ conn_sm_create(INKMutex conn_mutex, INKV
 
   conn_data->current_handler = &start_handler;
 
-  if ((contp = INKContCreate(main_handler, conn_data->mutex)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKContCreate");
+  if ((contp = TSContCreate(main_handler, conn_data->mutex)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSContCreate");
   }
-  if (INKContDataSet(contp, conn_data) != INK_SUCCESS) {
-    return (void *) INK_ERROR_PTR;
+  if (TSContDataSet(contp, conn_data) != TS_SUCCESS) {
+    return (void *) TS_ERROR_PTR;
   }
   return contp;
 }
 
 /*
- * callback function for INKNetAccept
+ * callback function for TSNetAccept
  */
 static int
-accept_handler(INKCont contp, INKEvent event, void *edata)
+accept_handler(TSCont contp, TSEvent event, void *edata)
 {
   LOG_SET_FUNCTION_NAME("accept_handler");
 
-  INKMutex conn_mutex;
-  INKCont conn_sm;
-  INKVConn client_vconn;
+  TSMutex conn_mutex;
+  TSCont conn_sm;
+  TSVConn client_vconn;
 
-  client_vconn = (INKVConn) edata;
+  client_vconn = (TSVConn) edata;
 
   switch (event) {
-  case INK_EVENT_NET_ACCEPT:
+  case TS_EVENT_NET_ACCEPT:
 
-    INKDebug(DEBUG_TAG, "accepted the client request");
+    TSDebug(DEBUG_TAG, "accepted the client request");
 
     /* get the remote(client) IP and port of the net vconnection */
     get_remote_ip(client_vconn);
 
-    if ((conn_mutex = INKMutexCreate()) == INK_ERROR_PTR) {
-      LOG_ERROR_AND_RETURN("INKMutexCreate");
+    if ((conn_mutex = TSMutexCreate()) == TS_ERROR_PTR) {
+      LOG_ERROR_AND_RETURN("TSMutexCreate");
     }
 
     /* create the state machine that handles the connection */
-    conn_sm = (INKCont) conn_sm_create(conn_mutex, client_vconn);
-    if (conn_sm == INK_ERROR_PTR) {
+    conn_sm = (TSCont) conn_sm_create(conn_mutex, client_vconn);
+    if (conn_sm == TS_ERROR_PTR) {
       LOG_ERROR_AND_RETURN("conn_sm_create");
     }
 
-    INKDebug(DEBUG_TAG, "connection state machine created");
+    TSDebug(DEBUG_TAG, "connection state machine created");
 
     /* call the state machine */
-    if (INKMutexLock(conn_mutex) != INK_SUCCESS) {
-      LOG_ERROR_AND_RETURN("INKMutexLock");
+    if (TSMutexLock(conn_mutex) != TS_SUCCESS) {
+      LOG_ERROR_AND_RETURN("TSMutexLock");
     }
-    INKContCall(conn_sm, INK_EVENT_NONE, NULL);
-    if (INKMutexUnlock(conn_mutex) != INK_SUCCESS) {
-      LOG_ERROR_AND_RETURN("INKMutexUnlock");
+    TSContCall(conn_sm, TS_EVENT_NONE, NULL);
+    if (TSMutexUnlock(conn_mutex) != TS_SUCCESS) {
+      LOG_ERROR_AND_RETURN("TSMutexUnlock");
     }
     break;
 
   default:
     /* Something wrong with the network, if there are any
        pending NetAccept, cancel them. */
-    if (actionp && !INKActionDone(actionp)) {
-      INKActionCancel(actionp);
+    if (actionp && !TSActionDone(actionp)) {
+      TSActionCancel(actionp);
     }
 
-    INKContDestroy(contp);
+    TSContDestroy(contp);
     break;
   }
 
@@ -592,71 +592,71 @@ create_log()
 {
   LOG_SET_FUNCTION_NAME("create_log");
 
-  INKTextLogObject test_log = NULL;
+  TSTextLogObject test_log = NULL;
 
-  INKDebug(DEBUG_TAG, "Entered create_log");
+  TSDebug(DEBUG_TAG, "Entered create_log");
 
-  /* negative test for INKTextLogObjectCreate */
+  /* negative test for TSTextLogObjectCreate */
 #ifdef DEBUG
   /* log name is NULL */
-  if (INKTextLogObjectCreate(NULL, INK_LOG_MODE_ADD_TIMESTAMP, &test_log) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectCreate(NULL,...)");
+  if (TSTextLogObjectCreate(NULL, TS_LOG_MODE_ADD_TIMESTAMP, &test_log) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectCreate(NULL,...)");
   }
   /* sub-directory doesn't exist */
-  if (INKTextLogObjectCreate("aaa/bbb", INK_LOG_MODE_ADD_TIMESTAMP, &test_log) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectCreate(aaa/bbb,...)");
+  if (TSTextLogObjectCreate("aaa/bbb", TS_LOG_MODE_ADD_TIMESTAMP, &test_log) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectCreate(aaa/bbb,...)");
   }
   /* undefined mode value */
-  if (INKTextLogObjectCreate("ccc", -1, &test_log) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectCreate(ccc,-1,...)");
+  if (TSTextLogObjectCreate("ccc", -1, &test_log) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectCreate(ccc,-1,...)");
   }
 #endif
 
-  /* create a text log object and then destroy it, just for testing INKTextLogObjectDestroy */
-  if (INKTextLogObjectCreate("test-log", INK_LOG_MODE_DO_NOT_RENAME, &test_log) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectCreate");
+  /* create a text log object and then destroy it, just for testing TSTextLogObjectDestroy */
+  if (TSTextLogObjectCreate("test-log", TS_LOG_MODE_DO_NOT_RENAME, &test_log) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectCreate");
   }
-  if (test_log && INKTextLogObjectDestroy(test_log) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectDestroy");
+  if (test_log && TSTextLogObjectDestroy(test_log) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectDestroy");
   }
 
   /* create a text log object and set its parameters */
-  if (INKTextLogObjectCreate("test-protocol", INK_LOG_MODE_ADD_TIMESTAMP, &plugin_log) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectCreate");
+  if (TSTextLogObjectCreate("test-protocol", TS_LOG_MODE_ADD_TIMESTAMP, &plugin_log) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectCreate");
   }
 
-  if (INKTextLogObjectHeaderSet(plugin_log, "Text log for test-protocol plugin") != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectHeaderSet");
+  if (TSTextLogObjectHeaderSet(plugin_log, "Text log for test-protocol plugin") != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectHeaderSet");
   }
 
-  if (INKTextLogObjectRollingEnabledSet(plugin_log, 1) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectRollingEnabledSet");
+  if (TSTextLogObjectRollingEnabledSet(plugin_log, 1) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectRollingEnabledSet");
   }
 
-  if (INKTextLogObjectRollingIntervalSecSet(plugin_log, 1800) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectRollingIntervalSecSet");
+  if (TSTextLogObjectRollingIntervalSecSet(plugin_log, 1800) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectRollingIntervalSecSet");
   }
 
-  if (INKTextLogObjectRollingOffsetHrSet(plugin_log, 0) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectRollingOffsetHrSet");
+  if (TSTextLogObjectRollingOffsetHrSet(plugin_log, 0) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectRollingOffsetHrSet");
   }
 
-  /* negative test for INKTextLogObject*Set functions */
+  /* negative test for TSTextLogObject*Set functions */
 #ifdef DEBUG
-  if (INKTextLogObjectHeaderSet(NULL, "Text log for test-protocol plugin") != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectHeaderSet(NULL,)");
+  if (TSTextLogObjectHeaderSet(NULL, "Text log for test-protocol plugin") != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectHeaderSet(NULL,)");
   }
 
-  if (INKTextLogObjectRollingEnabledSet(NULL, 1) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectRollingEnabledSet(NULL,)");
+  if (TSTextLogObjectRollingEnabledSet(NULL, 1) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectRollingEnabledSet(NULL,)");
   }
 
-  if (INKTextLogObjectRollingIntervalSecSet(NULL, 3600) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectRollingIntervalSecSet(NULL,)");
+  if (TSTextLogObjectRollingIntervalSecSet(NULL, 3600) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectRollingIntervalSecSet(NULL,)");
   }
 
-  if (INKTextLogObjectRollingOffsetHrSet(NULL, 0) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectRollingOffsetHrSet(NULL,)");
+  if (TSTextLogObjectRollingOffsetHrSet(NULL, 0) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectRollingOffsetHrSet(NULL,)");
   }
 #endif
 
@@ -664,24 +664,24 @@ create_log()
 }
 
 void
-INKPluginInit(int argc, const char *argv[])
+TSPluginInit(int argc, const char *argv[])
 {
-  LOG_SET_FUNCTION_NAME("INKPluginInit");
+  LOG_SET_FUNCTION_NAME("TSPluginInit");
 
   int accept_port;
-  INKCont contp;
+  TSCont contp;
 
   /* default value of accept port */
   accept_port = 7493;
 
   if (argc != 2) {
-    INKDebug(DEBUG_TAG, "Usage: protocol.so accept_port\n");
+    TSDebug(DEBUG_TAG, "Usage: protocol.so accept_port\n");
   } else {
     accept_port = atoi(argv[1]);
   }
 
-  if ((contp = INKContCreate(accept_handler, INKMutexCreate())) == INK_ERROR_PTR) {
-    LOG_ERROR("INKContCreate");
+  if ((contp = TSContCreate(accept_handler, TSMutexCreate())) == TS_ERROR_PTR) {
+    LOG_ERROR("TSContCreate");
 
     exit(-1);
   }
@@ -691,15 +691,15 @@ INKPluginInit(int argc, const char *argv
     exit(-1);
   }
 
-  /* negative test for INKNetAccept */
+  /* negative test for TSNetAccept */
 #ifdef DEBUG
-  if (INKNetAccept(NULL, accept_port) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKNetAccept(NULL,...)");
+  if (TSNetAccept(NULL, accept_port) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSNetAccept(NULL,...)");
   }
 #endif
 
-  if ((actionp = INKNetAccept(contp, accept_port)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKNetAccept");
+  if ((actionp = TSNetAccept(contp, accept_port)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSNetAccept");
   }
 
 }

Modified: trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.cc (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.cc Tue Nov 30 01:42:55 2010
@@ -23,104 +23,104 @@
 
 #include "test-protocol.h"
 
-static INKAction actionp;
+static TSAction actionp;
 
 /*
  * Cleanup continuation data and destroy the continuation
  */
 static void
-clean_and_exit(INKCont contp)
+clean_and_exit(TSCont contp)
 {
-  INKDebug(DEBUG_TAG, "Entered clean_and_exit");
+  TSDebug(DEBUG_TAG, "Entered clean_and_exit");
   LOG_SET_FUNCTION_NAME("clean_and_exit");
 
-  ConnData *conn_data = (ConnData *) INKContDataGet(contp);
+  ConnData *conn_data = (ConnData *) TSContDataGet(contp);
 
-  if (conn_data->pending_action && !INKActionDone(conn_data->pending_action)) {
-    INKActionCancel(conn_data->pending_action);
+  if (conn_data->pending_action && !TSActionDone(conn_data->pending_action)) {
+    TSActionCancel(conn_data->pending_action);
   }
 
   if (conn_data->client_vconn) {
-    INKVConnClose(conn_data->client_vconn);
+    TSVConnClose(conn_data->client_vconn);
   }
 
   if (conn_data->client_request) {
-    INKfree(conn_data->client_request);
+    TSfree(conn_data->client_request);
   }
 
   if (conn_data->client_response) {
-    INKfree(conn_data->client_response);
+    TSfree(conn_data->client_response);
   }
 
   if (conn_data->pattern) {
-    INKfree(conn_data->pattern);
+    TSfree(conn_data->pattern);
   }
 
   if (conn_data->client_request_buffer) {
     if (conn_data->client_request_buffer_reader) {
-      INKIOBufferReaderFree(conn_data->client_request_buffer_reader);
+      TSIOBufferReaderFree(conn_data->client_request_buffer_reader);
     }
-    INKIOBufferDestroy(conn_data->client_request_buffer);
+    TSIOBufferDestroy(conn_data->client_request_buffer);
   }
 
   if (conn_data->client_response_buffer) {
     if (conn_data->client_response_buffer_reader) {
-      INKIOBufferReaderFree(conn_data->client_response_buffer_reader);
+      TSIOBufferReaderFree(conn_data->client_response_buffer_reader);
     }
-    INKIOBufferDestroy(conn_data->client_response_buffer);
+    TSIOBufferDestroy(conn_data->client_response_buffer);
   }
 
-  INKfree(conn_data);
-  INKContDestroy(contp);
+  TSfree(conn_data);
+  TSContDestroy(contp);
 }
 
 /*
  * Get the remote ip and port of the net vconnection
  */
 static void
-get_remote_ip(INKVConn client_vconn)
+get_remote_ip(TSVConn client_vconn)
 {
-  INKDebug(DEBUG_TAG, "Entered get_remote_ip");
+  TSDebug(DEBUG_TAG, "Entered get_remote_ip");
   LOG_SET_FUNCTION_NAME("get_remote_ip");
 
   unsigned int ip;
   int port;
 
   /* get the remote ip */
-  if (INKNetVConnRemoteIPGet(client_vconn, &ip) == INK_SUCCESS) {
-    if (INKTextLogObjectWrite(log, "The remote IP of the net vconnection is %d \n", ip) != INK_SUCCESS) {
-      LOG_ERROR("INKTextLogObjectWrite");
+  if (TSNetVConnRemoteIPGet(client_vconn, &ip) == TS_SUCCESS) {
+    if (TSTextLogObjectWrite(log, "The remote IP of the net vconnection is %d \n", ip) != TS_SUCCESS) {
+      LOG_ERROR("TSTextLogObjectWrite");
     }
   } else {
-    LOG_ERROR("INKNetVConnRemoteIPGet");
+    LOG_ERROR("TSNetVConnRemoteIPGet");
   }
 
-  /* negative test for INKNetVConnRemoteIPGet */
+  /* negative test for TSNetVConnRemoteIPGet */
 #ifdef DEBUG
-  if (INKNetVConnRemoteIPGet(NULL, &ip) != INK_ERROR) {
-    LOG_ERROR_NEG("INKNetVConnRemoteIPGet(NULL,...)");
+  if (TSNetVConnRemoteIPGet(NULL, &ip) != TS_ERROR) {
+    LOG_ERROR_NEG("TSNetVConnRemoteIPGet(NULL,...)");
   }
 #endif
 
   /* get the remote port */
-  if (INKNetVConnRemotePortGet(client_vconn, &port) == INK_SUCCESS) {
-    if (INKTextLogObjectWrite(log, "The remote port of the net vconnection is %d \n", port) != INK_SUCCESS) {
-      LOG_ERROR("INKTextLogObjectWrite");
+  if (TSNetVConnRemotePortGet(client_vconn, &port) == TS_SUCCESS) {
+    if (TSTextLogObjectWrite(log, "The remote port of the net vconnection is %d \n", port) != TS_SUCCESS) {
+      LOG_ERROR("TSTextLogObjectWrite");
     }
   } else {
-    LOG_ERROR("INKNetVConnRemotePortGet");
+    LOG_ERROR("TSNetVConnRemotePortGet");
   }
 
-  /* negative test for INKNetVConnRemotePortGet */
+  /* negative test for TSNetVConnRemotePortGet */
 #ifdef DEBUG
-  if (INKNetVConnRemotePortGet(NULL, &port) != INK_ERROR) {
-    LOG_ERROR_NEG("INKNetVConnRemotePortGet(NULL,...)");
+  if (TSNetVConnRemotePortGet(NULL, &port) != TS_ERROR) {
+    LOG_ERROR_NEG("TSNetVConnRemotePortGet(NULL,...)");
   }
 #endif
 
   /* flush the log */
-  if (INKTextLogObjectFlush(log) != INK_SUCCESS) {
-    LOG_ERROR("INKTextLogObjectFlush");
+  if (TSTextLogObjectFlush(log) != TS_SUCCESS) {
+    LOG_ERROR("TSTextLogObjectFlush");
   }
 }
 
@@ -128,8 +128,8 @@ get_remote_ip(INKVConn client_vconn)
 static int
 parse_request(ConnData * conn_data)
 {
-  INKDebug(DEBUG_TAG, "Entered parse_request");
-  INKDebug(DEBUG_TAG, "client request: \n%s", conn_data->client_request);
+  TSDebug(DEBUG_TAG, "Entered parse_request");
+  TSDebug(DEBUG_TAG, "client request: \n%s", conn_data->client_request);
   LOG_SET_FUNCTION_NAME("parse_request");
 
   char *temp = strtok(conn_data->client_request, " ");
@@ -154,29 +154,29 @@ parse_request(ConnData * conn_data)
 static void
 log_request(ConnData * conn_data)
 {
-  INKDebug(DEBUG_TAG, "Entered log_request");
+  TSDebug(DEBUG_TAG, "Entered log_request");
   LOG_SET_FUNCTION_NAME("log_request");
 
   /* write to the log object */
-  if (INKTextLogObjectWrite(log, "The client requests a pattern of %s repeated in %d of times\n",
-                            conn_data->pattern, conn_data->number) != INK_SUCCESS) {
-    LOG_ERROR("INKTextLogObjectWrite");
+  if (TSTextLogObjectWrite(log, "The client requests a pattern of %s repeated in %d of times\n",
+                            conn_data->pattern, conn_data->number) != TS_SUCCESS) {
+    LOG_ERROR("TSTextLogObjectWrite");
   }
 
-  /* negative test for INKTextLogObjectWrite */
+  /* negative test for TSTextLogObjectWrite */
 #ifdef DEBUG
-  if (INKTextLogObjectWrite(NULL, "negative test") != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectWrite(NULL,...)");
+  if (TSTextLogObjectWrite(NULL, "negative test") != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectWrite(NULL,...)");
   }
 #endif
 
   /* flush the log object */
-  if (INKTextLogObjectFlush(log) != INK_SUCCESS) {
-    LOG_ERROR("INKTextLogObjectFlush");
+  if (TSTextLogObjectFlush(log) != TS_SUCCESS) {
+    LOG_ERROR("TSTextLogObjectFlush");
   }
 #ifdef DEBUG
-  if (INKTextLogObjectFlush(NULL) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectFlush(NULL)");
+  if (TSTextLogObjectFlush(NULL) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectFlush(NULL)");
   }
 #endif
 
@@ -188,45 +188,45 @@ log_request(ConnData * conn_data)
 static void
 generate_response(ConnData * conn_data)
 {
-  INKDebug(DEBUG_TAG, "Entered generate_response");
+  TSDebug(DEBUG_TAG, "Entered generate_response");
   LOG_SET_FUNCTION_NAME("generate_response");
 
   int response_length, i;
 
   /* repeat the pattern in number of times and save it to conn_data->client_response */
   response_length = conn_data->number * strlen(conn_data->pattern) + 1;
-  conn_data->client_response = (char *) INKmalloc(response_length * sizeof(char));
+  conn_data->client_response = (char *) TSmalloc(response_length * sizeof(char));
   conn_data->client_response[0] = '\0';
 
   for (i = 0; i < conn_data->number; i++) {
     strcat(conn_data->client_response, conn_data->pattern);
   }
 
-  INKDebug(DEBUG_TAG, "client response is:\n%s\n", conn_data->client_response);
+  TSDebug(DEBUG_TAG, "client response is:\n%s\n", conn_data->client_response);
 }
 
 /*
- * callback function for INKVConnWrite
+ * callback function for TSVConnWrite
  */
 int
-send_response_handler(INKCont contp, INKEvent event, void *data)
+send_response_handler(TSCont contp, TSEvent event, void *data)
 {
-  INKDebug(DEBUG_TAG, "Entered send_response_handler");
+  TSDebug(DEBUG_TAG, "Entered send_response_handler");
   LOG_SET_FUNCTION_NAME("send_response_handler");
 
   ConnData *conn_data;
 
-  conn_data = (ConnData *) INKContDataGet(contp);
+  conn_data = (ConnData *) TSContDataGet(contp);
 
   switch (event) {
-  case INK_EVENT_VCONN_WRITE_READY:
-    if (INKVIOReenable(conn_data->client_write_vio) != INK_SUCCESS) {
-      LOG_ERROR("INKVIOReenable");
+  case TS_EVENT_VCONN_WRITE_READY:
+    if (TSVIOReenable(conn_data->client_write_vio) != TS_SUCCESS) {
+      LOG_ERROR("TSVIOReenable");
       clean_and_exit(contp);
       return -1;
     }
     break;
-  case INK_EVENT_VCONN_WRITE_COMPLETE:
+  case TS_EVENT_VCONN_WRITE_COMPLETE:
     clean_and_exit(contp);
     break;
   default:
@@ -242,107 +242,107 @@ send_response_handler(INKCont contp, INK
  * Send response to teh client
  */
 static void
-send_response(ConnData * conn_data, INKCont contp)
+send_response(ConnData * conn_data, TSCont contp)
 {
-  INKDebug(DEBUG_TAG, "Entered send_response");
+  TSDebug(DEBUG_TAG, "Entered send_response");
   LOG_SET_FUNCTION_NAME("send_response");
 
   int copied_length;
 
-  /* negative test for INKIOBufferSizedCreate */
+  /* negative test for TSIOBufferSizedCreate */
 #ifdef DEBUG
-  if (INKIOBufferSizedCreate(-1) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKIOBufferSizedCreate(-1)");
+  if (TSIOBufferSizedCreate(-1) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSIOBufferSizedCreate(-1)");
   }
 #endif
 
   /* create the response IOBuffer */
-  conn_data->client_response_buffer = INKIOBufferSizedCreate(INK_IOBUFFER_SIZE_INDEX_1K);
+  conn_data->client_response_buffer = TSIOBufferSizedCreate(TS_IOBUFFER_SIZE_INDEX_1K);
 
-  if (conn_data->client_response_buffer == INK_ERROR_PTR || conn_data->client_response_buffer == NULL) {
-    LOG_ERROR("INKIOBufferSizedCreate");
+  if (conn_data->client_response_buffer == TS_ERROR_PTR || conn_data->client_response_buffer == NULL) {
+    LOG_ERROR("TSIOBufferSizedCreate");
     clean_and_exit(contp);
     return;
   }
 
   /* get the IOBuffer reader */
   if ((conn_data->client_response_buffer_reader =
-       INKIOBufferReaderAlloc(conn_data->client_response_buffer)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKIOBufferReaderAlloc");
+       TSIOBufferReaderAlloc(conn_data->client_response_buffer)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSIOBufferReaderAlloc");
     clean_and_exit(contp);
     return;
   }
 
-  /* negative test for INKIOBufferWrite */
+  /* negative test for TSIOBufferWrite */
 #ifdef DEBUG
-  if (INKIOBufferWrite(NULL, conn_data->client_response, strlen(conn_data->client_response)) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWrite(NULL,...)");
+  if (TSIOBufferWrite(NULL, conn_data->client_response, strlen(conn_data->client_response)) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWrite(NULL,...)");
   }
-  if (INKIOBufferWrite(conn_data->client_response_buffer, NULL, strlen(conn_data->client_response)) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWrite(conn_data->client_response_buffer,NULL,...)");
+  if (TSIOBufferWrite(conn_data->client_response_buffer, NULL, strlen(conn_data->client_response)) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWrite(conn_data->client_response_buffer,NULL,...)");
   }
 #endif
 
   /* copy the response to the IOBuffer */
   copied_length =
-    INKIOBufferWrite(conn_data->client_response_buffer, conn_data->client_response, strlen(conn_data->client_response));
+    TSIOBufferWrite(conn_data->client_response_buffer, conn_data->client_response, strlen(conn_data->client_response));
 
-  if (copied_length == INK_ERROR) {
-    LOG_ERROR("INKIOBufferWrite");
+  if (copied_length == TS_ERROR) {
+    LOG_ERROR("TSIOBufferWrite");
     clean_and_exit(contp);
     return;
   }
 
   /* send the response to the client */
   conn_data->current_handler = &send_response_handler;
-  if ((conn_data->client_write_vio = INKVConnWrite(conn_data->client_vconn, contp,
+  if ((conn_data->client_write_vio = TSVConnWrite(conn_data->client_vconn, contp,
                                                    conn_data->client_response_buffer_reader,
-                                                   copied_length)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKVConnWrite");
+                                                   copied_length)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSVConnWrite");
     clean_and_exit(contp);
     return;
   }
 }
 
 /*
- * callback function for INKVConnRead
+ * callback function for TSVConnRead
  */
 int
-read_request_handler(INKCont contp, INKEvent event, void *data)
+read_request_handler(TSCont contp, TSEvent event, void *data)
 {
-  INKDebug(DEBUG_TAG, "Entered read_request_handler");
+  TSDebug(DEBUG_TAG, "Entered read_request_handler");
   LOG_SET_FUNCTION_NAME("read_request_handler");
 
   ConnData *conn_data;
   int read_avail, output_len, block_avail;
-  INKIOBufferBlock block;
+  TSIOBufferBlock block;
   char *buf = NULL;
   const char *block_start;
 
-  conn_data = (ConnData *) INKContDataGet(contp);
+  conn_data = (ConnData *) TSContDataGet(contp);
 
   switch (event) {
-  case INK_EVENT_VCONN_READ_READY:
+  case TS_EVENT_VCONN_READ_READY:
 
-    if ((read_avail = INKIOBufferReaderAvail(conn_data->client_request_buffer_reader)) == INK_ERROR) {
-      LOG_ERROR("INKIOBufferReaderAvail");
+    if ((read_avail = TSIOBufferReaderAvail(conn_data->client_request_buffer_reader)) == TS_ERROR) {
+      LOG_ERROR("TSIOBufferReaderAvail");
       clean_and_exit(contp);
       return -1;
     }
 
-    INKDebug(DEBUG_TAG, "read_avail = %d \n", read_avail);
+    TSDebug(DEBUG_TAG, "read_avail = %d \n", read_avail);
 
     if (read_avail < WATER_MARK) {
-      LOG_ERROR("INKIOBufferWaterMarkSet");
+      LOG_ERROR("TSIOBufferWaterMarkSet");
     }
 
     if (read_avail > 0) {
       /* copy the partly read client request from IOBuffer to conn_data->client_request */
-      buf = (char *) INKmalloc(read_avail + 1);
+      buf = (char *) TSmalloc(read_avail + 1);
 
-      INKIOBufferReaderCopy(conn_data->client_request_buffer_reader, buf, read_avail);
-      if (INKIOBufferReaderConsume(conn_data->client_request_buffer_reader, read_avail) != INK_SUCCESS) {
-        LOG_ERROR("INKIOBufferReaderConsume");
+      TSIOBufferReaderCopy(conn_data->client_request_buffer_reader, buf, read_avail);
+      if (TSIOBufferReaderConsume(conn_data->client_request_buffer_reader, read_avail) != TS_SUCCESS) {
+        LOG_ERROR("TSIOBufferReaderConsume");
         clean_and_exit(contp);
         return -1;
       }
@@ -351,7 +351,7 @@ read_request_handler(INKCont contp, INKE
 
       strcat(conn_data->client_request, buf);
 
-      INKfree(buf);
+      TSfree(buf);
 
       /* check if the end of the client request has been reached */
       if (strstr(conn_data->client_request, "\r\n\r\n") != NULL) {
@@ -368,8 +368,8 @@ read_request_handler(INKCont contp, INKE
     }
 
     /* continue reading data from the client */
-    if (INKVIOReenable(conn_data->client_read_vio) == INK_ERROR) {
-      LOG_ERROR("INKVIOReenable");
+    if (TSVIOReenable(conn_data->client_read_vio) == TS_ERROR) {
+      LOG_ERROR("TSVIOReenable");
       clean_and_exit(contp);
       return -1;
     }
@@ -383,61 +383,61 @@ read_request_handler(INKCont contp, INKE
 }
 
 int
-start_handler(INKCont contp, INKEvent event, void *data)
+start_handler(TSCont contp, TSEvent event, void *data)
 {
-  INKDebug(DEBUG_TAG, "Entered start_handler");
+  TSDebug(DEBUG_TAG, "Entered start_handler");
   LOG_SET_FUNCTION_NAME("start_handler");
 
   ConnData *conn_data;
   int watermark;
 
-  conn_data = (ConnData *) INKContDataGet(contp);
+  conn_data = (ConnData *) TSContDataGet(contp);
 
   /* create client request IOBuffer and buffer reader */
-  if ((conn_data->client_request_buffer = INKIOBufferCreate()) == INK_ERROR_PTR) {
-    LOG_ERROR("INKIOBufferCreate");
+  if ((conn_data->client_request_buffer = TSIOBufferCreate()) == TS_ERROR_PTR) {
+    LOG_ERROR("TSIOBufferCreate");
     clean_and_exit(contp);
     return -1;
   }
   if ((conn_data->client_request_buffer_reader =
-       INKIOBufferReaderAlloc(conn_data->client_request_buffer)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKIOBufferReaderAlloc");
+       TSIOBufferReaderAlloc(conn_data->client_request_buffer)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSIOBufferReaderAlloc");
     clean_and_exit(contp);
     return -1;
   }
 
-  /* negative test cases for INKIOBufferWaterMarkSet */
+  /* negative test cases for TSIOBufferWaterMarkSet */
 #ifdef DEBUG
-  if (INKIOBufferWaterMarkSet(NULL, WATER_MARK) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWaterMarkSet(NULL,...)");
+  if (TSIOBufferWaterMarkSet(NULL, WATER_MARK) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWaterMarkSet(NULL,...)");
   }
-  if (INKIOBufferWaterMarkSet(conn_data->client_request_buffer, -1) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWaterMarkSet(conn_data->client_request_buffer,-1)");
+  if (TSIOBufferWaterMarkSet(conn_data->client_request_buffer, -1) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWaterMarkSet(conn_data->client_request_buffer,-1)");
   }
 #endif
-  /* negative test cases for INKIOBufferWaterMarkGet */
+  /* negative test cases for TSIOBufferWaterMarkGet */
 #ifdef DEBUG
-  if (INKIOBufferWaterMarkGet(NULL, &watermark) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferWaterMarkGet(NULL,...)");
+  if (TSIOBufferWaterMarkGet(NULL, &watermark) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferWaterMarkGet(NULL,...)");
   }
 #endif
 
   /* set the watermark of the client request iobuffer */
-  if (INKIOBufferWaterMarkSet(conn_data->client_request_buffer, WATER_MARK) != INK_SUCCESS) {
-    LOG_ERROR("INKIOBufferWaterMarkSet");
+  if (TSIOBufferWaterMarkSet(conn_data->client_request_buffer, WATER_MARK) != TS_SUCCESS) {
+    LOG_ERROR("TSIOBufferWaterMarkSet");
   }
-  if (INKIOBufferWaterMarkGet(conn_data->client_request_buffer, &watermark) != INK_SUCCESS) {
-    LOG_ERROR("INKIOBufferWaterMarkGet");
+  if (TSIOBufferWaterMarkGet(conn_data->client_request_buffer, &watermark) != TS_SUCCESS) {
+    LOG_ERROR("TSIOBufferWaterMarkGet");
   } else if (watermark != WATER_MARK) {
-    LOG_ERROR("INKIOBufferWaterMarkSet");
+    LOG_ERROR("TSIOBufferWaterMarkSet");
   }
 
   conn_data->current_handler = &read_request_handler;
 
   /* start reading request from the client */
-  if ((conn_data->client_read_vio = INKVConnRead(conn_data->client_vconn, (INKCont) contp,
-                                                 conn_data->client_request_buffer, INT_MAX)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKVConnRead");
+  if ((conn_data->client_read_vio = TSVConnRead(conn_data->client_vconn, (TSCont) contp,
+                                                 conn_data->client_request_buffer, INT_MAX)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSVConnRead");
     clean_and_exit(contp);
     return -1;
   }
@@ -445,13 +445,13 @@ start_handler(INKCont contp, INKEvent ev
 }
 
 static int
-main_handler(INKCont contp, INKEvent event, void *data)
+main_handler(TSCont contp, TSEvent event, void *data)
 {
   LOG_SET_FUNCTION_NAME("main_handler");
 
   ConnData *conn_data;
 
-  conn_data = (ConnData *) INKContDataGet(contp);
+  conn_data = (ConnData *) TSContDataGet(contp);
   ConnHandler current_handler = conn_data->current_handler;
   return (*current_handler) (contp, event, data);
 }
@@ -459,23 +459,23 @@ main_handler(INKCont contp, INKEvent eve
 /*
  * Create the state machine that handles the connection between the client and proxy
  */
-static INKCont
-conn_sm_create(INKMutex conn_mutex, INKVConn client_vconn)
+static TSCont
+conn_sm_create(TSMutex conn_mutex, TSVConn client_vconn)
 {
   LOG_SET_FUNCTION_NAME("conn_sm_create");
 
-  INKCont contp;
+  TSCont contp;
   ConnData *conn_data;
 
-  conn_data = (ConnData *) INKmalloc(sizeof(ConnData));
+  conn_data = (ConnData *) TSmalloc(sizeof(ConnData));
 
   conn_data->mutex = conn_mutex;
   conn_data->pending_action = NULL;
   conn_data->client_vconn = client_vconn;
-  conn_data->client_request = (char *) INKmalloc((MAX_REQUEST_LENGTH + 1) * sizeof(char));
+  conn_data->client_request = (char *) TSmalloc((MAX_REQUEST_LENGTH + 1) * sizeof(char));
   conn_data->client_request[0] = '\0';
   conn_data->client_response = NULL;
-  conn_data->pattern = (char *) INKmalloc((MAX_PATTERN_LENGTH + 1) * sizeof(char));
+  conn_data->pattern = (char *) TSmalloc((MAX_PATTERN_LENGTH + 1) * sizeof(char));
   conn_data->number = 0;
   conn_data->client_read_vio = NULL;
   conn_data->client_write_vio = NULL;
@@ -486,67 +486,67 @@ conn_sm_create(INKMutex conn_mutex, INKV
 
   conn_data->current_handler = &start_handler;
 
-  if ((contp = INKContCreate(main_handler, conn_data->mutex)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKContCreate");
+  if ((contp = TSContCreate(main_handler, conn_data->mutex)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSContCreate");
   }
-  if (INKContDataSet(contp, conn_data) != INK_SUCCESS) {
-    return (void *) INK_ERROR_PTR;
+  if (TSContDataSet(contp, conn_data) != TS_SUCCESS) {
+    return (void *) TS_ERROR_PTR;
   }
   return contp;
 }
 
 /*
- * callback function for INKNetAccept
+ * callback function for TSNetAccept
  */
 static int
-accept_handler(INKCont contp, INKEvent event, void *edata)
+accept_handler(TSCont contp, TSEvent event, void *edata)
 {
   LOG_SET_FUNCTION_NAME("accept_handler");
 
-  INKMutex conn_mutex;
-  INKCont conn_sm;
-  INKVConn client_vconn;
+  TSMutex conn_mutex;
+  TSCont conn_sm;
+  TSVConn client_vconn;
 
-  client_vconn = (INKVConn) edata;
+  client_vconn = (TSVConn) edata;
 
   switch (event) {
-  case INK_EVENT_NET_ACCEPT:
+  case TS_EVENT_NET_ACCEPT:
 
-    INKDebug(DEBUG_TAG, "accepted the client request");
+    TSDebug(DEBUG_TAG, "accepted the client request");
 
     /* get the remote(client) IP and port of the net vconnection */
     get_remote_ip(client_vconn);
 
-    if ((conn_mutex = INKMutexCreate()) == INK_ERROR_PTR) {
-      LOG_ERROR_AND_RETURN("INKMutexCreate");
+    if ((conn_mutex = TSMutexCreate()) == TS_ERROR_PTR) {
+      LOG_ERROR_AND_RETURN("TSMutexCreate");
     }
 
     /* create the state machine that handles the connection */
-    conn_sm = (INKCont) conn_sm_create(conn_mutex, client_vconn);
-    if (conn_sm == INK_ERROR_PTR) {
+    conn_sm = (TSCont) conn_sm_create(conn_mutex, client_vconn);
+    if (conn_sm == TS_ERROR_PTR) {
       LOG_ERROR_AND_RETURN("conn_sm_create");
     }
 
-    INKDebug(DEBUG_TAG, "connection state machine created");
+    TSDebug(DEBUG_TAG, "connection state machine created");
 
     /* call the state machine */
-    if (INKMutexLock(conn_mutex) != INK_SUCCESS) {
-      LOG_ERROR_AND_RETURN("INKMutexLock");
+    if (TSMutexLock(conn_mutex) != TS_SUCCESS) {
+      LOG_ERROR_AND_RETURN("TSMutexLock");
     }
-    INKContCall(conn_sm, INK_EVENT_NONE, NULL);
-    if (INKMutexUnlock(conn_mutex) != INK_SUCCESS) {
-      LOG_ERROR_AND_RETURN("INKMutexUnlock");
+    TSContCall(conn_sm, TS_EVENT_NONE, NULL);
+    if (TSMutexUnlock(conn_mutex) != TS_SUCCESS) {
+      LOG_ERROR_AND_RETURN("TSMutexUnlock");
     }
     break;
 
   default:
     /* Something wrong with the network, if there are any
        pending NetAccept, cancel them. */
-    if (actionp && !INKActionDone(actionp)) {
-      INKActionCancel(actionp);
+    if (actionp && !TSActionDone(actionp)) {
+      TSActionCancel(actionp);
     }
 
-    INKContDestroy(contp);
+    TSContDestroy(contp);
     break;
   }
 
@@ -561,61 +561,61 @@ static int
 create_log()
 {
   LOG_SET_FUNCTION_NAME("create_log");
-  INKDebug(DEBUG_TAG, "Entered create_log");
+  TSDebug(DEBUG_TAG, "Entered create_log");
 
-  /* negative test for INKTextLogObjectCreate */
+  /* negative test for TSTextLogObjectCreate */
 #ifdef DEBUG
   /* log name is NULL */
-  if (INKTextLogObjectCreate(NULL, INK_LOG_MODE_ADD_TIMESTAMP, &log) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectCreate(NULL,...)");
+  if (TSTextLogObjectCreate(NULL, TS_LOG_MODE_ADD_TIMESTAMP, &log) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectCreate(NULL,...)");
   }
   /* sub-directory doesn't exist */
-  if (INKTextLogObjectCreate("aaa/bbb", INK_LOG_MODE_ADD_TIMESTAMP, &log) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectCreate(aaa/bbb,...)");
+  if (TSTextLogObjectCreate("aaa/bbb", TS_LOG_MODE_ADD_TIMESTAMP, &log) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectCreate(aaa/bbb,...)");
   }
   /* undefined mode value */
-  if (INKTextLogObjectCreate("ccc", -1, &log) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectCreate(ccc,-1,...)");
+  if (TSTextLogObjectCreate("ccc", -1, &log) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectCreate(ccc,-1,...)");
   }
 #endif
 
   /* create a text log object and set its parameters */
-  if (INKTextLogObjectCreate("test-protocol", INK_LOG_MODE_ADD_TIMESTAMP, &log) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectCreate");
+  if (TSTextLogObjectCreate("test-protocol", TS_LOG_MODE_ADD_TIMESTAMP, &log) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectCreate");
   }
 
-  if (INKTextLogObjectHeaderSet(log, "Text log for test-protocol plugin") != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectHeaderSet");
+  if (TSTextLogObjectHeaderSet(log, "Text log for test-protocol plugin") != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectHeaderSet");
   }
 
-  if (INKTextLogObjectRollingEnabledSet(log, 1) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectRollingEnabledSet");
+  if (TSTextLogObjectRollingEnabledSet(log, 1) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectRollingEnabledSet");
   }
 
-  if (INKTextLogObjectRollingIntervalSecSet(log, 3600) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectRollingIntervalSecSet");
+  if (TSTextLogObjectRollingIntervalSecSet(log, 3600) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectRollingIntervalSecSet");
   }
 
-  if (INKTextLogObjectRollingOffsetHrSet(log, 0) != INK_SUCCESS) {
-    LOG_ERROR_AND_RETURN("INKTextLogObjectRollingOffsetHrSet");
+  if (TSTextLogObjectRollingOffsetHrSet(log, 0) != TS_SUCCESS) {
+    LOG_ERROR_AND_RETURN("TSTextLogObjectRollingOffsetHrSet");
   }
 
-  /* negative test for INKTextLogObject*Set functions */
+  /* negative test for TSTextLogObject*Set functions */
 #ifdef DEBUG
-  if (INKTextLogObjectHeaderSet(NULL, "Text log for test-protocol plugin") != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectHeaderSet(NULL,)");
+  if (TSTextLogObjectHeaderSet(NULL, "Text log for test-protocol plugin") != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectHeaderSet(NULL,)");
   }
 
-  if (INKTextLogObjectRollingEnabledSet(NULL, 1) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectRollingEnabledSet(NULL,)");
+  if (TSTextLogObjectRollingEnabledSet(NULL, 1) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectRollingEnabledSet(NULL,)");
   }
 
-  if (INKTextLogObjectRollingIntervalSecSet(NULL, 3600) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectRollingIntervalSecSet(NULL,)");
+  if (TSTextLogObjectRollingIntervalSecSet(NULL, 3600) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectRollingIntervalSecSet(NULL,)");
   }
 
-  if (INKTextLogObjectRollingOffsetHrSet(NULL, 0) != INK_ERROR) {
-    LOG_ERROR_NEG("INKTextLogObjectRollingOffsetHrSet(NULL,)");
+  if (TSTextLogObjectRollingOffsetHrSet(NULL, 0) != TS_ERROR) {
+    LOG_ERROR_NEG("TSTextLogObjectRollingOffsetHrSet(NULL,)");
   }
 #endif
 
@@ -623,27 +623,27 @@ create_log()
 }
 
 void
-INKPluginInit(int argc, const char *argv[])
+TSPluginInit(int argc, const char *argv[])
 {
-  LOG_SET_FUNCTION_NAME("INKPluginInit");
+  LOG_SET_FUNCTION_NAME("TSPluginInit");
 
   int accept_port;
-  INKCont contp;
+  TSCont contp;
 
   /* default value of accept port */
   accept_port = 7493;
 
   if (argc != 2) {
-    INKDebug(DEBUG_TAG, "Usage: protocol.so accept_port\n");
+    TSDebug(DEBUG_TAG, "Usage: protocol.so accept_port\n");
   } else {
     accept_port = atoi(argv[1]);
   }
 
-  if ((contp = INKContCreate(accept_handler, INKMutexCreate())) == INK_ERROR_PTR) {
-    LOG_ERROR("INKContCreate");
+  if ((contp = TSContCreate(accept_handler, TSMutexCreate())) == TS_ERROR_PTR) {
+    LOG_ERROR("TSContCreate");
 
-    if (INKTextLogObjectDestroy(log) != INK_SUCCESS) {
-      LOG_ERROR("INKTextLogObjectDestroy");
+    if (TSTextLogObjectDestroy(log) != TS_SUCCESS) {
+      LOG_ERROR("TSTextLogObjectDestroy");
     }
 
     exit(-1);
@@ -654,15 +654,15 @@ INKPluginInit(int argc, const char *argv
     exit(-1);
   }
 
-  /* negative test for INKNetAccept */
+  /* negative test for TSNetAccept */
 #ifdef DEBUG
-  if (INKNetAccept(NULL, accept_port) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKNetAccept(NULL,...)");
+  if (TSNetAccept(NULL, accept_port) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSNetAccept(NULL,...)");
   }
 #endif
 
-  if ((actionp = INKNetAccept(contp, accept_port)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKNetAccept");
+  if ((actionp = TSNetAccept(contp, accept_port)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSNetAccept");
   }
-  // TODO any other place to call INKTextLogObjectDestroy()?
+  // TODO any other place to call TSTextLogObjectDestroy()?
 }

Modified: trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.h?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.h (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test-protocol.h Tue Nov 30 01:42:55 2010
@@ -38,10 +38,10 @@
 #define DEBUG_TAG "test-protocol-dbg"
 
 #define PLUGIN_NAME "test-protocol"
-#define VALID_POINTER(X) ((X != NULL) && (X != INK_ERROR_PTR))
+#define VALID_POINTER(X) ((X != NULL) && (X != TS_ERROR_PTR))
 #define LOG_SET_FUNCTION_NAME(NAME) const char * FUNCTION_NAME = NAME
 #define LOG_ERROR(API_NAME) { \
-    INKDebug(PLUGIN_NAME, "%s: %s %s %s File %s, line number %d", PLUGIN_NAME, API_NAME, "APIFAIL", \
+    TSDebug(PLUGIN_NAME, "%s: %s %s %s File %s, line number %d", PLUGIN_NAME, API_NAME, "APIFAIL", \
 	     FUNCTION_NAME, __FILE__, __LINE__); \
 }
 #define LOG_ERROR_AND_RETURN(API_NAME) { \
@@ -54,22 +54,22 @@
 }
 #define LOG_ERROR_AND_REENABLE(API_NAME) { \
   LOG_ERROR(API_NAME); \
-  INKHttpTxnReenable(txnp, INK_EVENT_HTTP_CONTINUE); \
+  TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE); \
 }
 #define LOG_ERROR_NEG(API_NAME) { \
-    INKDebug(PLUGIN_NAME, "%s: %s %s %s File %s, line number %d",PLUGIN_NAME, API_NAME, "NEGAPIFAIL", \
+    TSDebug(PLUGIN_NAME, "%s: %s %s %s File %s, line number %d",PLUGIN_NAME, API_NAME, "NEGAPIFAIL", \
              FUNCTION_NAME, __FILE__, __LINE__); \
 }
 
-typedef int (*ConnHandler) (INKCont contp, INKEvent event, void *data);
+typedef int (*ConnHandler) (TSCont contp, TSEvent event, void *data);
 
 typedef struct _ConnData
 {
-  INKMutex mutex;
-  INKAction pending_action;
+  TSMutex mutex;
+  TSAction pending_action;
   ConnHandler current_handler;
 
-  INKVConn client_vconn;
+  TSVConn client_vconn;
 
   char *client_request;
   char *client_response;
@@ -77,16 +77,16 @@ typedef struct _ConnData
   char *pattern;
   int number;
 
-  INKVIO client_read_vio;
-  INKVIO client_write_vio;
-  INKIOBuffer client_request_buffer;
-  INKIOBuffer client_response_buffer;
-  INKIOBufferReader client_request_buffer_reader;
-  INKIOBufferReader client_response_buffer_reader;
+  TSVIO client_read_vio;
+  TSVIO client_write_vio;
+  TSIOBuffer client_request_buffer;
+  TSIOBuffer client_response_buffer;
+  TSIOBufferReader client_request_buffer_reader;
+  TSIOBufferReader client_response_buffer_reader;
 
 } ConnData;
 
 /* global variable */
-INKTextLogObject plugin_log = NULL;
+TSTextLogObject plugin_log = NULL;
 
 #endif /* TEST_PROTOCOL_H */

Modified: trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test_protocol_spec.htm
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test_protocol_spec.htm?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test_protocol_spec.htm (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/test-protocol/test_protocol_spec.htm Tue Nov 30 01:42:55 2010
@@ -28,27 +28,27 @@
 <p>test-protocol is a plugin to test the following categories of APIs:</p>
 <p><b>Net Processor API</b></p>
 <ul>
-  <li>INKNetAccept</li>
+  <li>TSNetAccept</li>
 </ul>
 <p><b>Protocol API</b></p>
 <ul>
-  <li>INKNetVConnRemoteIPGet</li>
-  <li>INKNetVConnRemotePortGet</li>
-  <li>INKIOBufferSizedCreate</li>
-  <li>INKIOBufferWaterMarkGet</li>
-  <li>INKIOBufferWaterMarkSet</li>
-  <li>INKIOBufferWrite</li>
+  <li>TSNetVConnRemoteIPGet</li>
+  <li>TSNetVConnRemotePortGet</li>
+  <li>TSIOBufferSizedCreate</li>
+  <li>TSIOBufferWaterMarkGet</li>
+  <li>TSIOBufferWaterMarkSet</li>
+  <li>TSIOBufferWrite</li>
 </ul>
 <p><b>Logging API</b></p>
 <ul>
-  <li>INKTextLogObjectCreate</li>
-  <li>INKTextLogObjectHeaderSet</li>
-  <li>INKTextLogObjectRollingEnabledSet</li>
-  <li>INKTextLogObjectRollingIntervalSecSet</li>
-  <li>INKTextLogObjectRollingOffsetHrSet</li>
-  <li>INKTextLogObjectWrite</li>
-  <li>INKTextLogObjectFlush</li>
-  <li>INKTextLogObjectDestroy</li>
+  <li>TSTextLogObjectCreate</li>
+  <li>TSTextLogObjectHeaderSet</li>
+  <li>TSTextLogObjectRollingEnabledSet</li>
+  <li>TSTextLogObjectRollingIntervalSecSet</li>
+  <li>TSTextLogObjectRollingOffsetHrSet</li>
+  <li>TSTextLogObjectWrite</li>
+  <li>TSTextLogObjectFlush</li>
+  <li>TSTextLogObjectDestroy</li>
 </ul>
 <p>It basically simulates the the server side in a client/server connection. We'll 
   have a separate synthetic client which keeps sending requests to this server. 
@@ -83,36 +83,36 @@
   client's requests.</p>
 <p>The following are the steps the plugin performs:</p>
 <p>1) Create a text log object</p>
-<p>Create a text log object with INKTextLogObjectCreate, set its header with INKTextLogObjectHeaderSet, 
-  and set the rolling parameters with INKTextLogObjectRollingEnabledSet, INKTextLogObjectRollingIntervalSecSet 
-  and INKTextLogObjectRollingOffsetHrSet.</p>
+<p>Create a text log object with TSTextLogObjectCreate, set its header with TSTextLogObjectHeaderSet, 
+  and set the rolling parameters with TSTextLogObjectRollingEnabledSet, TSTextLogObjectRollingIntervalSecSet 
+  and TSTextLogObjectRollingOffsetHrSet.</p>
 <p>2) Listen for and accept client requests</p>
-<p>It calls INKNetAccept to listen on a specific port and accepts the requests 
-  from the client. The handler function of the callback continuation for INKNetAccept 
+<p>It calls TSNetAccept to listen on a specific port and accepts the requests 
+  from the client. The handler function of the callback continuation for TSNetAccept 
   checks if the connection has been established successfully (by checking if it's 
-  called back with the event INK_EVENT_NET_ACCEPT). The caller also checks the 
-  return value of INKNetAccept to see if it makes sense. </p>
+  called back with the event TS_EVENT_NET_ACCEPT). The caller also checks the 
+  return value of TSNetAccept to see if it makes sense. </p>
 <p>3) Get the remote IP and port of the net vconnection.</p>
-<p>The callback function of INKNetAccept calls INKNetVConnRemoteIPGet and INKNetVConnRemotePortGet 
+<p>The callback function of TSNetAccept calls TSNetVConnRemoteIPGet and TSNetVConnRemotePortGet 
   to get the remote IP and port of the net vconnection. It then schedules another 
   continuation call to handle the following work.</p>
 <p>4) Read the client request content into a buffer</p>
-<p>Call INKVConnRead to read the client's request into an IOBuffer. Set the watermark 
-  of the client request IOBuffer with INKIOBufferWaterMarkSet. The IOBuffer calls 
-  back the continuation only when watermark amount of data is available. Use INKIOBufferWaterMarkGet 
+<p>Call TSVConnRead to read the client's request into an IOBuffer. Set the watermark 
+  of the client request IOBuffer with TSIOBufferWaterMarkSet. The IOBuffer calls 
+  back the continuation only when watermark amount of data is available. Use TSIOBufferWaterMarkGet 
   to check if the watermark is set correctly.</p>
 <p>5) Parse the client's request</p>
 <p>Get the <i>pattern</i> and <i>number</i> from the client request and check 
   if they exceed the length limits.</p>
 <p>6) Log the client's request</p>
-<p>Write the client request into the log with INKTextLogObjectWrite, flush the 
-  log with INKTextLogObjectFlush and destroy the log object with INKTextLogObjectDestroy.</p>
+<p>Write the client request into the log with TSTextLogObjectWrite, flush the 
+  log with TSTextLogObjectFlush and destroy the log object with TSTextLogObjectDestroy.</p>
 <p>7) Create the response being sent to the client</p>
 <p>Repeat the <i>pattern</i> for <i>number</i> of times and saves it in a buffer. 
   This will be the response sent back to the client.</p>
 <p>8) Send the response to the client</p>
-<p>Create an IOBuffer for client response with INKIOBufferSizedCreate, write the 
-  response to the IOBuffer with INKIOBufferWrite, then call INKVConnWrite to send 
+<p>Create an IOBuffer for client response with TSIOBufferSizedCreate, write the 
+  response to the IOBuffer with TSIOBufferWrite, then call TSVConnWrite to send 
   the response to the client.</p>
 <p><b><font size="+1">Plugin Structure</font></b></p>
 <p><img src="test-protocol.JPG" width="959" height="719"></p>