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 [24/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/CacheAPITester/CacheAPITester.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/CacheAPITester/CacheAPITester.c?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/CacheAPITester/CacheAPITester.c (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/CacheAPITester/CacheAPITester.c Tue Nov 30 01:42:55 2010
@@ -40,9 +40,9 @@
 
 
 void
-cache_exercise(INKHttpTxn txnp, char *url, int pin_val, int hostname_set, INKCont cache_handler_cont)
+cache_exercise(TSHttpTxn txnp, char *url, int pin_val, int hostname_set, TSCont cache_handler_cont)
 {
-  INKCacheKey cache_key;
+  TSCacheKey cache_key;
   CACHE_URL_DATA *url_data;
   int cache_ready;
   char *pchar;
@@ -64,63 +64,63 @@ cache_exercise(INKHttpTxn txnp, char *ur
     *pchar = '\0';
   }
 
-  if (INKCacheReady(&cache_ready) == INK_ERROR) {
-    LOG_ERROR_AND_REENABLE("INKCacheReady");
+  if (TSCacheReady(&cache_ready) == TS_ERROR) {
+    LOG_ERROR_AND_REENABLE("TSCacheReady");
     return;
   }
 #ifdef DEBUG
-  /*INKDebug(DEBUG_TAG, "Starting Negative Test for INKCacheReady"); */
-  if (INKCacheReady(NULL) != INK_ERROR) {
-    LOG_ERROR_NEG("INKCacheReady(NULL)");
+  /*TSDebug(DEBUG_TAG, "Starting Negative Test for TSCacheReady"); */
+  if (TSCacheReady(NULL) != TS_ERROR) {
+    LOG_ERROR_NEG("TSCacheReady(NULL)");
   }
-  /*INKDebug(DEBUG_TAG, "Done Negative Test for INKCacheReady"); */
+  /*TSDebug(DEBUG_TAG, "Done Negative Test for TSCacheReady"); */
 #endif
 
   if (cache_ready == 0) {
-    INKDebug(DEBUG_TAG, "%s: ERROR!! Cache Not Ready\n", PLUGIN_NAME);
+    TSDebug(DEBUG_TAG, "%s: ERROR!! Cache Not Ready\n", PLUGIN_NAME);
     insert_in_response(txnp, "MISS");
-    INKHttpTxnReenable(txnp, INK_EVENT_HTTP_CONTINUE);
+    TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
     return;
   }
 
-  if (INKCacheKeyCreate(&cache_key) == INK_ERROR) {
-    LOG_ERROR_AND_REENABLE("INKCacheKeyCreate");
+  if (TSCacheKeyCreate(&cache_key) == TS_ERROR) {
+    LOG_ERROR_AND_REENABLE("TSCacheKeyCreate");
     return;
   }
 #ifdef DEBUG
-  /*INKDebug(DEBUG_TAG, "Starting Negative Test for INKCacheKeyCreate"); */
-  if (INKCacheKeyCreate(NULL) != INK_ERROR) {
-    LOG_ERROR_NEG("INKCacheKeyCreate(NULL)");
+  /*TSDebug(DEBUG_TAG, "Starting Negative Test for TSCacheKeyCreate"); */
+  if (TSCacheKeyCreate(NULL) != TS_ERROR) {
+    LOG_ERROR_NEG("TSCacheKeyCreate(NULL)");
   }
-  /*INKDebug(DEBUG_TAG, "Done Negative Test for INKCacheKeyCreate"); */
+  /*TSDebug(DEBUG_TAG, "Done Negative Test for TSCacheKeyCreate"); */
 #endif
 
 #ifdef DEBUG
-  /*INKDebug(DEBUG_TAG, "Starting Negative Test for INKCacheKeyDigestSet"); */
-  if (INKCacheKeyDigestSet(NULL, (unsigned char *) url, strlen(url)) != INK_ERROR) {
-    LOG_ERROR_NEG("INKCacheKeyDigestSet(NULL, string, len)");
+  /*TSDebug(DEBUG_TAG, "Starting Negative Test for TSCacheKeyDigestSet"); */
+  if (TSCacheKeyDigestSet(NULL, (unsigned char *) url, strlen(url)) != TS_ERROR) {
+    LOG_ERROR_NEG("TSCacheKeyDigestSet(NULL, string, len)");
   }
 
-  if (INKCacheKeyDigestSet(cache_key, NULL, strlen(url)) != INK_ERROR) {
-    LOG_ERROR_NEG("INKCacheKeyDigestSet(cache_key, NULL, len)");
+  if (TSCacheKeyDigestSet(cache_key, NULL, strlen(url)) != TS_ERROR) {
+    LOG_ERROR_NEG("TSCacheKeyDigestSet(cache_key, NULL, len)");
   }
 
-  if (INKCacheKeyDigestSet(cache_key, (unsigned char *) url, -1) != INK_ERROR) {
-    LOG_ERROR_NEG("INKCacheKeyDigestSet(cache_key, string, -1)");
+  if (TSCacheKeyDigestSet(cache_key, (unsigned char *) url, -1) != TS_ERROR) {
+    LOG_ERROR_NEG("TSCacheKeyDigestSet(cache_key, string, -1)");
   }
-  /*INKDebug(DEBUG_TAG, "Done Negative Test for INKCacheKeyDigestSet"); */
+  /*TSDebug(DEBUG_TAG, "Done Negative Test for TSCacheKeyDigestSet"); */
 #endif
 
-  if (INKCacheKeyDigestSet(cache_key, (unsigned char *) url, strlen(url)) == INK_ERROR) {
-    INKCacheKeyDestroy(cache_key);
-    LOG_ERROR_AND_REENABLE("INKCacheKeyDigestSet");
+  if (TSCacheKeyDigestSet(cache_key, (unsigned char *) url, strlen(url)) == TS_ERROR) {
+    TSCacheKeyDestroy(cache_key);
+    LOG_ERROR_AND_REENABLE("TSCacheKeyDigestSet");
     return;
   }
 
-  url_data = INKmalloc(sizeof(CACHE_URL_DATA));
+  url_data = TSmalloc(sizeof(CACHE_URL_DATA));
   if (url_data == NULL) {
-    INKCacheKeyDestroy(cache_key);
-    LOG_ERROR_AND_REENABLE("INKmalloc");
+    TSCacheKeyDestroy(cache_key);
+    LOG_ERROR_AND_REENABLE("TSmalloc");
     return;
   }
 
@@ -132,92 +132,92 @@ cache_exercise(INKHttpTxn txnp, char *ur
   url_data->write_again_after_remove = 0;
   url_data->txnp = txnp;
 
-  url_data->bufp = INKIOBufferCreate();
-  if (url_data->bufp == INK_ERROR_PTR) {
-    INKCacheKeyDestroy(cache_key);
-    INKfree(url_data);
-    LOG_ERROR_AND_REENABLE("INKIOBufferCreate");
+  url_data->bufp = TSIOBufferCreate();
+  if (url_data->bufp == TS_ERROR_PTR) {
+    TSCacheKeyDestroy(cache_key);
+    TSfree(url_data);
+    LOG_ERROR_AND_REENABLE("TSIOBufferCreate");
     return;
   }
 
-  if (INKContDataSet(cache_handler_cont, url_data) == INK_ERROR) {
-    INKCacheKeyDestroy(cache_key);
-    INKfree(url_data);
-    LOG_ERROR_AND_REENABLE("INKContDataSet");
+  if (TSContDataSet(cache_handler_cont, url_data) == TS_ERROR) {
+    TSCacheKeyDestroy(cache_key);
+    TSfree(url_data);
+    LOG_ERROR_AND_REENABLE("TSContDataSet");
     return;
   }
 #ifdef DEBUG
-  /*INKDebug(DEBUG_TAG, "Starting Negative Test for INKCacheKeyHostNameSet"); */
-  if (INKCacheKeyHostNameSet(NULL, (unsigned char *) hostname, strlen(hostname)) != INK_ERROR) {
-    LOG_ERROR_NEG("INKCacheKeyHostNameSet(NULL, string, len)");
+  /*TSDebug(DEBUG_TAG, "Starting Negative Test for TSCacheKeyHostNameSet"); */
+  if (TSCacheKeyHostNameSet(NULL, (unsigned char *) hostname, strlen(hostname)) != TS_ERROR) {
+    LOG_ERROR_NEG("TSCacheKeyHostNameSet(NULL, string, len)");
   }
 
-  if (INKCacheKeyHostNameSet(url_data->key, NULL, strlen(hostname)) != INK_ERROR) {
-    LOG_ERROR_NEG("INKCacheKeyHostNameSet(cache_key, NULL, len)");
+  if (TSCacheKeyHostNameSet(url_data->key, NULL, strlen(hostname)) != TS_ERROR) {
+    LOG_ERROR_NEG("TSCacheKeyHostNameSet(cache_key, NULL, len)");
   }
 
-  if (INKCacheKeyHostNameSet(url_data->key, (unsigned char *) hostname, -1) != INK_ERROR) {
-    LOG_ERROR_NEG("INKCacheKeyHostNameSet(cache_key, string, -1)");
+  if (TSCacheKeyHostNameSet(url_data->key, (unsigned char *) hostname, -1) != TS_ERROR) {
+    LOG_ERROR_NEG("TSCacheKeyHostNameSet(cache_key, string, -1)");
   }
-  /*INKDebug(DEBUG_TAG, "Done Negative Test for INKCacheKeyHostNameSet"); */
+  /*TSDebug(DEBUG_TAG, "Done Negative Test for TSCacheKeyHostNameSet"); */
 #endif
 
   if (hostname_set > 0) {
-    INKDebug(DEBUG_TAG, "HostName set for cache_key to %s", hostname);
-    if (INKCacheKeyHostNameSet(url_data->key, (unsigned char *) hostname, strlen(hostname)) == INK_ERROR) {
-      INKCacheKeyDestroy(cache_key);
-      INKfree(url_data);
-      LOG_ERROR_AND_REENABLE("INKCacheKeyHostNameSet");
+    TSDebug(DEBUG_TAG, "HostName set for cache_key to %s", hostname);
+    if (TSCacheKeyHostNameSet(url_data->key, (unsigned char *) hostname, strlen(hostname)) == TS_ERROR) {
+      TSCacheKeyDestroy(cache_key);
+      TSfree(url_data);
+      LOG_ERROR_AND_REENABLE("TSCacheKeyHostNameSet");
       return;
     }
   }
 
   /* try to read from the cache */
-  if (INKCacheRead(cache_handler_cont, cache_key) == INK_ERROR_PTR) {
-    INKCacheKeyDestroy(cache_key);
-    INKfree(url_data);
-    LOG_ERROR_AND_REENABLE("INKCacheRead");
+  if (TSCacheRead(cache_handler_cont, cache_key) == TS_ERROR_PTR) {
+    TSCacheKeyDestroy(cache_key);
+    TSfree(url_data);
+    LOG_ERROR_AND_REENABLE("TSCacheRead");
     return;
   }
 #ifdef DEBUG
-  /*INKDebug(DEBUG_TAG, "Starting Negative Test for INKCacheRead"); */
-  if (INKCacheRead(cache_handler_cont, NULL) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKCacheRead(cache_handler_cont, NULL)");
+  /*TSDebug(DEBUG_TAG, "Starting Negative Test for TSCacheRead"); */
+  if (TSCacheRead(cache_handler_cont, NULL) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSCacheRead(cache_handler_cont, NULL)");
   }
 
-  if (INKCacheRead(NULL, cache_key) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKCacheRead(NULL, cache_key)");
+  if (TSCacheRead(NULL, cache_key) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSCacheRead(NULL, cache_key)");
   }
-  /*INKDebug(DEBUG_TAG, "Done Negative Test for INKCacheRead"); */
+  /*TSDebug(DEBUG_TAG, "Done Negative Test for TSCacheRead"); */
 #endif
 
   return;
 }
 
 static int
-handle_cache_events(INKCont contp, INKEvent event, void *edata)
+handle_cache_events(TSCont contp, TSEvent event, void *edata)
 {
   CACHE_URL_DATA *url_data;
-  INKVConn connp = (INKVConn) edata;
+  TSVConn connp = (TSVConn) edata;
   char tempstr[32];
 
   LOG_SET_FUNCTION_NAME("handle_cache_events");
 
-  url_data = (CACHE_URL_DATA *) INKContDataGet(contp);
-  if (url_data == INK_ERROR_PTR) {
-    LOG_ERROR_AND_RETURN("INKContDataGet");
+  url_data = (CACHE_URL_DATA *) TSContDataGet(contp);
+  if (url_data == TS_ERROR_PTR) {
+    LOG_ERROR_AND_RETURN("TSContDataGet");
   }
 
-  if (event != INK_EVENT_HTTP_TXN_CLOSE) {
-    INKReleaseAssert(url_data->magic == MAGIC_ALIVE);
+  if (event != TS_EVENT_HTTP_TXN_CLOSE) {
+    TSReleaseAssert(url_data->magic == MAGIC_ALIVE);
   } else {
-    INKReleaseAssert((url_data == NULL) || (url_data->magic == MAGIC_ALIVE));
+    TSReleaseAssert((url_data == NULL) || (url_data->magic == MAGIC_ALIVE));
   }
 
   switch (event) {
-  case INK_EVENT_CACHE_OPEN_READ:
+  case TS_EVENT_CACHE_OPEN_READ:
     /*handle_cache_read(); */
-    INKDebug(DEBUG_TAG, "INK_EVENT_CACHE_OPEN_READ\n");
+    TSDebug(DEBUG_TAG, "TS_EVENT_CACHE_OPEN_READ\n");
 
     if (url_data->pin_time != 0) {
       sprintf(tempstr, "PIN%d", url_data->pin_time);
@@ -230,51 +230,51 @@ handle_cache_events(INKCont contp, INKEv
 
       url_data->write_again_after_remove = 1;
 
-      if (INKCacheRemove(contp, url_data->key) == INK_ERROR_PTR) {
-        LOG_ERROR("INKCacheRemove");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      if (TSCacheRemove(contp, url_data->key) == TS_ERROR_PTR) {
+        LOG_ERROR("TSCacheRemove");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
 #ifdef DEBUG
-      if (INKCacheRemove(NULL, url_data->key) != INK_ERROR_PTR) {
-        LOG_ERROR_NEG("INKCacheRemove(NULL, cache_key)");
+      if (TSCacheRemove(NULL, url_data->key) != TS_ERROR_PTR) {
+        LOG_ERROR_NEG("TSCacheRemove(NULL, cache_key)");
       }
 
-      if (INKCacheRemove(contp, NULL) != INK_ERROR_PTR) {
-        LOG_ERROR_NEG("INKCacheRemove(contp, NULL)");
+      if (TSCacheRemove(contp, NULL) != TS_ERROR_PTR) {
+        LOG_ERROR_NEG("TSCacheRemove(contp, NULL)");
       }
 #endif
       return 0;
     }
 #ifdef DEBUG
-    if (INKVConnRead(NULL, contp, url_data->bufp, url_data->url_len) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVConnRead(NULL, contp, bufp, url_len)");
+    if (TSVConnRead(NULL, contp, url_data->bufp, url_data->url_len) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVConnRead(NULL, contp, bufp, url_len)");
     }
 
-    if (INKVConnRead(connp, NULL, url_data->bufp, url_data->url_len) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVConnRead(connp, NULL, bufp, url_len)");
+    if (TSVConnRead(connp, NULL, url_data->bufp, url_data->url_len) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVConnRead(connp, NULL, bufp, url_len)");
     }
 
-    if (INKVConnRead(connp, contp, NULL, url_data->url_len) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVConnRead(connp, contp, NULL, url_len)");
+    if (TSVConnRead(connp, contp, NULL, url_data->url_len) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVConnRead(connp, contp, NULL, url_len)");
     }
 
-    if (INKVConnRead(connp, contp, url_data->bufp, -1) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVConnRead(connp, contp, bufp, -1)");
+    if (TSVConnRead(connp, contp, url_data->bufp, -1) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVConnRead(connp, contp, bufp, -1)");
     }
 #endif
 
-    if (INKVConnRead(connp, contp, url_data->bufp, url_data->url_len) == INK_ERROR_PTR) {
-      LOG_ERROR("INKVConnRead");
-      INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    if (TSVConnRead(connp, contp, url_data->bufp, url_data->url_len) == TS_ERROR_PTR) {
+      LOG_ERROR("TSVConnRead");
+      TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
       return -1;
     }
 
     break;
 
-  case INK_EVENT_CACHE_OPEN_READ_FAILED:
+  case TS_EVENT_CACHE_OPEN_READ_FAILED:
     /*handle_cache_read_fail(); */
-    INKDebug(DEBUG_TAG, "INK_EVENT_CACHE_OPEN_READ_FAILED(%d)\n", edata);
+    TSDebug(DEBUG_TAG, "TS_EVENT_CACHE_OPEN_READ_FAILED(%d)\n", edata);
 
     if (url_data->pin_time != 0) {
       sprintf(tempstr, "PIN%d", url_data->pin_time);
@@ -284,218 +284,218 @@ handle_cache_events(INKCont contp, INKEv
     insert_in_response(url_data->txnp, tempstr);
 
     if (url_data->pin_time != 0) {
-      INKDebug(DEBUG_TAG, "url Pinned in cache for %d secs", url_data->pin_time);
-      if (INKCacheKeyPinnedSet(url_data->key, url_data->pin_time) == INK_ERROR) {
-        LOG_ERROR("INKCacheKeyPinnedSet");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      TSDebug(DEBUG_TAG, "url Pinned in cache for %d secs", url_data->pin_time);
+      if (TSCacheKeyPinnedSet(url_data->key, url_data->pin_time) == TS_ERROR) {
+        LOG_ERROR("TSCacheKeyPinnedSet");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
 #ifdef DEBUG
-      if (INKCacheKeyPinnedSet(NULL, url_data->pin_time) != INK_ERROR) {
-        LOG_ERROR_NEG("INKCacheKeyPinnedSet(NULL, pin_time)");
+      if (TSCacheKeyPinnedSet(NULL, url_data->pin_time) != TS_ERROR) {
+        LOG_ERROR_NEG("TSCacheKeyPinnedSet(NULL, pin_time)");
       }
 
-      if (INKCacheKeyPinnedSet(url_data->key, -1) != INK_ERROR) {
-        LOG_ERROR_NEG("INKCacheKeyPinnedSet(cache_key, -1)");
+      if (TSCacheKeyPinnedSet(url_data->key, -1) != TS_ERROR) {
+        LOG_ERROR_NEG("TSCacheKeyPinnedSet(cache_key, -1)");
       }
 #endif
     }
 
-    if (INKCacheWrite(contp, url_data->key) == INK_ERROR_PTR) {
-      LOG_ERROR("INKCacheWrite");
-      INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    if (TSCacheWrite(contp, url_data->key) == TS_ERROR_PTR) {
+      LOG_ERROR("TSCacheWrite");
+      TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
       return -1;
     }
 #ifdef DEBUG
-    if (INKCacheWrite(contp, NULL) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKCacheWrite(contp, NULL)");
+    if (TSCacheWrite(contp, NULL) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSCacheWrite(contp, NULL)");
     }
 
-    if (INKCacheWrite(NULL, url_data->key) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKCacheWrite(NULL, url_data->key)");
+    if (TSCacheWrite(NULL, url_data->key) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSCacheWrite(NULL, url_data->key)");
     }
 #endif
 
     break;
 
-  case INK_EVENT_CACHE_OPEN_WRITE:
+  case TS_EVENT_CACHE_OPEN_WRITE:
     /*handle_cache_write(); */
-    INKDebug(DEBUG_TAG, "INK_EVENT_CACHE_OPEN_WRITE\n");
+    TSDebug(DEBUG_TAG, "TS_EVENT_CACHE_OPEN_WRITE\n");
 
-    if (INKIOBufferWrite(url_data->bufp, url_data->url, url_data->url_len) == INK_ERROR) {
-      LOG_ERROR("INKIOBufferWrite");
-      INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    if (TSIOBufferWrite(url_data->bufp, url_data->url, url_data->url_len) == TS_ERROR) {
+      LOG_ERROR("TSIOBufferWrite");
+      TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
       return -1;
     }
 
-    url_data->bufp_reader = INKIOBufferReaderAlloc(url_data->bufp);
-    if (url_data->bufp_reader == INK_ERROR_PTR) {
-      LOG_ERROR("INKIOBufferReaderAlloc");
-      INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    url_data->bufp_reader = TSIOBufferReaderAlloc(url_data->bufp);
+    if (url_data->bufp_reader == TS_ERROR_PTR) {
+      LOG_ERROR("TSIOBufferReaderAlloc");
+      TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
       return -1;
     }
 #ifdef DEBUG
-    if (INKVConnWrite(NULL, contp, url_data->bufp_reader, url_data->url_len) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVConnWrite(NULL, contp, bufp_reader, url_len");
+    if (TSVConnWrite(NULL, contp, url_data->bufp_reader, url_data->url_len) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVConnWrite(NULL, contp, bufp_reader, url_len");
     }
 
-    if (INKVConnWrite(connp, NULL, url_data->bufp_reader, url_data->url_len) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVConnWrite(connp, NULL, bufp_reader, url_len");
+    if (TSVConnWrite(connp, NULL, url_data->bufp_reader, url_data->url_len) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVConnWrite(connp, NULL, bufp_reader, url_len");
     }
 
-    if (INKVConnWrite(connp, contp, NULL, url_data->url_len) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVConnWrite(connp, contp, NULL, url_len");
+    if (TSVConnWrite(connp, contp, NULL, url_data->url_len) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVConnWrite(connp, contp, NULL, url_len");
     }
 
-    if (INKVConnWrite(connp, contp, url_data->bufp_reader, -1) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVConnWrite(connp, contp, bufp_reader, -1");
+    if (TSVConnWrite(connp, contp, url_data->bufp_reader, -1) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVConnWrite(connp, contp, bufp_reader, -1");
     }
 #endif
 
-    if (INKVConnWrite(connp, contp, url_data->bufp_reader, url_data->url_len) == INK_ERROR_PTR) {
-      LOG_ERROR("INKVConnWrite");
-      INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    if (TSVConnWrite(connp, contp, url_data->bufp_reader, url_data->url_len) == TS_ERROR_PTR) {
+      LOG_ERROR("TSVConnWrite");
+      TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
       return -1;
     }
 
     break;
 
-  case INK_EVENT_CACHE_OPEN_WRITE_FAILED:
+  case TS_EVENT_CACHE_OPEN_WRITE_FAILED:
     /*handle_cache_write_fail(); */
-    INKDebug(DEBUG_TAG, "INK_EVENT_CACHE_OPEN_WRITE_FAILED(%d)\n", edata);
-    INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    TSDebug(DEBUG_TAG, "TS_EVENT_CACHE_OPEN_WRITE_FAILED(%d)\n", edata);
+    TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
 
     break;
 
-  case INK_EVENT_CACHE_REMOVE:
+  case TS_EVENT_CACHE_REMOVE:
     /*handle_cache_remove(); */
-    INKDebug(DEBUG_TAG, "INK_EVENT_CACHE_REMOVE\n");
+    TSDebug(DEBUG_TAG, "TS_EVENT_CACHE_REMOVE\n");
 
     if (url_data->write_again_after_remove != 0) {
 
-      INKDebug(DEBUG_TAG, "url Pinned in cache for %d secs", url_data->pin_time);
+      TSDebug(DEBUG_TAG, "url Pinned in cache for %d secs", url_data->pin_time);
       if (url_data->pin_time != 0) {
-        if (INKCacheKeyPinnedSet(url_data->key, url_data->pin_time) == INK_ERROR) {
-          LOG_ERROR("INKCacheKeyPinnedSet");
-          INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+        if (TSCacheKeyPinnedSet(url_data->key, url_data->pin_time) == TS_ERROR) {
+          LOG_ERROR("TSCacheKeyPinnedSet");
+          TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
           return -1;
         }
       }
 
-      if (INKCacheWrite(contp, url_data->key) == INK_ERROR_PTR) {
-        LOG_ERROR("INKCacheWrite");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      if (TSCacheWrite(contp, url_data->key) == TS_ERROR_PTR) {
+        LOG_ERROR("TSCacheWrite");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
     } else {
-      INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
     }
 
     break;
 
-  case INK_EVENT_CACHE_REMOVE_FAILED:
+  case TS_EVENT_CACHE_REMOVE_FAILED:
     /*handle_cache_remove_fail(); */
-    INKDebug(DEBUG_TAG, "INK_EVENT_CACHE_REMOVE_FAILED(%d)\n", edata);
-    INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    TSDebug(DEBUG_TAG, "TS_EVENT_CACHE_REMOVE_FAILED(%d)\n", edata);
+    TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
     break;
 
-  case INK_EVENT_VCONN_READ_READY:
-    INKDebug(DEBUG_TAG, "INK_EVENT_VCONN_READ_READY\n");
+  case TS_EVENT_VCONN_READ_READY:
+    TSDebug(DEBUG_TAG, "TS_EVENT_VCONN_READ_READY\n");
 
-    if (INKVIOReenable(edata) == INK_ERROR) {
-      LOG_ERROR("INKVIOReenable");
+    if (TSVIOReenable(edata) == TS_ERROR) {
+      LOG_ERROR("TSVIOReenable");
     }
 #ifdef DEBUG
-    if (INKVIOReenable(NULL) != INK_ERROR) {
-      LOG_ERROR_NEG("INKVIOReenable");
+    if (TSVIOReenable(NULL) != TS_ERROR) {
+      LOG_ERROR_NEG("TSVIOReenable");
     }
 #endif
 
     break;
 
-  case INK_EVENT_VCONN_WRITE_READY:
-    INKDebug(DEBUG_TAG, "INK_EVENT_VCONN_WRITE_READY\n");
+  case TS_EVENT_VCONN_WRITE_READY:
+    TSDebug(DEBUG_TAG, "TS_EVENT_VCONN_WRITE_READY\n");
 
-    if (INKVIOReenable(edata) == INK_ERROR) {
-      LOG_ERROR("INKVIOReenable");
+    if (TSVIOReenable(edata) == TS_ERROR) {
+      LOG_ERROR("TSVIOReenable");
     }
 #ifdef DEBUG
-    if (INKVIOReenable(NULL) != INK_ERROR) {
-      LOG_ERROR_NEG("INKVIOReenable");
+    if (TSVIOReenable(NULL) != TS_ERROR) {
+      LOG_ERROR_NEG("TSVIOReenable");
     }
 #endif
 
     break;
 
-  case INK_EVENT_VCONN_READ_COMPLETE:
-    INKDebug(DEBUG_TAG, "INK_EVENT_VCONN_READ_COMPLETE\n");
+  case TS_EVENT_VCONN_READ_COMPLETE:
+    TSDebug(DEBUG_TAG, "TS_EVENT_VCONN_READ_COMPLETE\n");
     {
-      INKIOBufferBlock blk;
+      TSIOBufferBlock blk;
       char *src;
       char dst[MAX_URL_LEN];
       int avail;
       int url_len_from_cache;
 
-      if ((connp = INKVIOVConnGet(edata)) == INK_ERROR_PTR) {
-        LOG_ERROR("INKVIOVConnGet");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      if ((connp = TSVIOVConnGet(edata)) == TS_ERROR_PTR) {
+        LOG_ERROR("TSVIOVConnGet");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
 #ifdef DEBUG
-      if (INKVConnCacheObjectSizeGet(NULL, &url_len_from_cache) != INK_ERROR) {
-        LOG_ERROR_NEG("INKVConnCacheObjectSizeGet(NULL, &size)");
+      if (TSVConnCacheObjectSizeGet(NULL, &url_len_from_cache) != TS_ERROR) {
+        LOG_ERROR_NEG("TSVConnCacheObjectSizeGet(NULL, &size)");
       }
 
-      if (INKVConnCacheObjectSizeGet(connp, NULL) != INK_ERROR) {
-        LOG_ERROR_NEG("INKVConnCacheObjectSizeGet(inkvconn, NULL)");
+      if (TSVConnCacheObjectSizeGet(connp, NULL) != TS_ERROR) {
+        LOG_ERROR_NEG("TSVConnCacheObjectSizeGet(inkvconn, NULL)");
       }
 #endif
 
-      if (INKVConnCacheObjectSizeGet(connp, &url_len_from_cache) == INK_ERROR) {
-        LOG_ERROR("INKVConnCacheObjectSizeGet");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      if (TSVConnCacheObjectSizeGet(connp, &url_len_from_cache) == TS_ERROR) {
+        LOG_ERROR("TSVConnCacheObjectSizeGet");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
 
       if (url_len_from_cache != url_data->url_len) {
-        LOG_ERROR("INKVConnCacheObjectSizeGet-mismatch");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+        LOG_ERROR("TSVConnCacheObjectSizeGet-mismatch");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
 
-      if ((connp = INKVIOVConnGet(edata)) == INK_ERROR_PTR) {
-        LOG_ERROR("INKVIOVConnGet");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      if ((connp = TSVIOVConnGet(edata)) == TS_ERROR_PTR) {
+        LOG_ERROR("TSVIOVConnGet");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
 #ifdef DEBUG
-      if (INKVIOVConnGet(NULL) != INK_ERROR_PTR) {
-        LOG_ERROR_NEG("INKVIOVConnGet(null)");
+      if (TSVIOVConnGet(NULL) != TS_ERROR_PTR) {
+        LOG_ERROR_NEG("TSVIOVConnGet(null)");
       }
 
-      if (INKVConnClose(NULL) != INK_ERROR) {
-        LOG_ERROR_NEG("INKVConnClose(NULL)");
+      if (TSVConnClose(NULL) != TS_ERROR) {
+        LOG_ERROR_NEG("TSVConnClose(NULL)");
       }
 #endif
 
-      if (INKVConnClose(connp) == INK_ERROR) {
-        LOG_ERROR("INKVConnClose");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      if (TSVConnClose(connp) == TS_ERROR) {
+        LOG_ERROR("TSVConnClose");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
 
-      url_data = (CACHE_URL_DATA *) INKContDataGet(contp);
-      INKReleaseAssert(url_data->magic == MAGIC_ALIVE);
+      url_data = (CACHE_URL_DATA *) TSContDataGet(contp);
+      TSReleaseAssert(url_data->magic == MAGIC_ALIVE);
 
-      url_data->bufp_reader = INKIOBufferReaderAlloc(url_data->bufp);
-      blk = INKIOBufferReaderStart(url_data->bufp_reader);
-      if (blk == INK_ERROR_PTR) {
-        LOG_ERROR("INKIOBufferReaderStart");
-        INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+      url_data->bufp_reader = TSIOBufferReaderAlloc(url_data->bufp);
+      blk = TSIOBufferReaderStart(url_data->bufp_reader);
+      if (blk == TS_ERROR_PTR) {
+        LOG_ERROR("TSIOBufferReaderStart");
+        TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
         return -1;
       }
 
-      src = (char *) INKIOBufferBlockReadStart(blk, url_data->bufp_reader, &avail);
+      src = (char *) TSIOBufferBlockReadStart(blk, url_data->bufp_reader, &avail);
       /* FC: make sure we do not copy more than MAX_URL_LEN-1 bytes into dst */
       if (avail < 0) {
         avail = 0;
@@ -505,82 +505,82 @@ handle_cache_events(INKCont contp, INKEv
       dst[avail] = '\0';
 
       if (strcmp(dst, url_data->url) != 0) {
-        INKDebug(DEBUG_TAG, "URL in cache NO_MATCH\ndst=[%s]\nurl=[%s]\n", dst, url_data->url);
+        TSDebug(DEBUG_TAG, "URL in cache NO_MATCH\ndst=[%s]\nurl=[%s]\n", dst, url_data->url);
       }
     }
-    INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
 
     break;
 
-  case INK_EVENT_VCONN_WRITE_COMPLETE:
-    INKDebug(DEBUG_TAG, "INK_EVENT_VCONN_WRITE_COMPLETE\n");
+  case TS_EVENT_VCONN_WRITE_COMPLETE:
+    TSDebug(DEBUG_TAG, "TS_EVENT_VCONN_WRITE_COMPLETE\n");
 
-    if ((connp = INKVIOVConnGet(edata)) == INK_ERROR_PTR) {
-      LOG_ERROR("INKVIOVConnGet");
-      INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    if ((connp = TSVIOVConnGet(edata)) == TS_ERROR_PTR) {
+      LOG_ERROR("TSVIOVConnGet");
+      TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
       return -1;
     }
 #ifdef DEBUG
-    if (INKVIOVConnGet(NULL) != INK_ERROR_PTR) {
-      LOG_ERROR_NEG("INKVIOVConnGet(null)");
+    if (TSVIOVConnGet(NULL) != TS_ERROR_PTR) {
+      LOG_ERROR_NEG("TSVIOVConnGet(null)");
     }
 
-    if (INKVConnClose(NULL) != INK_ERROR) {
-      LOG_ERROR_NEG("INKVConnClose(NULL)");
+    if (TSVConnClose(NULL) != TS_ERROR) {
+      LOG_ERROR_NEG("TSVConnClose(NULL)");
     }
 #endif
 
-    if (INKVConnClose(connp) == INK_ERROR) {
-      LOG_ERROR("INKVConnClose");
-      INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    if (TSVConnClose(connp) == TS_ERROR) {
+      LOG_ERROR("TSVConnClose");
+      TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
       return -1;
     }
 
-    INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+    TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
     break;
 
-  case INK_EVENT_VCONN_EOS:
-    INKDebug(DEBUG_TAG, "INK_EVENT_VCONN_EOS\n");
+  case TS_EVENT_VCONN_EOS:
+    TSDebug(DEBUG_TAG, "TS_EVENT_VCONN_EOS\n");
     break;
 
-  case INK_EVENT_ERROR:
-    INKDebug(DEBUG_TAG, "INK_EVENT_ERROR\n");
-    INKHttpTxnReenable(url_data->txnp, INK_EVENT_HTTP_CONTINUE);
+  case TS_EVENT_ERROR:
+    TSDebug(DEBUG_TAG, "TS_EVENT_ERROR\n");
+    TSHttpTxnReenable(url_data->txnp, TS_EVENT_HTTP_CONTINUE);
     break;
 
-  case INK_EVENT_HTTP_TXN_CLOSE:
-    INKDebug(DEBUG_TAG, "INK_EVENT_HTTP_TXN_CLOSE\n");
+  case TS_EVENT_HTTP_TXN_CLOSE:
+    TSDebug(DEBUG_TAG, "TS_EVENT_HTTP_TXN_CLOSE\n");
 
     if (url_data == NULL) {
-      INKHttpTxnReenable(edata, INK_EVENT_HTTP_CONTINUE);
+      TSHttpTxnReenable(edata, TS_EVENT_HTTP_CONTINUE);
       break;
     }
 
     if (url_data->url != NULL) {
-      INKfree(url_data->url);
+      TSfree(url_data->url);
     }
 
-    if (INKCacheKeyDestroy(url_data->key) == INK_ERROR) {
-      LOG_ERROR("INKCacheKeyDestroy");
+    if (TSCacheKeyDestroy(url_data->key) == TS_ERROR) {
+      LOG_ERROR("TSCacheKeyDestroy");
     }
 #ifdef DEBUG
-    if (INKCacheKeyDestroy(NULL) != INK_ERROR) {
-      LOG_ERROR_NEG("INKCacheKeyDestroy(NULL)");
+    if (TSCacheKeyDestroy(NULL) != TS_ERROR) {
+      LOG_ERROR_NEG("TSCacheKeyDestroy(NULL)");
     }
 
-    if (INKIOBufferDestroy(NULL) != INK_ERROR) {
-      LOG_ERROR_NEG("INKIOBufferDestroy(NULL)");
+    if (TSIOBufferDestroy(NULL) != TS_ERROR) {
+      LOG_ERROR_NEG("TSIOBufferDestroy(NULL)");
     }
 #endif
 
-    if (INKIOBufferDestroy(url_data->bufp) == INK_ERROR) {
-      LOG_ERROR("INKIOBufferDestroy");
+    if (TSIOBufferDestroy(url_data->bufp) == TS_ERROR) {
+      LOG_ERROR("TSIOBufferDestroy");
     }
 
     url_data->magic = MAGIC_DEAD;
-    INKfree(url_data);
-    INKContDestroy(contp);
-    INKHttpTxnReenable(edata, INK_EVENT_HTTP_CONTINUE);
+    TSfree(url_data);
+    TSContDestroy(contp);
+    TSHttpTxnReenable(edata, TS_EVENT_HTTP_CONTINUE);
 
     break;
 
@@ -591,10 +591,10 @@ handle_cache_events(INKCont contp, INKEv
 }
 
 static int
-event_mux(INKCont contp, INKEvent event, void *edata)
+event_mux(TSCont contp, TSEvent event, void *edata)
 {
-  INKHttpTxn txnp = (INKHttpTxn) edata;
-  INKCont newcont;
+  TSHttpTxn txnp = (TSHttpTxn) edata;
+  TSCont newcont;
   char *client_req;
   char *url_line;
   int ret_status;
@@ -605,18 +605,18 @@ event_mux(INKCont contp, INKEvent event,
 
   switch (event) {
 
-  case INK_EVENT_HTTP_SEND_RESPONSE_HDR:
-    if ((newcont = INKContCreate(handle_cache_events, INKMutexCreate())) == INK_ERROR_PTR) {
-      LOG_ERROR_AND_REENABLE("INKContCreate");
+  case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
+    if ((newcont = TSContCreate(handle_cache_events, TSMutexCreate())) == TS_ERROR_PTR) {
+      LOG_ERROR_AND_REENABLE("TSContCreate");
       return 0;
     }
 
     /* FC When called back for txn close, the plugins test if the value of the
        continuation data ptr is null or not. Initialize it here to null. */
-    INKContDataSet(newcont, NULL);
+    TSContDataSet(newcont, NULL);
 
-    if (INKHttpTxnHookAdd(edata, INK_HTTP_TXN_CLOSE_HOOK, newcont) == INK_ERROR) {
-      LOG_ERROR_AND_REENABLE("INKHttpTxnHookAdd");
+    if (TSHttpTxnHookAdd(edata, TS_HTTP_TXN_CLOSE_HOOK, newcont) == TS_ERROR) {
+      LOG_ERROR_AND_REENABLE("TSHttpTxnHookAdd");
       return 0;
     }
 
@@ -624,13 +624,13 @@ event_mux(INKCont contp, INKEvent event,
 
     /* FC: added test on url and client req too */
     if ((ret_status == -1) || (url_line == NULL) || (client_req == NULL)) {
-      INKDebug(DEBUG_TAG, "Unable to get client request header\n");
-      INKHttpTxnReenable(txnp, INK_EVENT_HTTP_CONTINUE);
+      TSDebug(DEBUG_TAG, "Unable to get client request header\n");
+      TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
       return 0;
     }
 
-    INKDebug(DEBUG_TAG, "\n%s\n%s", url_line, client_req);
-    INKfree(client_req);
+    TSDebug(DEBUG_TAG, "\n%s\n%s", url_line, client_req);
+    TSfree(client_req);
 
     cache_exercise(txnp, url_line, pin_val, neg_test_val, newcont);
 
@@ -643,104 +643,104 @@ event_mux(INKCont contp, INKEvent event,
 }
 
 int
-insert_in_response(INKHttpTxn txnp, char *result_val)
+insert_in_response(TSHttpTxn txnp, char *result_val)
 {
-  INKMBuffer resp_bufp;
-  INKMLoc resp_loc;
-  INKMLoc field_loc;
+  TSMBuffer resp_bufp;
+  TSMLoc resp_loc;
+  TSMLoc field_loc;
 
   LOG_SET_FUNCTION_NAME("insert_in_response");
 
 #ifdef DEBUG
-  if (INKHttpTxnClientRespGet(NULL, &resp_bufp, &resp_loc) != 0) {
-    LOG_ERROR_NEG("INKHttpTxnClientRespGet(null, buf, hdr_loc)");
+  if (TSHttpTxnClientRespGet(NULL, &resp_bufp, &resp_loc) != 0) {
+    LOG_ERROR_NEG("TSHttpTxnClientRespGet(null, buf, hdr_loc)");
   }
 
-  if (INKHttpTxnClientRespGet(txnp, NULL, &resp_loc) != 0) {
-    LOG_ERROR_NEG("INKHttpTxnClientRespGet(txnp, null, hdr_loc)");
+  if (TSHttpTxnClientRespGet(txnp, NULL, &resp_loc) != 0) {
+    LOG_ERROR_NEG("TSHttpTxnClientRespGet(txnp, null, hdr_loc)");
   }
 
-  if (INKHttpTxnClientRespGet(txnp, &resp_bufp, NULL) != 0) {
-    LOG_ERROR_NEG("INKHttpTxnClientRespGet(txnp, buf, null)");
+  if (TSHttpTxnClientRespGet(txnp, &resp_bufp, NULL) != 0) {
+    LOG_ERROR_NEG("TSHttpTxnClientRespGet(txnp, buf, null)");
   }
 #endif
 
-  if (!INKHttpTxnClientRespGet(txnp, &resp_bufp, &resp_loc)) {
-    LOG_ERROR_AND_RETURN("INKHttpTxnClientRespGet");
+  if (!TSHttpTxnClientRespGet(txnp, &resp_bufp, &resp_loc)) {
+    LOG_ERROR_AND_RETURN("TSHttpTxnClientRespGet");
   }
 
   /* create a new field in the response header */
-  if ((field_loc = INKMimeHdrFieldCreate(resp_bufp, resp_loc)) == INK_ERROR_PTR) {
-    INKHandleMLocRelease(resp_bufp, INK_NULL_MLOC, resp_loc);
-    LOG_ERROR_AND_RETURN("INKMimeHdrFieldCreate");
+  if ((field_loc = TSMimeHdrFieldCreate(resp_bufp, resp_loc)) == TS_ERROR_PTR) {
+    TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc);
+    LOG_ERROR_AND_RETURN("TSMimeHdrFieldCreate");
   }
 
   /* set its name */
-  if (INKMimeHdrFieldNameSet(resp_bufp, resp_loc, field_loc, "CacheTester-Result", 18) == INK_ERROR) {
-    INKHandleMLocRelease(resp_bufp, resp_loc, field_loc);
-    INKHandleMLocRelease(resp_bufp, INK_NULL_MLOC, resp_loc);
-    LOG_ERROR_AND_RETURN("INKMimeHdrFieldNameSet");
+  if (TSMimeHdrFieldNameSet(resp_bufp, resp_loc, field_loc, "CacheTester-Result", 18) == TS_ERROR) {
+    TSHandleMLocRelease(resp_bufp, resp_loc, field_loc);
+    TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc);
+    LOG_ERROR_AND_RETURN("TSMimeHdrFieldNameSet");
   }
 
   /* set its value */
-  if (INKMimeHdrFieldValueStringInsert(resp_bufp, resp_loc, field_loc, -1, result_val, strlen(result_val)) == INK_ERROR) {
-    INKHandleMLocRelease(resp_bufp, resp_loc, field_loc);
-    INKHandleMLocRelease(resp_bufp, INK_NULL_MLOC, resp_loc);
-    LOG_ERROR_AND_RETURN("INKMimeHdrFieldValueIntInsert");
+  if (TSMimeHdrFieldValueStringInsert(resp_bufp, resp_loc, field_loc, -1, result_val, strlen(result_val)) == TS_ERROR) {
+    TSHandleMLocRelease(resp_bufp, resp_loc, field_loc);
+    TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc);
+    LOG_ERROR_AND_RETURN("TSMimeHdrFieldValueIntInsert");
   }
 
   /* insert it into the header */
-  if (INKMimeHdrFieldAppend(resp_bufp, resp_loc, field_loc) == INK_ERROR) {
-    INKHandleMLocRelease(resp_bufp, resp_loc, field_loc);
-    INKHandleMLocRelease(resp_bufp, INK_NULL_MLOC, resp_loc);
-    LOG_ERROR_AND_RETURN("INKMimeHdrFieldAppend");
+  if (TSMimeHdrFieldAppend(resp_bufp, resp_loc, field_loc) == TS_ERROR) {
+    TSHandleMLocRelease(resp_bufp, resp_loc, field_loc);
+    TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc);
+    LOG_ERROR_AND_RETURN("TSMimeHdrFieldAppend");
   }
 
-  if (INKHandleMLocRelease(resp_bufp, resp_loc, field_loc) == INK_ERROR) {
-    INKHandleMLocRelease(resp_bufp, INK_NULL_MLOC, resp_loc);
-    LOG_ERROR_AND_RETURN("INKHandleMLocRelease");
+  if (TSHandleMLocRelease(resp_bufp, resp_loc, field_loc) == TS_ERROR) {
+    TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc);
+    LOG_ERROR_AND_RETURN("TSHandleMLocRelease");
   }
 
-  if (INKHandleMLocRelease(resp_bufp, INK_NULL_MLOC, resp_loc) == INK_ERROR) {
-    LOG_ERROR_AND_RETURN("INKHandleMLocRelease");
+  if (TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc) == TS_ERROR) {
+    LOG_ERROR_AND_RETURN("TSHandleMLocRelease");
   }
 
   return 1;
 }
 
 void
-INKPluginInit(int argc, const char *argv[])
+TSPluginInit(int argc, const char *argv[])
 {
-  LOG_SET_FUNCTION_NAME("INKPluginInit");
-  INKCont contp;
+  LOG_SET_FUNCTION_NAME("TSPluginInit");
+  TSCont contp;
 
-  INKDebug(DEBUG_TAG, "INKPluginInit");
-  if ((contp = INKContCreate(event_mux, NULL)) == INK_ERROR_PTR) {
-    LOG_ERROR("INKContCreate");
-  } else if (INKHttpHookAdd(INK_HTTP_SEND_RESPONSE_HDR_HOOK, contp) == INK_ERROR) {
-    LOG_ERROR("INKHttpHookAdd");
+  TSDebug(DEBUG_TAG, "TSPluginInit");
+  if ((contp = TSContCreate(event_mux, NULL)) == TS_ERROR_PTR) {
+    LOG_ERROR("TSContCreate");
+  } else if (TSHttpHookAdd(TS_HTTP_SEND_RESPONSE_HDR_HOOK, contp) == TS_ERROR) {
+    LOG_ERROR("TSHttpHookAdd");
   }
 
 }
 
 
-/* pointers returned by p_url_line and p_client_req should be freed by INKfree() */
+/* pointers returned by p_url_line and p_client_req should be freed by TSfree() */
 
 int
-get_client_req(INKHttpTxn txnp, char **p_url_line, char **p_client_req, int *neg_test_val, int *pin_val)
+get_client_req(TSHttpTxn txnp, char **p_url_line, char **p_client_req, int *neg_test_val, int *pin_val)
 {
-  INKMBuffer bufp;
-  INKReturnCode ret_code;
-  INKMLoc hdr_loc;
-  INKMLoc url_loc;
-  INKMLoc neg_loc;
-  INKMLoc pin_loc;
+  TSMBuffer bufp;
+  TSReturnCode ret_code;
+  TSMLoc hdr_loc;
+  TSMLoc url_loc;
+  TSMLoc neg_loc;
+  TSMLoc pin_loc;
 
-  INKIOBuffer output_buffer;
-  INKIOBufferReader reader;
+  TSIOBuffer output_buffer;
+  TSIOBufferReader reader;
   int total_avail;
 
-  INKIOBufferBlock block;
+  TSIOBufferBlock block;
   const char *block_start;
   int block_avail;
 
@@ -757,195 +757,195 @@ get_client_req(INKHttpTxn txnp, char **p
   *pin_val = 0;
 
 #ifdef DEBUG
-  if (INKHttpTxnClientReqGet(NULL, &bufp, &hdr_loc) != 0) {
-    LOG_ERROR_NEG("INKHttpTxnClientReqGet(null, buf, hdr_loc)");
+  if (TSHttpTxnClientReqGet(NULL, &bufp, &hdr_loc) != 0) {
+    LOG_ERROR_NEG("TSHttpTxnClientReqGet(null, buf, hdr_loc)");
   }
 
-  if (INKHttpTxnClientReqGet(txnp, NULL, &hdr_loc) != 0) {
-    LOG_ERROR_NEG("INKHttpTxnClientReqGet(txnp, null, hdr_loc)");
+  if (TSHttpTxnClientReqGet(txnp, NULL, &hdr_loc) != 0) {
+    LOG_ERROR_NEG("TSHttpTxnClientReqGet(txnp, null, hdr_loc)");
   }
 
-  if (INKHttpTxnClientReqGet(txnp, &bufp, NULL) != 0) {
-    LOG_ERROR_NEG("INKHttpTxnClientReqGet(txnp, buf, null)");
+  if (TSHttpTxnClientReqGet(txnp, &bufp, NULL) != 0) {
+    LOG_ERROR_NEG("TSHttpTxnClientReqGet(txnp, buf, null)");
   }
 #endif
 
-  if (!INKHttpTxnClientReqGet(txnp, &bufp, &hdr_loc)) {
-    LOG_ERROR_AND_RETURN("INKHttpTxnClientReqGet");
+  if (!TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc)) {
+    LOG_ERROR_AND_RETURN("TSHttpTxnClientReqGet");
   }
 
-  if ((url_loc = INKHttpHdrUrlGet(bufp, hdr_loc)) == INK_ERROR_PTR) {
-    INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-    LOG_ERROR_AND_RETURN("INKHttpHdrUrlGet");
+  if ((url_loc = TSHttpHdrUrlGet(bufp, hdr_loc)) == TS_ERROR_PTR) {
+    TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+    LOG_ERROR_AND_RETURN("TSHttpHdrUrlGet");
   }
 #ifdef DEBUG
-  if (INKUrlStringGet(NULL, url_loc, &url_len) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKUrlStringGet(NULL, url_loc, &int)");
+  if (TSUrlStringGet(NULL, url_loc, &url_len) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSUrlStringGet(NULL, url_loc, &int)");
   }
 
-  if (INKUrlStringGet(bufp, NULL, &url_len) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKUrlStringGet(bufp, NULL, &int)");
+  if (TSUrlStringGet(bufp, NULL, &url_len) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSUrlStringGet(bufp, NULL, &int)");
   }
 #endif
 
-  if ((url_str = INKUrlStringGet(bufp, url_loc, &url_len)) == INK_ERROR_PTR) {
-    INKHandleMLocRelease(bufp, hdr_loc, url_loc);
-    INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-    LOG_ERROR_AND_RETURN("INKUrlStringGet");
+  if ((url_str = TSUrlStringGet(bufp, url_loc, &url_len)) == TS_ERROR_PTR) {
+    TSHandleMLocRelease(bufp, hdr_loc, url_loc);
+    TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+    LOG_ERROR_AND_RETURN("TSUrlStringGet");
   }
 
-  if (INKHandleMLocRelease(bufp, hdr_loc, url_loc) == INK_ERROR) {
-    INKfree(url_str);
-    INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-    LOG_ERROR_AND_RETURN("INKHandleMLocRelease");
+  if (TSHandleMLocRelease(bufp, hdr_loc, url_loc) == TS_ERROR) {
+    TSfree(url_str);
+    TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+    LOG_ERROR_AND_RETURN("TSHandleMLocRelease");
   }
 
   url_str[url_len] = '\0';
   *p_url_line = url_str;
 
-  if ((output_buffer = INKIOBufferCreate()) == INK_ERROR_PTR) {
-    INKfree(url_str);
-    INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-    LOG_ERROR_AND_RETURN("INKIOBufferCreate");
+  if ((output_buffer = TSIOBufferCreate()) == TS_ERROR_PTR) {
+    TSfree(url_str);
+    TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+    LOG_ERROR_AND_RETURN("TSIOBufferCreate");
   }
 #ifdef DEBUG
-  if (INKIOBufferReaderAlloc(NULL) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKIOBufferReaderAlloc(NULL)");
+  if (TSIOBufferReaderAlloc(NULL) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSIOBufferReaderAlloc(NULL)");
   }
 #endif
 
-  if ((reader = INKIOBufferReaderAlloc(output_buffer)) == INK_ERROR_PTR) {
-    INKfree(url_str);
-    INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-    INKIOBufferDestroy(output_buffer);
-    LOG_ERROR_AND_RETURN("INKIOBufferReaderAlloc");
+  if ((reader = TSIOBufferReaderAlloc(output_buffer)) == TS_ERROR_PTR) {
+    TSfree(url_str);
+    TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+    TSIOBufferDestroy(output_buffer);
+    LOG_ERROR_AND_RETURN("TSIOBufferReaderAlloc");
   }
 
   /* This will print  just MIMEFields and not
      the http request line */
-  if (INKMimeHdrPrint(bufp, hdr_loc, output_buffer) == INK_ERROR) {
-    INKfree(url_str);
-    INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-    INKIOBufferDestroy(output_buffer);
-    LOG_ERROR_AND_RETURN("INKMimeHdrPrint");
+  if (TSMimeHdrPrint(bufp, hdr_loc, output_buffer) == TS_ERROR) {
+    TSfree(url_str);
+    TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+    TSIOBufferDestroy(output_buffer);
+    LOG_ERROR_AND_RETURN("TSMimeHdrPrint");
   }
 
-  if ((neg_loc = INKMimeHdrFieldFind(bufp, hdr_loc, "CacheTester-HostNameSet", -1)) == INK_ERROR_PTR) {
-    INKfree(url_str);
-    INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-    INKIOBufferDestroy(output_buffer);
-    LOG_ERROR_AND_RETURN("INKMimeHdrFieldFind");
+  if ((neg_loc = TSMimeHdrFieldFind(bufp, hdr_loc, "CacheTester-HostNameSet", -1)) == TS_ERROR_PTR) {
+    TSfree(url_str);
+    TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+    TSIOBufferDestroy(output_buffer);
+    LOG_ERROR_AND_RETURN("TSMimeHdrFieldFind");
   }
 
   if (neg_loc != NULL) {
 
-    ret_code = INKMimeHdrFieldValueIntGet(bufp, hdr_loc, neg_loc, 0, neg_test_val);
-    if (ret_code == INK_ERROR) {
-      INKfree(url_str);
-      INKHandleMLocRelease(bufp, hdr_loc, neg_loc);
-      INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-      INKIOBufferDestroy(output_buffer);
-      LOG_ERROR_AND_RETURN("INKMimeHdrFieldValueIntGet");
-    }
-
-    if (INKHandleMLocRelease(bufp, hdr_loc, neg_loc) == INK_ERROR) {
-      INKfree(url_str);
-      INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-      INKIOBufferDestroy(output_buffer);
-      LOG_ERROR_AND_RETURN("INKHandleMLocRelease");
+    ret_code = TSMimeHdrFieldValueIntGet(bufp, hdr_loc, neg_loc, 0, neg_test_val);
+    if (ret_code == TS_ERROR) {
+      TSfree(url_str);
+      TSHandleMLocRelease(bufp, hdr_loc, neg_loc);
+      TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+      TSIOBufferDestroy(output_buffer);
+      LOG_ERROR_AND_RETURN("TSMimeHdrFieldValueIntGet");
+    }
+
+    if (TSHandleMLocRelease(bufp, hdr_loc, neg_loc) == TS_ERROR) {
+      TSfree(url_str);
+      TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+      TSIOBufferDestroy(output_buffer);
+      LOG_ERROR_AND_RETURN("TSHandleMLocRelease");
     }
   }
 
-  if ((pin_loc = INKMimeHdrFieldFind(bufp, hdr_loc, "CacheTester-Pin", -1)) == INK_ERROR_PTR) {
-    INKfree(url_str);
-    INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-    INKIOBufferDestroy(output_buffer);
-    LOG_ERROR_AND_RETURN("INKMimeHdrFieldFind");
+  if ((pin_loc = TSMimeHdrFieldFind(bufp, hdr_loc, "CacheTester-Pin", -1)) == TS_ERROR_PTR) {
+    TSfree(url_str);
+    TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+    TSIOBufferDestroy(output_buffer);
+    LOG_ERROR_AND_RETURN("TSMimeHdrFieldFind");
   }
 
   if (pin_loc != NULL) {
 
-    ret_code = INKMimeHdrFieldValueIntGet(bufp, hdr_loc, pin_loc, 0, pin_val);
-    if (ret_code == INK_ERROR) {
-      INKfree(url_str);
-      INKHandleMLocRelease(bufp, hdr_loc, pin_loc);
-      INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-      INKIOBufferDestroy(output_buffer);
-      LOG_ERROR_AND_RETURN("INKMimeHdrFieldValueIntGet");
-    }
-
-    if (INKHandleMLocRelease(bufp, hdr_loc, pin_loc) == INK_ERROR) {
-      INKfree(url_str);
-      INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc);
-      INKIOBufferDestroy(output_buffer);
-      LOG_ERROR_AND_RETURN("INKHandleMLocRelease");
+    ret_code = TSMimeHdrFieldValueIntGet(bufp, hdr_loc, pin_loc, 0, pin_val);
+    if (ret_code == TS_ERROR) {
+      TSfree(url_str);
+      TSHandleMLocRelease(bufp, hdr_loc, pin_loc);
+      TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+      TSIOBufferDestroy(output_buffer);
+      LOG_ERROR_AND_RETURN("TSMimeHdrFieldValueIntGet");
+    }
+
+    if (TSHandleMLocRelease(bufp, hdr_loc, pin_loc) == TS_ERROR) {
+      TSfree(url_str);
+      TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
+      TSIOBufferDestroy(output_buffer);
+      LOG_ERROR_AND_RETURN("TSHandleMLocRelease");
     }
   }
 
-  if (INKHandleMLocRelease(bufp, INK_NULL_MLOC, hdr_loc) == INK_ERROR) {
-    INKfree(url_str);
-    INKIOBufferDestroy(output_buffer);
-    LOG_ERROR_AND_RETURN("INKHandleMLocRelease");
+  if (TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc) == TS_ERROR) {
+    TSfree(url_str);
+    TSIOBufferDestroy(output_buffer);
+    LOG_ERROR_AND_RETURN("TSHandleMLocRelease");
   }
 
   /* Find out how the big the complete header is by
      seeing the total bytes in the buffer.  We need to
      look at the buffer rather than the first block to
      see the size of the entire header */
-  if ((total_avail = INKIOBufferReaderAvail(reader)) == INK_ERROR) {
-    INKfree(url_str);
-    INKIOBufferDestroy(output_buffer);
-    LOG_ERROR_AND_RETURN("INKIOBufferReaderAvail");
+  if ((total_avail = TSIOBufferReaderAvail(reader)) == TS_ERROR) {
+    TSfree(url_str);
+    TSIOBufferDestroy(output_buffer);
+    LOG_ERROR_AND_RETURN("TSIOBufferReaderAvail");
   }
 #ifdef DEBUG
-  if (INKIOBufferReaderAvail(NULL) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferReaderAvail(NULL)");
+  if (TSIOBufferReaderAvail(NULL) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferReaderAvail(NULL)");
   }
 #endif
 
   /* Allocate the string with an extra byte for the string
      terminator */
-  output_string = (char *) INKmalloc(total_avail + 1);
+  output_string = (char *) TSmalloc(total_avail + 1);
   output_len = 0;
 
   /* We need to loop over all the buffer blocks to make
      sure we get the complete header since the header can
      be in multiple blocks */
-  block = INKIOBufferReaderStart(reader);
+  block = TSIOBufferReaderStart(reader);
 
-  if (block == INK_ERROR_PTR) {
-    INKfree(url_str);
-    INKfree(output_string);
-    LOG_ERROR_AND_RETURN("INKIOBufferReaderStart");
+  if (block == TS_ERROR_PTR) {
+    TSfree(url_str);
+    TSfree(output_string);
+    LOG_ERROR_AND_RETURN("TSIOBufferReaderStart");
   }
 #ifdef DEBUG
-  if (INKIOBufferReaderStart(NULL) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKIOBufferReaderStart(NULL)");
+  if (TSIOBufferReaderStart(NULL) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSIOBufferReaderStart(NULL)");
   }
 
-  if (INKIOBufferBlockReadStart(NULL, reader, &block_avail) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKIOBufferBlockReadStart(null, reader, &int)");
+  if (TSIOBufferBlockReadStart(NULL, reader, &block_avail) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSIOBufferBlockReadStart(null, reader, &int)");
   }
 
-  if (INKIOBufferBlockReadStart(block, NULL, &block_avail) != INK_ERROR_PTR) {
-    LOG_ERROR_NEG("INKIOBufferBlockReadStart(block, null, &int)");
+  if (TSIOBufferBlockReadStart(block, NULL, &block_avail) != TS_ERROR_PTR) {
+    LOG_ERROR_NEG("TSIOBufferBlockReadStart(block, null, &int)");
   }
 #endif
 
   while (block) {
 
-    block_start = INKIOBufferBlockReadStart(block, reader, &block_avail);
+    block_start = TSIOBufferBlockReadStart(block, reader, &block_avail);
 
-    if (block_start == INK_ERROR_PTR) {
-      INKfree(url_str);
-      INKfree(output_string);
-      LOG_ERROR_AND_RETURN("INKIOBufferBlockReadStart");
+    if (block_start == TS_ERROR_PTR) {
+      TSfree(url_str);
+      TSfree(output_string);
+      LOG_ERROR_AND_RETURN("TSIOBufferBlockReadStart");
     }
 
     /* FC paranoia: make sure we don't copy more bytes than buffer size can handle */
     if ((output_len + block_avail) > total_avail) {
-      INKfree(url_str);
-      INKfree(output_string);
+      TSfree(url_str);
+      TSfree(output_string);
       LOG_ERROR_AND_RETURN("More bytes than expected in IOBuffer");
     }
 
@@ -962,27 +962,27 @@ get_client_req(INKHttpTxn txnp, char **p
     output_len += block_avail;
 
     /* Consume the data so that we get to the next block */
-    if (INKIOBufferReaderConsume(reader, block_avail) == INK_ERROR) {
-      INKfree(url_str);
-      INKfree(output_string);
-      LOG_ERROR_AND_RETURN("INKIOBufferReaderConsume");
+    if (TSIOBufferReaderConsume(reader, block_avail) == TS_ERROR) {
+      TSfree(url_str);
+      TSfree(output_string);
+      LOG_ERROR_AND_RETURN("TSIOBufferReaderConsume");
     }
 #ifdef DEBUG
-    if (INKIOBufferReaderConsume(NULL, block_avail) != INK_ERROR) {
-      LOG_ERROR_NEG("INKIOBufferReaderConsume(null, int)");
+    if (TSIOBufferReaderConsume(NULL, block_avail) != TS_ERROR) {
+      LOG_ERROR_NEG("TSIOBufferReaderConsume(null, int)");
     }
 
-    if (INKIOBufferReaderConsume(reader, -1) != INK_ERROR) {
-      LOG_ERROR_NEG("INKIOBufferReaderConsume(reader, -1)");
+    if (TSIOBufferReaderConsume(reader, -1) != TS_ERROR) {
+      LOG_ERROR_NEG("TSIOBufferReaderConsume(reader, -1)");
     }
 #endif
 
     /* Get the next block now that we've consumed the
        data off the last block */
-    if ((block = INKIOBufferReaderStart(reader)) == INK_ERROR_PTR) {
-      INKfree(url_str);
-      INKfree(output_string);
-      LOG_ERROR_AND_RETURN("INKIOBufferReaderStart");
+    if ((block = TSIOBufferReaderStart(reader)) == TS_ERROR_PTR) {
+      TSfree(url_str);
+      TSfree(output_string);
+      LOG_ERROR_AND_RETURN("TSIOBufferReaderStart");
     }
   }
 
@@ -990,22 +990,22 @@ get_client_req(INKHttpTxn txnp, char **p
   output_string[output_len] = '\0';
   /*output_len++; */
 
-  /* Free up the INKIOBuffer that we used to print out the header */
-  if (INKIOBufferReaderFree(reader) == INK_ERROR) {
-    INKfree(url_str);
-    INKfree(output_string);
-    LOG_ERROR_AND_RETURN("INKIOBufferReaderFree");
+  /* Free up the TSIOBuffer that we used to print out the header */
+  if (TSIOBufferReaderFree(reader) == TS_ERROR) {
+    TSfree(url_str);
+    TSfree(output_string);
+    LOG_ERROR_AND_RETURN("TSIOBufferReaderFree");
   }
 #ifdef DEBUG
-  if (INKIOBufferReaderFree(NULL) != INK_ERROR) {
-    LOG_ERROR_NEG("INKIOBufferReaderFree(NULL)");
+  if (TSIOBufferReaderFree(NULL) != TS_ERROR) {
+    LOG_ERROR_NEG("TSIOBufferReaderFree(NULL)");
   }
 #endif
 
-  if (INKIOBufferDestroy(output_buffer) == INK_ERROR) {
-    INKfree(url_str);
-    INKfree(output_string);
-    LOG_ERROR_AND_RETURN("INKIOBufferDestroy");
+  if (TSIOBufferDestroy(output_buffer) == TS_ERROR) {
+    TSfree(url_str);
+    TSfree(output_string);
+    LOG_ERROR_AND_RETURN("TSIOBufferDestroy");
   }
 
   *p_client_req = output_string;

Modified: trafficserver/traffic/branches/wccp/test/plugin/CacheAPITester/CacheAPITester.h
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/CacheAPITester/CacheAPITester.h?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/CacheAPITester/CacheAPITester.h (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/CacheAPITester/CacheAPITester.h Tue Nov 30 01:42:55 2010
@@ -37,10 +37,10 @@
 #define DEBUG_TAG "CacheAPITester-dbg"
 
 #define PLUGIN_NAME "CacheAPITester"
-#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",\
+#define LOG_ERROR(API_NAME) { 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) { LOG_ERROR(API_NAME); return -1; }
@@ -49,10 +49,10 @@
 /* for the foll. macro make sure a var of txnp is defined and in scope */
 #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",\
+#define LOG_ERROR_NEG(API_NAME) { TSDebug(PLUGIN_NAME, "%s: %s %s %s File %s, line number %d",\
         PLUGIN_NAME, API_NAME, "NEGAPIFAIL", FUNCTION_NAME, __FILE__, __LINE__); }
 
 #define MAX_URL_LEN 255
@@ -67,16 +67,16 @@ typedef struct
   char *url;
   int url_len;
   int pin_time;
-  INKCacheKey key;
-  INKIOBuffer bufp;
-  INKIOBufferReader bufp_reader;
-  INKHttpTxn txnp;
+  TSCacheKey key;
+  TSIOBuffer bufp;
+  TSIOBufferReader bufp_reader;
+  TSHttpTxn txnp;
   int write_again_after_remove;
 } CACHE_URL_DATA;
 
-int get_client_req(INKHttpTxn, char **, char **, int *, int *);
-int insert_in_response(INKHttpTxn, char *);
-void cache_exercise(INKHttpTxn, char *, int, int, INKCont);
-static int handle_cache_events(INKCont, INKEvent, void *);
+int get_client_req(TSHttpTxn, char **, char **, int *, int *);
+int insert_in_response(TSHttpTxn, char *);
+void cache_exercise(TSHttpTxn, char *, int, int, TSCont);
+static int handle_cache_events(TSCont, TSEvent, void *);
 
 #endif

Modified: trafficserver/traffic/branches/wccp/test/plugin/INKAction/INKAction.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/INKAction/INKAction.cc?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/INKAction/INKAction.cc (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/INKAction/INKAction.cc Tue Nov 30 01:42:55 2010
@@ -32,7 +32,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-/* INKAction
+/* TSAction
  *
  * TODO send and receive data on the connection
 */
@@ -43,7 +43,7 @@
 char *
 uint2ddip(unsigned int addr)
 {
-  char *ptr = (char *) INKmalloc(64);
+  char *ptr = (char *) TSmalloc(64);
   if (!ptr)
     return NULL;
 
@@ -59,7 +59,7 @@ uint2ddip(unsigned int addr)
 #define TIMEOUT_VAL (30000)
 
 
-/* Set in INKPluginInit */
+/* Set in TSPluginInit */
 typedef struct clientInfo
 {
   char clientBuff[BUFSIZ];
@@ -70,25 +70,25 @@ typedef struct clientInfo
  * connections) is running on a client machine
 */
 static int
-handle_INKAction(INKCont contp, INKEvent event, void *eData)
+handle_TSAction(TSCont contp, TSEvent event, void *eData)
 {
-  INKHttpTxn txnp = (INKHttpTxn *) eData;
+  TSHttpTxn txnp = (TSHttpTxn *) eData;
   char *clientName = NULL;
   unsigned int clientAddr = 0;
   int err = 0;
   char *ipAddrp = NULL;
   clientInfo_t *clientInfop = NULL;
   struct in_addr *inAddrp = NULL;
-  INKAction inkAction;
+  TSAction inkAction;
   struct hostent *hostEntp;
 
   switch (event) {
-  case INK_EVENT_IMMEDIATE:
+  case TS_EVENT_IMMEDIATE:
     /* event scheduled at plugIn-init
      */
-    clientInfop = (clientInfo_t *) INKContDataGet(contp);
+    clientInfop = (clientInfo_t *) TSContDataGet(contp);
     if (!clientInfop) {
-      INKDebug("INKAction", "INKContDataGet returned NULL ptr");
+      TSDebug("TSAction", "TSContDataGet returned NULL ptr");
       return 1;
     }
 
@@ -96,10 +96,10 @@ handle_INKAction(INKCont contp, INKEvent
      * Get hostname/port name: ip str :
      * unsigned int  inet_addr(ip str)
      */
-    INKDebug("INKAction", "gethostbyname( %s )", clientInfop->clientBuff);
+    TSDebug("TSAction", "gethostbyname( %s )", clientInfop->clientBuff);
     hostEntp = gethostbyname(clientInfop->clientBuff);
     if (!hostEntp) {
-      INKDebug("INKAction", "failed: gethostbyname( %s )", clientInfop->clientBuff);
+      TSDebug("TSAction", "failed: gethostbyname( %s )", clientInfop->clientBuff);
       return ++err;
     }
     inAddrp = (struct in_addr *) *hostEntp->h_addr_list;
@@ -108,54 +108,54 @@ handle_INKAction(INKCont contp, INKEvent
     clientName = inet_ntoa(*inAddrp);
     /* string clientName in inet std dot not. to integer value */
     clientAddr = inet_addr(clientName);
-    INKDebug("INKAction",
-             "INKNetConnect(contp, client=(%s/%d), port=(%d))",
+    TSDebug("TSAction",
+             "TSNetConnect(contp, client=(%s/%d), port=(%d))",
              clientName, htonl(clientAddr), ntohl(clientInfop->port));
 
     /* We should get NET_CONNECT or NET_CONNECT_FAILED before
      * this schedule timeout event
      */
-    INKContSchedule(contp, TIMEOUT_VAL);
+    TSContSchedule(contp, TIMEOUT_VAL);
 
-    inkAction = INKNetConnect(contp, htonl(clientAddr), ntohl(clientInfop->port));
-    if (!INKActionDone(inkAction)) {
-      INKDebug("INKAction", "INKNetConnect: not called back yet, action not done");
-      INKContDataSet(contp, (void *) inkAction);
+    inkAction = TSNetConnect(contp, htonl(clientAddr), ntohl(clientInfop->port));
+    if (!TSActionDone(inkAction)) {
+      TSDebug("TSAction", "TSNetConnect: not called back yet, action not done");
+      TSContDataSet(contp, (void *) inkAction);
     } else {
-      INKDebug("INKAction", "INKNetConnect: plug-in has been called ");
+      TSDebug("TSAction", "TSNetConnect: plug-in has been called ");
     }
     break;
 
-  case INK_EVENT_TIMEOUT:
-    inkAction = INKContDataGet(contp);
+  case TS_EVENT_TIMEOUT:
+    inkAction = TSContDataGet(contp);
 
-    /* INK_EVENT_NET_CONNECT_FAILED or
-     * INK_EVENT_NET_CONNECT have been received
+    /* TS_EVENT_NET_CONNECT_FAILED or
+     * TS_EVENT_NET_CONNECT have been received
      * then action should be considered  done
      */
-    if (inkAction && !INKActionDone(inkAction)) {
-      INKActionCancel(inkAction);
+    if (inkAction && !TSActionDone(inkAction)) {
+      TSActionCancel(inkAction);
       err++;                    /* timed out w/no event */
       /* no error */
-      INKDebug("INKAction", "INKAction: INK_EVENT_TIMEOUT action not done");
+      TSDebug("TSAction", "TSAction: TS_EVENT_TIMEOUT action not done");
     } else {
       /* no error */
-      INKDebug("INKAction", "INKAction: INK_EVENT_TIMEOUT");
+      TSDebug("TSAction", "TSAction: TS_EVENT_TIMEOUT");
     }
     break;
 
-  case INK_EVENT_NET_CONNECT_FAILED:
-    INKDebug("INKAction", "INKNetConnect: INK_EVENT_NET_CONNECT_FAILED ***** ");
-    INKContDataSet(contp, NULL);  /* TODO determine what does this do */
+  case TS_EVENT_NET_CONNECT_FAILED:
+    TSDebug("TSAction", "TSNetConnect: TS_EVENT_NET_CONNECT_FAILED ***** ");
+    TSContDataSet(contp, NULL);  /* TODO determine what does this do */
     break;
 
-  case INK_EVENT_NET_CONNECT:
-    INKDebug("INKAction", "INKNetConnect: INK_EVENT_NET_CONNECT");
-    INKContDataSet(contp, NULL);  /* TODO determine what does this do */
+  case TS_EVENT_NET_CONNECT:
+    TSDebug("TSAction", "TSNetConnect: TS_EVENT_NET_CONNECT");
+    TSContDataSet(contp, NULL);  /* TODO determine what does this do */
     break;
 
   default:
-    INKDebug("INKAction", "handle_INKAction: undefined event ");
+    TSDebug("TSAction", "handle_TSAction: undefined event ");
     break;
   }
   return err;
@@ -164,36 +164,36 @@ handle_INKAction(INKCont contp, INKEvent
 
 
 /* Usage:
- * INKAction.so clientName clientPort
+ * TSAction.so clientName clientPort
 */
 void
-INKPluginInit(int argc, const char *argv[])
+TSPluginInit(int argc, const char *argv[])
 {
   int err = 0;
   int length = 0, argCnt = 0;
   clientInfo_t *clientp = NULL;
-  INKCont contp;
+  TSCont contp;
   struct hostent *hostEntp = NULL;
   char *hostName = NULL;
   int port = 0;
 
   ink_assert(argc == 3);
-  clientp = (clientInfo_t *) INKmalloc(sizeof(clientInfo_t));
+  clientp = (clientInfo_t *) TSmalloc(sizeof(clientInfo_t));
   ink_assert(clientp != NULL);
 
-  contp = INKContCreate(handle_INKAction, INKMutexCreate());
+  contp = TSContCreate(handle_TSAction, TSMutexCreate());
 
   hostEntp = gethostbyname(argv[++argCnt]);
   if (!hostEntp) {
-    INKDebug("INKAction", "Failed: gethostbyname returned null pointer");
+    TSDebug("TSAction", "Failed: gethostbyname returned null pointer");
     return;
   }
   strncpy(clientp->clientBuff, hostEntp->h_name, strlen(hostEntp->h_name));
 
   clientp->port = atoi(argv[++argCnt]);
 
-  INKContDataSet(contp, (void *) clientp);
+  TSContDataSet(contp, (void *) clientp);
 
-  INKContSchedule(contp, 0);
-  /* INKHttpHookAdd(INK_HTTP_SSN_START_HOOK, contp); */
+  TSContSchedule(contp, 0);
+  /* TSHttpHookAdd(TS_HTTP_SSN_START_HOOK, contp); */
 }

Modified: trafficserver/traffic/branches/wccp/test/plugin/INKAction/README.txt
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/INKAction/README.txt?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/INKAction/README.txt (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/INKAction/README.txt Tue Nov 30 01:42:55 2010
@@ -5,31 +5,31 @@ connection or any other client listen/ac
 
 example entry for plugin.config: 
 -------------------------------
-INKAction.so npdev.inktomi.com 8080
+TSAction.so npdev.inktomi.com 8080
 
 No http request is needed to generate these results:
 
 
-INK_EVENT_NET_CONNECT
+TS_EVENT_NET_CONNECT
 ---------------------
 
-npdev> ./traffic_server -T"INKAction|http.*"   
-[Nov  3 21:45:15.402] DIAG: (INKAction) gethostbyname( npdev.inktomi.com )
-[Nov  3 21:45:15.404] DIAG: (INKAction) INKNetConnect(contp, client=(209.131.48.213/-779931435), port=(8080))
-[Nov  3 21:45:15.407] DIAG: (INKAction) INKNetConnect: INK_EVENT_NET_CONNECT
-[Nov  3 21:45:15.409] DIAG: (INKAction) INKNetConnect: plug-in has been called 
-[Nov  3 21:45:45.674] DIAG: (INKAction) INKAction: INK_EVENT_TIMEOUT
+npdev> ./traffic_server -T"TSAction|http.*"   
+[Nov  3 21:45:15.402] DIAG: (TSAction) gethostbyname( npdev.inktomi.com )
+[Nov  3 21:45:15.404] DIAG: (TSAction) TSNetConnect(contp, client=(209.131.48.213/-779931435), port=(8080))
+[Nov  3 21:45:15.407] DIAG: (TSAction) TSNetConnect: TS_EVENT_NET_CONNECT
+[Nov  3 21:45:15.409] DIAG: (TSAction) TSNetConnect: plug-in has been called 
+[Nov  3 21:45:45.674] DIAG: (TSAction) TSAction: TS_EVENT_TIMEOUT
 
 
 
-INK_EVENT_NET_CONNECT_FAILED
+TS_EVENT_NET_CONNECT_FAILED
 ---------------------------- 
-npdev> ./traffic_server -T"INKAction|http.*"    
-[Nov  3 21:49:33.828] DIAG: (INKAction) gethostbyname( npdev.inktomi.com )
-[Nov  3 21:49:33.830] DIAG: (INKAction) INKNetConnect(contp, client=(209.131.48.213/-779931435), port=(8080))
-[Nov  3 21:49:33.833] DIAG: (INKAction) INKNetConnect: INK_EVENT_NET_CONNECT_FAILED ***** 
-[Nov  3 21:49:33.835] DIAG: (INKAction) INKNetConnect: plug-in has been called 
-[Nov  3 21:50:05.537] DIAG: (INKAction) INKAction: INK_EVENT_TIMEOUT
+npdev> ./traffic_server -T"TSAction|http.*"    
+[Nov  3 21:49:33.828] DIAG: (TSAction) gethostbyname( npdev.inktomi.com )
+[Nov  3 21:49:33.830] DIAG: (TSAction) TSNetConnect(contp, client=(209.131.48.213/-779931435), port=(8080))
+[Nov  3 21:49:33.833] DIAG: (TSAction) TSNetConnect: TS_EVENT_NET_CONNECT_FAILED ***** 
+[Nov  3 21:49:33.835] DIAG: (TSAction) TSNetConnect: plug-in has been called 
+[Nov  3 21:50:05.537] DIAG: (TSAction) TSAction: TS_EVENT_TIMEOUT
 
 
 Subsequent request can be made but will not involve plug-in interaction. 

Modified: trafficserver/traffic/branches/wccp/test/plugin/INKContLeak/wapnet.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/INKContLeak/wapnet.c?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/INKContLeak/wapnet.c (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/INKContLeak/wapnet.c Tue Nov 30 01:42:55 2010
@@ -28,44 +28,44 @@
 
 
 static int
-handle_log_msisdn(INKCont contp, INKEvent event, void *edata)
+handle_log_msisdn(TSCont contp, TSEvent event, void *edata)
 {
 
-  INKHttpTxn txnp = (INKHttpTxn) edata;
+  TSHttpTxn txnp = (TSHttpTxn) edata;
 
   printf(" handle_log_msisdn \n");
-  INKContDestroy(contp);
-  INKHttpTxnReenable(txnp, INK_EVENT_HTTP_CONTINUE);
+  TSContDestroy(contp);
+  TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
   return 0;
 }
 
 
 static int
-handle_request(INKCont contp, INKEvent event, void *edata)
+handle_request(TSCont contp, TSEvent event, void *edata)
 {
 
-  INKHttpTxn txnp = (INKHttpTxn) edata;
-  INKMBuffer bufp;
-  INKMLoc hdr_loc;
-  INKCont continuation;
+  TSHttpTxn txnp = (TSHttpTxn) edata;
+  TSMBuffer bufp;
+  TSMLoc hdr_loc;
+  TSCont continuation;
 
-  if (!INKHttpTxnClientReqGet(txnp, &bufp, &hdr_loc)) {
-    INKError("Couldn't retrieve client request header !");
+  if (!TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc)) {
+    TSError("Couldn't retrieve client request header !");
     return -1;
   }
   printf("In handle_request \n");
-  continuation = INKContCreate(handle_log_msisdn, NULL);
-  INKHttpTxnHookAdd(txnp, INK_HTTP_TXN_CLOSE_HOOK, continuation);
-  INKHttpTxnReenable(txnp, INK_EVENT_HTTP_CONTINUE);
+  continuation = TSContCreate(handle_log_msisdn, NULL);
+  TSHttpTxnHookAdd(txnp, TS_HTTP_TXN_CLOSE_HOOK, continuation);
+  TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
   printf(" handle_request: transaction conitnuing \n");
   return 0;
 }
 
 
 void
-INKPluginInit(int argc, const char *argv[])
+TSPluginInit(int argc, const char *argv[])
 {
 
-  printf(" INKPluginInit\n");
-  INKHttpHookAdd(INK_HTTP_READ_REQUEST_HDR_HOOK, INKContCreate(handle_request, NULL));
+  printf(" TSPluginInit\n");
+  TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, TSContCreate(handle_request, NULL));
 }

Modified: trafficserver/traffic/branches/wccp/test/plugin/INKContinuations/INKContSchedule.c
URL: http://svn.apache.org/viewvc/trafficserver/traffic/branches/wccp/test/plugin/INKContinuations/INKContSchedule.c?rev=1040383&r1=1040382&r2=1040383&view=diff
==============================================================================
--- trafficserver/traffic/branches/wccp/test/plugin/INKContinuations/INKContSchedule.c (original)
+++ trafficserver/traffic/branches/wccp/test/plugin/INKContinuations/INKContSchedule.c Tue Nov 30 01:42:55 2010
@@ -23,16 +23,16 @@
 
 
 /**************************************************************************
-Verification of INKqa06643
+Verification of TSqa06643
 
 Schedule a continuation that is simply called back with a later timeout
-value. Explicitly call INKContSchedule() without a mutex, the mutex should
-be created in InkAPI.cc/INKContSchedule.
+value. Explicitly call TSContSchedule() without a mutex, the mutex should
+be created in InkAPI.cc/TSContSchedule.
 
 This plug-in will not complete the client request (request times-out),
-since the event routine calls INKContSchedule() in the event handler.
-A simple change to the event routine can be made so that INKHttpTxnReenable()
-is called in place of INKContSchedule().
+since the event routine calls TSContSchedule() in the event handler.
+A simple change to the event routine can be made so that TSHttpTxnReenable()
+is called in place of TSContSchedule().
 
 Entry points to the core now use either
 	FORCE_PLUGIN_MUTEX
@@ -49,56 +49,56 @@ to create/init a mutex.
 
 #include <ts/ts.h>
 
-/* Verification code for: INKqa06643 */
+/* Verification code for: TSqa06643 */
 static int
-EventHandler(INKCont contp, INKEvent event, void *eData)
+EventHandler(TSCont contp, TSEvent event, void *eData)
 {
-  INKHttpTxn txn = (INKHttpTxn) eData;
+  TSHttpTxn txn = (TSHttpTxn) eData;
   int iVal;
   time_t tVal;
 
   if (time(&tVal) != (time_t) (-1)) {
-    INKDebug("tag_sched6643", "INKContSchedule: EventHandler: called at %s\n", ctime(&tVal));
+    TSDebug("tag_sched6643", "TSContSchedule: EventHandler: called at %s\n", ctime(&tVal));
   }
 
-  iVal = (int) INKContDataGet(contp);
+  iVal = (int) TSContDataGet(contp);
 
-  INKDebug("tag_sched6643", "INKContSchedule: handler called with value %d\n", iVal);
+  TSDebug("tag_sched6643", "TSContSchedule: handler called with value %d\n", iVal);
 
   switch (event) {
 
-  case INK_EVENT_HTTP_OS_DNS:
-    INKDebug("tag_sched6643", "INKContSchedule: Seed event %s\n", "INK_EVENT_HTTP_OS_DNS");
+  case TS_EVENT_HTTP_OS_DNS:
+    TSDebug("tag_sched6643", "TSContSchedule: Seed event %s\n", "TS_EVENT_HTTP_OS_DNS");
     break;
 
-  case INK_EVENT_TIMEOUT:
-    INKDebug("tag_sched6643", "INKContSchedule: TIMEOUT event\n");
+  case TS_EVENT_TIMEOUT:
+    TSDebug("tag_sched6643", "TSContSchedule: TIMEOUT event\n");
     break;
 
   default:
-    INKDebug("tag_sched6643", "INKContSchedule: Error: default event\n");
+    TSDebug("tag_sched6643", "TSContSchedule: Error: default event\n");
     break;
   }
 
   iVal += 100;                  /* seed + timeout val */
-  INKContDataSet(contp, (void *) iVal);
-  INKContSchedule(contp, iVal);
+  TSContDataSet(contp, (void *) iVal);
+  TSContSchedule(contp, iVal);
 
-  /* INKHttpTxnReenable(txn, INK_EVENT_HTTP_CONTINUE); */
+  /* TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE); */
 }
 
 void
-INKPluginInit(int argc, const char *argv[])
+TSPluginInit(int argc, const char *argv[])
 {
-  INKCont contp, contp2;
+  TSCont contp, contp2;
   int timeOut = 10;
 
-  INKDebug("tag_sched6643", "INKContSchedule: Initial data value for contp is %d\n", timeOut);
+  TSDebug("tag_sched6643", "TSContSchedule: Initial data value for contp is %d\n", timeOut);
 
-  /* contp = INKContCreate(EventHandler, INKMutexCreate() ); */
+  /* contp = TSContCreate(EventHandler, TSMutexCreate() ); */
 
-  contp = INKContCreate(EventHandler, NULL);
-  INKContDataSet(contp, (void *) timeOut);
+  contp = TSContCreate(EventHandler, NULL);
+  TSContDataSet(contp, (void *) timeOut);
 
-  INKHttpHookAdd(INK_HTTP_OS_DNS_HOOK, contp);
+  TSHttpHookAdd(TS_HTTP_OS_DNS_HOOK, contp);
 }