trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrew...@apache.org
Subject svn commit: r831152 [10/37] - in /incubator/trafficserver/site/trunk/docs: ./ admin/ admin/images/ sdk/ sdk/css/ sdk/images/ sdk/images/docbook/ sdk/js/
Date Thu, 29 Oct 2009 23:23:36 GMT
Propchange: incubator/trafficserver/site/trunk/docs/sdk/App_DeprecatedFunctions.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/App_SampleSourceCode.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/App_SampleSourceCode.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/App_SampleSourceCode.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/App_SampleSourceCode.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,367 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Appendix A. Sample Source Code</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="prev" href="INKTextLogObjectDestroy.html" title="INKTextLogObjectDestroy">
+<link rel="next" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="section" href="App_SampleSourceCode.html#Sample_blacklist-1.c" title="blacklist-1.c">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKTextLogObjectDestroy.html">Prev</a> — INKTextLogObjectDestroy</div>
+<div class="navnext">Appendix B. Deprecated Functions — <a accesskey="n" href="App_DeprecatedFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="appendix" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="App_SampleSourceCode"></a>Appendix A. Sample Source Code</h2></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl><dt><span class="section"><a href="App_SampleSourceCode.html#Sample_blacklist-1.c">blacklist-1.c</a></span></dt></dl>
+</div>
+<p>This appendix provides several source code examples. In the PDF and
+    HTML formats of this book, function calls are linked to their references
+    in the previous chapters. The following sample plugins are
+    provided:</p>
+<div class="itemizedlist"><ul type="disc"><li><p><a href="App_SampleSourceCode.html#Sample_blacklist-1.c" title="blacklist-1.c">“blacklist-1.c”</a></p></li></ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="Sample_blacklist-1.c"></a>blacklist-1.c</h2></div></div></div>
+<p>The sample blacklisting plugin included in the Traffic Server SDK
+      is <code class="filename">blacklist-1.c</code>. This plugin checks every incoming
+      HTTP client request against a list of blacklisted web sites. If the
+      client requests a blacklisted site, the plugin returns an “access
+      forbidden” message to the client.</p>
+<p>This plugin illustrates:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>An HTTP transaction extension</p></li>
+<li><p>How to examine HTTP request headers</p></li>
+<li><p>How to use the logging interface</p></li>
+<li><p>How to use the plugin configuration management
+          interface</p></li>
+</ul></div>
+<pre class="programlisting">
+/* blacklist-1.c:  an example program that denies client access                 
+ *                 to blacklisted sites. This plugin illustrates
+ *                 how to use configuration information from a 
+ *                 configuration file (blacklist.txt) that can be
+ *                 updated through the Traffic Manager UI.
+ *
+ *   Copyright (c) 1999/2000 Inktomi Corporation.  All Rights Reserved. 
+ *   Authorized possession and use of this software is only pursuant 
+ *   to the terms of a written license agreement.
+ *
+ * Usage:   
+ * (NT) : BlackList.dll 
+ * (Solaris) : blacklist-1.so 
+ *
+ *
+ */
+
+#include &lt;stdio.h&gt;
+#include &lt;string.h&gt;
+#include "InkAPI.h"
+
+#define MAX_NSITES 500
+
+static char* sites[MAX_NSITES];
+static int nsites;
+static INKMutex sites_mutex;
+static INKTextLogObject log;
+
+static void
+handle_dns (INKHttpTxn txnp, INKCont contp)
+{
+    INKMBuffer bufp;
+    INKMLoc hdr_loc;
+    INKMLoc url_loc;
+    const char *host;
+    int i;
+    int host_length;
+    
+    if (!INKHttpTxnClientReqGet (txnp, &amp;bufp, &amp;hdr_loc)) {
+        INKError ("couldn't retrieve client request header\n");
+        goto done;
+    }
+    
+    url_loc = INKHttpHdrUrlGet (bufp, hdr_loc);
+    if (!url_loc) {
+        INKError ("couldn't retrieve request url\n");
+        INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+        goto done;
+    }
+    
+    host = INKUrlHostGet (bufp, url_loc, &amp;host_length);
+    if (!host) {
+        INKError ("couldn't retrieve request hostname\n");
+        INKHandleMLocRelease (bufp, hdr_loc, url_loc);
+        INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+        goto done;
+    }
+
+    INKMutexLock(sites_mutex);
+
+    for (i = 0; i &lt; nsites; i++) {
+        if (strncmp (host, sites[i], host_length) == 0) {
+       if (log) {
+      INKTextLogObjectWrite(log, "blacklisting site: %s", sites[i]);
+       } else {
+      printf ("blacklisting site: %s\n", sites[i]);
+       }
+            INKHttpTxnHookAdd (txnp,
+                INK_HTTP_SEND_RESPONSE_HDR_HOOK,
+                contp);
+            INKHandleStringRelease (bufp, url_loc, host);
+            INKHandleMLocRelease (bufp, hdr_loc, url_loc);
+            INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+            INKHttpTxnReenable (txnp, INK_EVENT_HTTP_ERROR);
+       INKMutexUnlock(sites_mutex);
+            return;
+        }
+    }
+
+    INKMutexUnlock(sites_mutex);
+    INKHandleStringRelease (bufp, url_loc, host);
+    INKHandleMLocRelease (bufp, hdr_loc, url_loc);
+    INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+
+ done:
+    INKHttpTxnReenable (txnp, INK_EVENT_HTTP_CONTINUE);
+}
+
+static void
+handle_response (INKHttpTxn txnp)
+{
+    INKMBuffer bufp;
+    INKMLoc hdr_loc;
+    INKMLoc url_loc;
+    char *url_str;
+    char *buf;
+    int url_length;
+ 
+    if (!INKHttpTxnClientRespGet (txnp, &amp;bufp, &amp;hdr_loc)) {
+        INKError ("couldn't retrieve client response header\n");
+        goto done;
+    }
+    
+    INKHttpHdrStatusSet (bufp, hdr_loc, INK_HTTP_STATUS_FORBIDDEN);
+    INKHttpHdrReasonSet (bufp, hdr_loc,
+        INKHttpHdrReasonLookup (INK_HTTP_STATUS_FORBIDDEN), 
+        strlen (INKHttpHdrReasonLookup (INK_HTTP_STATUS_FORBIDDEN)) );
+    
+    if (!INKHttpTxnClientReqGet (txnp, &amp;bufp, &amp;hdr_loc)) {
+        INKError ("couldn't retrieve client request header\n");
+        INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+        goto done;
+    }
+    
+    url_loc = INKHttpHdrUrlGet (bufp, hdr_loc);
+    if (!url_loc) {
+        INKError ("couldn't retrieve request url\n");
+        INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+        goto done;
+    }
+    
+    buf = (char *)INKmalloc (4096);
+    
+    url_str = INKUrlStringGet (bufp, url_loc, &amp;url_length);
+    sprintf (buf, "You are forbidden from accessing \"%s\"\n", url_str);
+    INKfree (url_str);
+    INKHandleMLocRelease (bufp, hdr_loc, url_loc);
+    INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc);
+  
+    INKHttpTxnErrorBodySet (txnp, buf, strlen (buf), NULL);
+
+ done:
+    INKHttpTxnReenable (txnp, INK_EVENT_HTTP_CONTINUE);
+}
+
+static void
+read_blacklist (void)
+{
+    char blacklist_file[1024];
+    INKFile file;
+
+    sprintf (blacklist_file, "%s/blacklist.txt", INKPluginDirGet());
+    file = INKfopen(blacklist_file, "r");
+
+    INKMutexLock (sites_mutex);
+    nsites = 0;
+
+    if (file != NULL) {
+   char buffer[1024];
+
+   while (INKfgets (file, buffer, sizeof(buffer)-1) != NULL &amp;&amp;
+          nsites &lt; MAX_NSITES) {
+       char* eol;
+       if ((eol = strstr(buffer, "\r\n")) != NULL) {
+      /* To handle newlines on Windows */
+      *eol = '\0';
+       } else if ((eol = strchr(buffer, '\n')) != NULL) {
+      *eol = '\0';
+       } else {
+      /* Not a valid line, skip it */
+      continue;
+       }
+       if (sites[nsites] != NULL) {
+      INKfree (sites[nsites]);
+       }
+       sites[nsites] = INKstrdup (buffer);
+       nsites++;
+   }
+
+   INKfclose (file);
+    } else {
+   INKError ("unable to open %s\n", blacklist_file);
+   INKError ("all sites will be allowed\n", blacklist_file);
+    }
+   
+    INKMutexUnlock (sites_mutex);
+
+}
+
+static int
+blacklist_plugin (INKCont contp, INKEvent event, void *edata)
+{
+    INKHttpTxn txnp = (INKHttpTxn) edata;
+    
+    switch (event) {
+    case INK_EVENT_HTTP_OS_DNS: 
+        handle_dns (txnp, contp);
+        return 0;
+    case INK_EVENT_HTTP_SEND_RESPONSE_HDR:
+        handle_response (txnp);
+        return 0;
+    case INK_EVENT_MGMT_UPDATE:
+   read_blacklist ();
+   return 0;
+    default:
+        break;
+    }
+    return 0;
+}
+
+int
+check_ts_version() {
+
+   const char* ts_version = INKTrafficServerVersionGet();
+   int result = 0;
+
+   if (ts_version) {
+       int major_ts_version = 0;
+       int minor_ts_version = 0;
+       int patch_ts_version = 0;
+
+       if (sscanf(ts_version, "%d.%d.%d", &amp;major_ts_version,
+        &amp;minor_ts_version, &amp;patch_ts_version) != 3) {
+      return 0;
+       }
+
+       /* Since this is an TS-SDK 2.0 plugin, we need at
+     least Traffic Server 3.5.2 to run */
+       if (major_ts_version &gt; 3) {
+      result = 1;
+       } else if (major_ts_version == 3) {
+      if (minor_ts_version &gt; 5) {
+          result = 1;
+      } else if (minor_ts_version == 5) {
+          if (patch_ts_version &gt;= 2) {
+         result = 1;
+          }
+      }
+       }
+   }
+
+   return result;
+}
+
+void
+INKPluginInit (int argc, const char *argv[])
+{
+    int i;
+    INKCont contp;
+    INKPluginRegistrationInfo info;
+    int error;
+  
+    info.plugin_name = "blacklist-1";
+    info.vendor_name = "MyCompany";
+    info.support_email = "ts-api-support@MyCompany.com";
+
+    if (!INKPluginRegister (INK_SDK_VERSION_2_0 , &amp;info)) {
+        INKError ("Plugin registration failed.\n"); 
+    }
+
+    if (!check_ts_version()) {
+   INKError ("Plugin requires Traffic Server 3.5.2 or later\n");
+   return;
+    }
+
+    /* create an INKTextLogObject to log blacklisted requests to */
+    log = INKTextLogObjectCreate("blacklist", INK_LOG_MODE_ADD_TIMESTAMP,<a class="indexterm" name="id429173"></a>
+             NULL, &amp;error);
+    if (!log) {
+   printf("Blacklist plugin: error %d while creating log\n", error);
+    }
+
+    sites_mutex = INKMutexCreate ();
+
+    nsites = 0;
+    for (i = 0; i &lt; MAX_NSITES; i++) {
+   sites[i] = NULL;
+    }
+
+    read_blacklist ();
+
+    contp = INKContCreate (blacklist_plugin, NULL);
+        
+    INKHttpHookAdd (INK_HTTP_OS_DNS_HOOK, contp);
+
+    INKMgmtUpdateRegister (contp, "Inktomi Blacklist Plugin", "blacklist.cgi");
+}</pre>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/App_SampleSourceCode.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/App_Troubleshooting.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/App_Troubleshooting.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/App_Troubleshooting.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/App_Troubleshooting.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,166 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Appendix C. Troubleshooting Tips</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="prev" href="Dep_MutexFunctions.html" title="Mutex Function">
+<link rel="next" href="Trouble_LoadPlugins.html" title="Unable to Load Plugins">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="section" href="App_Troubleshooting.html#Trouble_CompilePlugins" title="Unable to Compile Plugins">
+<link rel="section" href="Trouble_LoadPlugins.html" title="Unable to Load Plugins">
+<link rel="section" href="Trouble_DebugTags.html" title="Using Debug Tags">
+<link rel="section" href="Trouble_UsingDebugger.html" title="Using a Debugger">
+<link rel="section" href="Trouble_DebugMemLeaks.html" title="Debugging Memory Leaks">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="Dep_MutexFunctions.html">Prev</a> — Mutex Function</div>
+<div class="navnext">Unable to Load Plugins — <a accesskey="n" href="Trouble_LoadPlugins.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="appendix" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="App_Troubleshooting"></a>Appendix C. Troubleshooting Tips</h2></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"><a href="App_Troubleshooting.html#Trouble_CompilePlugins">Unable to Compile Plugins</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="App_Troubleshooting.html#CompilePlugins_Unix">Unix Example</a></span></dt>
+<dt><span class="section"><a href="App_Troubleshooting.html#CompilePlugins_HPUX">HPUX Example</a></span></dt>
+<dt><span class="section"><a href="App_Troubleshooting.html#CompilePlugins_Win">Compiling For Windows NT</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="Trouble_LoadPlugins.html">Unable to Load Plugins</a></span></dt>
+<dt><span class="section"><a href="Trouble_DebugTags.html">Using Debug Tags</a></span></dt>
+<dd><dl><dt><span class="section"><a href="Trouble_DebugTags.html#Trouble_OtherDebugTags">Other Useful Internal Debug Tags</a></span></dt></dl></dd>
+<dt><span class="section"><a href="Trouble_UsingDebugger.html">Using a Debugger</a></span></dt>
+<dd><dl><dt><span class="section"><a href="Trouble_UsingDebugger.html#Trouble_DebuggingTips">Debugging Tips:</a></span></dt></dl></dd>
+<dt><span class="section"><a href="Trouble_DebugMemLeaks.html">Debugging Memory Leaks</a></span></dt>
+</dl>
+</div>
+<p>This appendix lists the following troubleshooting tips.</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="App_Troubleshooting.html#Trouble_CompilePlugins" title="Unable to Compile Plugins">“Unable to Compile Plugins”</a></p></li>
+<li><p><a href="Trouble_LoadPlugins.html" title="Unable to Load Plugins">“Unable to Load Plugins”</a></p></li>
+<li><p><a href="Trouble_DebugTags.html" title="Using Debug Tags">“Using Debug Tags”</a></p></li>
+<li><p><a href="Trouble_UsingDebugger.html" title="Using a Debugger">“Using a Debugger”</a></p></li>
+<li><p><a href="Trouble_DebugMemLeaks.html" title="Debugging Memory Leaks">“Debugging Memory Leaks”</a></p></li>
+</ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="Trouble_CompilePlugins"></a>Unable to Compile Plugins</h2></div></div></div>
+<p>The process you use to compile a shared library will vary from
+      platform to platform, so the Traffic Server API includes makefile
+      templates you can use to create shared libraries on all the supported
+      Traffic Server platforms.</p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="CompilePlugins_Unix"></a>Unix Example</h3></div></div></div>
+<p>Assuming the sample program is stored in the file hello-world.c,
+        you could use the following commands to building a shared library on
+        Solaris using the GNU C compiler.</p>
+<pre class="programlisting">gcc -g -Wall -fPIC -o hello-world.o -c hello-world.c
+gcc -g -Wall -shared -o hello-world.so hello-world.o</pre>
+<p>The first command compiles hello-world.c as Position Independent
+        Code (PIC) and the second command links the single hello-world.o
+        object file into the hello-world.so shared library.</p>
+<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="images/docbook/caution.png"></td>
+<th align="left">Caution</th>
+</tr>
+<tr><td align="left" valign="top"><p>Make sure that your plugin is not statically linked with
+          system libraries.</p></td></tr>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="CompilePlugins_HPUX"></a>HPUX Example</h3></div></div></div>
+<p>Assuming the sample program is stored in the file hello_world.c,
+        you could use the following commands to build a shared library on
+        HPUX:</p>
+<pre class="programlisting">cc +z -o hello_world.o -c hello_world.c 
+ld -b -o hello_world.so hello_world.o</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="CompilePlugins_Win"></a>Compiling For Windows NT</h3></div></div></div>
+<p>Your PC must have the following software installed:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Windows NT 4.0 SP4</p></li>
+<li><p>Microsoft Developer Studio 6.0</p></li>
+</ul></div>
+<h4>
+<a name="id435778"></a>To compile a plugin for the Windows NT version of Traffic
+        Server:</h4>
+<div class="orderedlist"><ol type="1">
+<li><p>Open PlugIn.dsw with Microsoft Visual C++ (MSVC++). The dsw
+            file should be included in the SDK CD. Inside VC++, the sample
+            plugins are listed as separate projects.</p></li>
+<li>
+<p>For each of the projects that need to be built, you need to
+            tell VC++ where it can find the Traffic Server library:
+            traffic_server.lib. This library is in your NT Traffic Server
+            distribution.</p>
+<p>You might need to update the library lookup path. Use the
+            following procedure:</p>
+</li>
+</ol></div>
+<h4>
+<a name="id435804"></a>To update the library lookup path</h4>
+<div class="orderedlist"><ol type="1">
+<li><p>Right-mouse-click on a project.</p></li>
+<li><p>Select the <span class="guilabel">Settings...</span> option.</p></li>
+<li><p>Click the <span class="guilabel">Link</span> tab on the dialog
+            box.</p></li>
+<li><p>Select <span class="guilabel">Input</span> in the combo-box.</p></li>
+<li><p>Enter the library path in the <span class="guilabel">Additional library
+            path: text</span> field</p></li>
+<li><p>Now you can build your plugin.</p></li>
+</ol></div>
+</div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/App_Troubleshooting.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/AppendTransformPlugin.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/AppendTransformPlugin.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/AppendTransformPlugin.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/AppendTransformPlugin.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,182 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>The Append-Transform Plugin</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="prev" href="SampleNullTransformPlugin.html" title="The Sample Null Transform Plugin">
+<link rel="next" href="SampleBufferedNullTransformPlugin.html" title="The Sample Buffered Null Transform Plugin">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="SampleNullTransformPlugin.html">Prev</a> — The Sample Null Transform Plugin</div>
+<div class="navnext">The Sample Buffered Null Transform Plugin — <a accesskey="n" href="SampleBufferedNullTransformPlugin.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="AppendTransformPlugin"></a>The Append-Transform Plugin</h2></div></div></div>
+<p>The append-transform plugin appends text to the body of an HTTP
+      response. It obtains this text from a file. The name of the file
+      containing the append text is a parameter you specify in
+      <code class="filename">plugin.config</code>, as follows:</p>
+<pre class="programlisting">append-transform.so path/to/file</pre>
+<p>The append-transform plugin is based on
+      <code class="filename">null-transform.c</code>. The only difference is that after
+      the plugin feeds the document through the transformation, it adds text
+      to the response.</p>
+<p>Here is a list of the functions in
+      <code class="filename">append-transform.c</code>, in the order they appear in the
+      source code, with a description of what the function does:</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<p><code class="function">my_data_alloc</code></p>
+<p>Allocates and initializes a MyData structure. The plugin
+          defines a struct, <code class="code">MyData</code>, as follows:</p>
+<pre class="programlisting">     typedef struct {
+     INKVIO output_vio;
+     INKIOBuffer output_buffer;
+     INKIOBufferReader output_reader;
+     int append_needed;
+     } MyData;</pre>
+<p>The <code class="code">MyData</code> structure is used to represent data
+          that the transformation (vconnection) needs. The transformation’s
+          data pointer is set to a <code class="code">MyData</code> pointer using
+          <code class="code">INKContDataSet</code> in the <code class="code">handle_transform</code>
+          routine.</p>
+</li>
+<li>
+<p><code class="function">my_data_destroy</code></p>
+<p>Destroys objects of type <code class="code">MyData</code>. The
+          append_transform routine (see below) calls
+          <code class="code">my_data_destroy</code> when the transformation is complete, to
+          deallocate the transformation’s data.</p>
+</li>
+<li>
+<p><code class="function">handle_transform</code></p>
+<p>This function does the actual data transformation. The
+          transformation is created in <code class="code">transform_add</code> (see below).
+          handle_transform is called by append_transform.</p>
+</li>
+<li>
+<p><code class="function">append_transform</code></p>
+<p>This is the handler function for the transformation
+          vconnection created in transform_add. It is the implementation of
+          the vconnection.</p>
+<div class="itemizedlist"><ul type="circle">
+<li><p>If the transformation vconnection has been closed,
+              append_transform calls <code class="function">my_data_destroy</code> to
+              destroy the vonnection</p></li>
+<li><p>If <code class="function">append_transform</code> receives an error
+              event, it calls back the continuation to let it know it has
+              completed the write operation</p></li>
+<li><p>If it receives a <code class="code">WRITE_COMPLETE</code> event, it
+              shuts down the write portion of its vconnection</p></li>
+<li><p>If it receives a <code class="code">WRITE_READY</code> or any other
+              event (such as
+              <code class="code">INK_HTTP_RESPONSE_TRANSFORM_HOOK</code>)<a class="indexterm" name="id304599"></a>, it calls <code class="function">handle_transform</code>
+              to attempt to transform more data</p></li>
+</ul></div>
+</li>
+<li>
+<p><code class="function">transformable</code></p>
+<p>The plugin transforms only documents that have a content type
+          of <code class="code">text/html</code>. This function examines the
+          <code class="code">Content-Type</code> MIME header field in the response header;
+          if the value of the MIME field is <code class="code">text/html</code>, the
+          function returns 1. Otherwise, it returns zero.</p>
+</li>
+<li>
+<p><code class="function">transform_add</code></p>
+<p>Creates the transformation for the current transaction, and
+          sets up a transformation hook. The handler function for the
+          transformation is <code class="function">append_transform</code>.</p>
+</li>
+<li>
+<p><code class="function">transform_plugin</code></p>
+<p>This is the handler function for the main continuation for the
+          plugin. Traffic Server calls this function whenever it reads an HTTP
+          response header. <code class="function">transform_plugin</code> does the
+          following:</p>
+<div class="itemizedlist"><ul type="circle">
+<li><p>Gets a handle to the HTTP transaction being
+              processed</p></li>
+<li><p>Calls <code class="function">transformable</code> to determine
+              whether the response document content is of type
+              <code class="code">text/html</code></p></li>
+<li><p>If the content is transformable, calls
+              <code class="function">transform_add</code> to create the
+              transformation</p></li>
+<li><p>Calls <code class="function">INKHttpTxnReenable</code> to continue
+              the transaction</p></li>
+</ul></div>
+</li>
+<li>
+<p><code class="function">load</code></p>
+<p>Opens the file containing the text to be appended, and loads
+          the contents of the file into an <code class="function">INKIOBuffer</code>
+          called <code class="function">append_buffer</code>.</p>
+</li>
+<li>
+<p><code class="function">INKPluginInit</code></p>
+<p>Does the following:</p>
+<div class="itemizedlist"><ul type="circle">
+<li><p>Checks to make sure that the required configuration
+              information (the append text filename) is entered in
+              <code class="filename">plugin.config</code> correctly.</p></li>
+<li><p>If there is a filename, <code class="function">INKPluginInit</code>
+              calls load to load the text.</p></li>
+<li><p>Creates a continuation for the plugin. The handler for
+              this continuation is
+              <code class="function">transform_plugin</code>.</p></li>
+<li><p>Adds the plugin’s continuation to
+              <code class="function">INK_HTTP_READ_RESPONSE_HDR_HOOK</code>. In other
+              words, sets up a callback of the plugin’s continuation when
+              Traffic Server reads HTTP response headers.</p></li>
+</ul></div>
+</li>
+</ul></div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/AppendTransformPlugin.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/BasicAuthorizatonPlugin.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/BasicAuthorizatonPlugin.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/BasicAuthorizatonPlugin.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/BasicAuthorizatonPlugin.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,87 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>The Basic Authorization Plugin</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="prev" href="WorkWHTTPHeaderFunc.html" title="Working with HTTP Header Functions">
+<link rel="next" href="ImplementHandler_GetTransHandle.html" title="Implementing the Handler and Getting a Handle to the
+        Transaction">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="subsection" href="BasicAuthorizatonPlugin.html#CreatePluginParentCont_GlHk" title="Creating the Plugin's Parent Continuation and Global
+        Hook">
+<link rel="subsection" href="ImplementHandler_GetTransHandle.html" title="Implementing the Handler and Getting a Handle to the
+        Transaction">
+<link rel="subsection" href="WorkWithHTTPHeaders.html" title="Working With HTTP Headers">
+<link rel="subsection" href="SetTransactionHook.html" title="Setting a Transaction Hook">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="WorkWHTTPHeaderFunc.html">Prev</a> — Working with HTTP Header Functions</div>
+<div class="navnext">Implementing the Handler and Getting a Handle to the
+        Transaction — <a accesskey="n" href="ImplementHandler_GetTransHandle.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="BasicAuthorizatonPlugin"></a>The Basic Authorization Plugin</h2></div></div></div>
+<p>The sample basic authorization plugin,
+      <code class="filename">basic-auth.c</code>, checks for basic HTTP proxy
+      authorization. In HTTP basic proxy authorization, client user names and
+      passwords are contained in the <code class="code">Proxy-Authorization</code> header.
+      The password is encoded using base64 encoding. The plugin checks all
+      incoming requests for the authorization header, user name and password.
+      If the plugin does not find all of the these, it reenables with an error
+      (effectively stopping the transaction) and adds a transaction hook to
+      the send response header event.</p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="CreatePluginParentCont_GlHk"></a>Creating the Plugin's Parent Continuation and Global
+        Hook</h3></div></div></div>
+<p>The parent continuation and global hook are created as
+        follows:</p>
+<pre class="programlisting">INKHttpHookAdd (INK_HTTP_OS_DNS_HOOK, INKContCreate (auth_plugin, NULL));</pre>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/BasicAuthorizatonPlugin.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/BlacklistPlugin.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/BlacklistPlugin.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/BlacklistPlugin.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/BlacklistPlugin.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,141 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>The Blacklist Plugin</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="prev" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="next" href="SettingGlobalHook.html" title="Setting a Global Hook">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="subsection" href="BlacklistPlugin.html#CreatingParentContinuation" title="Creating the Parent Continuation">
+<link rel="subsection" href="SettingGlobalHook.html" title="Setting a Global Hook">
+<link rel="subsection" href="SettingUpUIUpdateCallbacks.html" title="Setting Up UI Update Callbacks">
+<link rel="subsection" href="AccessingTransactionProc.html" title="Accessing the Transaction Being Processed">
+<link rel="subsection" href="SettingUpTransacHook.html" title="Setting Up a Transaction Hook">
+<link rel="subsection" href="WorkWHTTPHeaderFunc.html" title="Working with HTTP Header Functions">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="HeaderBasedPluginEx.html">Prev</a> — Chapter 4. Header-Based Plugin Examples</div>
+<div class="navnext">Setting a Global Hook — <a accesskey="n" href="SettingGlobalHook.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="BlacklistPlugin"></a>The Blacklist Plugin</h2></div></div></div>
+<p>The sample blacklisting plugin included in the Traffic Server SDK
+      is <code class="filename">blacklist_1.c</code>. This plugin checks every incoming
+      HTTP client request against a list of blacklisted web sites. If the
+      client requests a blacklisted site, then the plugin returns an
+      <code class="code">Access forbidden</code> message to the client. The flow of HTTP
+      processing with the blacklist plugin is illustrated in <a href="CreatingTSPlugins.html#Fig_BlacklistPlugin" title="Figure 2.5. Blacklist Plugin">Figure 2.5, “Blacklist Plugin”</a>. Additionally, this example contains a
+      simple configuration management interface. It can read a list of
+      blacklisted sites from a file, <code class="filename">blacklist.txt</code>, that
+      can be updated by a Traffic Server administrator. When the configuration
+      file is updated, Traffic Server sends an event to the plugin which wakes
+      it up to do some work.</p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="CreatingParentContinuation"></a>Creating the Parent Continuation<a class="indexterm" name="id373031"></a></h3></div></div></div>
+<p>You create the static parent continuation in the mandatory
+        <code class="function">INKPluginInit</code> function. This parent continuation
+        effectively <span class="bold"><strong>is</strong></span> the plugin: the plugin
+        does work when this continuation receives an event from Traffic
+        Server. Traffic Server passes the event as an argument to the
+        continuation’s handler function. When you create continuations, you
+        must create and specify their handler functions.</p>
+<p>You can specify an optional mutex lock when you create
+        continuations. The mutex lock protects data shared by asynchronous
+        processes. Traffic Server has a multi-threaded design; therefore, if
+        several threads try to access the same continuation’s data, then race
+        conditions can occur.</p>
+<p>Here is how the static parent continuation is created in
+        <code class="filename">blacklist-1.c</code></p>
+<pre class="programlisting">void
+INKPluginInit (int argc, const char *argv[])
+{ ...
+       INKCont contp;
+
+       contp = INKContCreate (blacklist_plugin, NULL);
+...
+}</pre>
+<p>:</p>
+<p>The handler function for the plugin is blacklist_plugin, and the
+        mutex is null. The continuation handler function’s job is to handle
+        the events that are sent to it; accordingly, the
+        <code class="filename">blacklist_plugin</code> routine consists of a switch
+        statement that covers each of the events that might be sent to
+        it:</p>
+<pre class="programlisting">static int
+blacklist_plugin (INKCont contp, INKEvent event, void *edata)
+{
+     INKHttpTxn txnp = (INKHttpTxn) edata;
+     switch (event) {
+     case INK_EVENT_HTTP_OS_DNS:
+          handle_dns (txnp, contp);
+          return 0;
+     case INK_EVENT_HTTP_SEND_RESPONSE_HDR:
+          handle_response (txnp);
+          return 0;
+     case INK_EVENT_MGMT_UPDATE:
+     read_blacklist ();
+     return 0;
+     default:
+          break;
+     }
+     return 0;
+}</pre>
+<p>When you write handler functions, you have to anticipate any
+        events that might be sent to the handler by hooks or by other
+        functions. In the Blacklist plugin, <code class="code">INK_EVENT_OS_DNS</code> is
+        sent because of the global hook established in
+        <code class="code">INKPluginInit</code>;
+        <code class="code">INK_EVENT_HTTP_SEND_RESPONSE_HDR</code> is sent because the
+        plugin contains a transaction hook (see <a href="SettingUpTransacHook.html" title="Setting Up a Transaction Hook">“Setting Up a Transaction Hook”</a>), and
+        <code class="code">INK_EVENT_MGMT_UPDATE</code> is sent by Traffic Manager whenever
+        there is a configuration change. See <a href="SettingUpUIUpdateCallbacks.html" title="Setting Up UI Update Callbacks">“Setting Up UI Update Callbacks”</a>. It is good practice to have a
+        default case in your switch statements.</p>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/BlacklistPlugin.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/CacheAPI.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/CacheAPI.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/CacheAPI.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/CacheAPI.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,104 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Guide to the Cache API</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="prev" href="IOBuffers_IO.html" title="IO Buffers">
+<link rel="next" href="DoACacheWrite.html" title="How to Do a Cache Write">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="subsection" href="CacheAPI.html#DoACacheRead" title="How to Do a Cache Read">
+<link rel="subsection" href="DoACacheWrite.html" title="How to Do a Cache Write">
+<link rel="subsection" href="DoACacheRemove.html" title="How to Do a Cache Remove">
+<link rel="subsection" href="Errors_Cache.html" title="Errors">
+<link rel="subsection" href="CacheAPI_Example.html" title="Example">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="IOBuffers_IO.html">Prev</a> — IO Buffers</div>
+<div class="navnext">How to Do a Cache Write — <a accesskey="n" href="DoACacheWrite.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="CacheAPI"></a>Guide to the Cache API</h2></div></div></div>
+<p>The cache API lets plugins read, write, and remove objects in the
+      Traffic Server cache. All cache APIs are keyed by an object called an
+      <code class="function">INKCacheKey</code>. Cache keys are created via
+      <code class="function">INKCacheKeyCreate</code>. Keys are destroyed via
+      <code class="function">INKCacheKeyDestroy</code>. Use
+      <code class="function">INKCacheKeyDigestSet</code> to set the hash of the cache
+      key.</p>
+<p>Note that the cache APIs differentiates between HTTP data and
+      plugin data. The cache APIs do not allow you to write HTTP docs in the
+      cache. You can only write plugin-specific data which is a specific type
+      of data which is different from the HTTP type.</p>
+<p>Example:</p>
+<pre class="programlisting">    const unsigned char *key_name = "example key name";
+
+    INKCacheKey key;
+    INKCacheKeyCreate (&amp;key);
+    INKCacheKeyDigestSet (key, (unsigned char *) key_name , strlen(key_name));
+    INKCacheKeyDestroy (key);</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="DoACacheRead"></a>How to Do a Cache Read</h3></div></div></div>
+<p><code class="function">INKCacheRead</code> does not really read, it is
+        used for lookups. See the sample Protocol plugin. The possible
+        callback events include:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><code class="code">INK_EVENT_CACHE_OPEN_READ</code> - indicating that the
+            lookup was successful, the data passed back along with this event
+            is a cache vconnection that may be used to initiate a read on this
+            keyed data.</p></li>
+<li><p><code class="code">INK_EVENT_CACHE_OPEN_READ_FAILED</code> - indicating
+            that the lookup was unsuccessful. Reasons for this event include:
+            another continuation could be writing to that cache location, or
+            the cache key may not refer to a cached resource. Data payload for
+            this event indicates the possible reason for the read failing
+            (<code class="function">INKCacheError</code>).</p></li>
+</ul></div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/CacheAPI.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/CacheAPI_Example.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/CacheAPI_Example.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/CacheAPI_Example.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/CacheAPI_Example.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,103 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Example</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="CacheAPI.html" title="Guide to the Cache API">
+<link rel="prev" href="Errors_Cache.html" title="Errors">
+<link rel="next" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="Errors_Cache.html">Prev</a> — Errors</div>
+<div class="navnext">Chapter 16. Plugin Management — <a accesskey="n" href="PluginManagement.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="CacheAPI_Example"></a>Example</h3></div></div></div>
+<p>In the example below, suppose we have a cache hit and the cache
+        returns a vconnection for us to read the document from the cache. To
+        do this, we have to prepare a buffer (<code class="varname">cache_bufp</code>)
+        to hold the document. Meanwhile, we would use
+        <code class="function">INKVConnCachedObjectSizeGet</code> to tell us the actual
+        size of the document (<code class="varname">content_length</code>). After, we
+        would issue <code class="function">INKVConnRead</code> to read the document
+        with the total data length required being
+        <code class="varname">content_length</code>. Assume the following data:</p>
+<pre class="programlisting">    INKIOBuffer       cache_bufp = INKIOBufferCreate ();
+    INKIOBufferReader cache_readerp = INKIOBufferReaderAlloc (out_bufp);
+    INKVConn          cache_vconnp = NULL;
+    INKVIO            cache_vio = NULL;
+    int               content_length = 0;</pre>
+<p>In the <code class="code">INK_CACHE_OPEN_READ</code> handler;</p>
+<pre class="programlisting">cache_vconnp = (INKVConn) data;
+    INKVConnCachedObjectSizeGet (cache_vconnp, &amp;content_length);
+    cache_vio = INKVConnRead (cache_vconn, contp, cache_bufp, content_length);</pre>
+<p>In the <code class="code">INK_EVENT_VCONN_READ_READY</code> handler:</p>
+<pre class="programlisting">(usual VCONN_READ_READY handler logic)
+int nbytes = INKVIONBytesGet (cache_vio);
+int ntodo  = INKVIONTodoGet (cache_vio);
+int ndone  = INKVIONDoneGet (cache_vio);
+(consume data in cache_bufp)
+INKVIOReenable (cache_vio);</pre>
+<p>Do not try to get continuations or vios from
+        <code class="function">INKVConn</code> objects for Cache VConnections. Also
+        note that the following APIs can only be used on Transformation
+        VConnections and must not be used on Cache or Net VConnections:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><code class="function">INKVConnWriteVIOGet</code></p></li>
+<li><p><code class="function">INKVConnReadVIOGet</code></p></li>
+<li><p><code class="function">INKVConnClosedGet</code></p></li>
+</ul></div>
+<p>APIs such as <code class="function">INKVConnRead</code>,
+        <code class="function">INKVConnWrite</code>,
+        <code class="function">INKVConnClose</code>, <code class="function">INKVConnAbort</code>
+        and <code class="function">INKVConnShutdown</code> can be used on any kind of
+        VConnections.</p>
+<p>When you are done:</p>
+<pre class="programlisting">INKCacheKeyDestroy (key);</pre>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/CacheAPI_Example.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/CacheInterfaceFunctions.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/CacheInterfaceFunctions.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/CacheInterfaceFunctions.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/CacheInterfaceFunctions.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,100 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Cache Interface Functions</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="prev" href="INKNetVConnRemotePortGet.html" title="INKNetVConnRemotePortGet">
+<link rel="next" href="INKCacheKeyDigestSet.html" title="INKCacheKeyDigestSet">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<link rel="subsection" href="CacheInterfaceFunctions.html#INKCacheKeyCreate" title="INKCacheKeyCreate">
+<link rel="subsection" href="INKCacheKeyDigestSet.html" title="INKCacheKeyDigestSet">
+<link rel="subsection" href="INKCacheKeyHostNameSet.html" title="INKCacheKeyHostNameSet">
+<link rel="subsection" href="INKCacheKeyDestroy.html" title="INKCacheKeyDestroy">
+<link rel="subsection" href="INKCacheRead.html" title="INKCacheRead">
+<link rel="subsection" href="INKCacheReady.html" title="INKCacheReady">
+<link rel="subsection" href="INKCacheWrite.html" title="INKCacheWrite">
+<link rel="subsection" href="INKCacheRemove.html" title="INKCacheRemove">
+<link rel="subsection" href="INKCacheKeyPinnedSet.html" title="INKCacheKeyPinnedSet">
+<link rel="subsection" href="INKVConnCacheObjectSizeGet.html" title="INKVConnCacheObjectSizeGet">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKNetVConnRemotePortGet.html">Prev</a> — INKNetVConnRemotePortGet</div>
+<div class="navnext">INKCacheKeyDigestSet — <a accesskey="n" href="INKCacheKeyDigestSet.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="CacheInterfaceFunctions"></a>Cache Interface Functions</h2></div></div></div>
+<p></p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKCacheKeyCreate"></a>INKCacheKeyCreate</h3></div></div></div>
+<p>Creates a new cache key to be assigned to an object to be
+        cached.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKCacheKeyCreate(InkCacheKey
+              *<em class="replaceable"><code>new_key</code></em>)</code></p></dd>
+<dt><span class="term">Arguments</span></dt>
+<dd><p><code class="function">INKCacheKey
+              *</code><code class="code"><em class="replaceable"><code>new_key</code></em></code> is
+              set to the allocated key.</p></dd>
+<dt><span class="term">Description</span></dt>
+<dd><p>Creates (allocates memory for) a new cache key. The key
+              can then be generated and assigned to an object using
+              <code class="function">INKCacheKeyDigestSet</code>.</p></dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if success.</p>
+<p><code class="code">INK_ERROR</code> if cache key could not be
+              allocated.</p>
+</dd>
+<dt><span class="term">First Release</span></dt>
+<dd><p>Traffic Server 5.2</p></dd>
+</dl></div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/CacheInterfaceFunctions.html
------------------------------------------------------------------------------
    svn:keywords = Id

Added: incubator/trafficserver/site/trunk/docs/sdk/ConceptIndex.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/ConceptIndex.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/ConceptIndex.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/ConceptIndex.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,251 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Index</title>
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/reset/reset-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/fonts/fonts-min.css" type="text/css">
+<link rel="stylesheet" href="http://yui.yahooapis.com/2.2.2/build/treeview/assets/tree.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc.css" type="text/css">
+<link rel="stylesheet" href="css/ydoc-chunk.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
+<link rel="start" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="up" href="index.html" title="Traffic Server Software Developers Kit">
+<link rel="prev" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="preface" href="Preface.html" title="Preface">
+<link rel="chapter" href="GetingStarted.html" title="Chapter 1. Getting Started">
+<link rel="chapter" href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">
+<link rel="index" href="CreatingTSPlugins.html#id372630" title="Index">
+<link rel="chapter" href="ch03.html" title="Chapter 3. Remap Plugin">
+<link rel="chapter" href="HeaderBasedPluginEx.html" title="Chapter 4. Header-Based Plugin Examples">
+<link rel="chapter" href="HTTPTransformationPlugins.html" title="Chapter 5. HTTP Transformation Plugins">
+<link rel="chapter" href="NewProtocolPlugins.html" title="Chapter 6. New Protocol Plugins">
+<link rel="chapter" href="ch07.html" title="Chapter 7. Cache Plugin">
+<link rel="chapter" href="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="chapter" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<link rel="chapter" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="chapter" href="MutexGuide.html" title="Chapter 11. Mutex Guide">
+<link rel="chapter" href="Continuations.html" title="Chapter 12. Continuations">
+<link rel="chapter" href="PluginConfigurations.html" title="Chapter 13. Plugin Configurations">
+<link rel="chapter" href="ActionsGuide.html" title="Chapter 14. Actions Guide">
+<link rel="chapter" href="IOGuide.html" title="Chapter 15. IO Guide">
+<link rel="chapter" href="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="chapter" href="AddingStatistics.html" title="Chapter 17. Adding Statistics">
+<link rel="chapter" href="FunctionReference.html" title="Chapter 18. Function Reference">
+<link rel="appendix" href="App_SampleSourceCode.html" title="Appendix A. Sample Source Code">
+<link rel="appendix" href="App_DeprecatedFunctions.html" title="Appendix B. Deprecated Functions">
+<link rel="appendix" href="App_Troubleshooting.html" title="Appendix C. Troubleshooting Tips">
+<link rel="appendix" href="FunctionIndex.html" title="Appendix D. Function Index">
+<link rel="appendix" href="TypeIndex.html" title="Appendix E. Type Index">
+<link rel="index" href="ConceptIndex.html" title="Index">
+<script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/yahoo/yahoo-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/event/event-min.js"></script><script type="text/javascript" src="http://yui.yahooapis.com/2.2.2/build/treeview/treeview-min.js"></script><script type="text/javascript" src="js/tocnodes.js"></script><script type="text/javascript" src="js/toc.js"></script><script type="text/javascript">
+    document.write("<style> div.toc {display: none} </style>"); 
+  </script>
+</head>
+<body>
+<div class="doctitle">
+<a href="index.html">Home</a>
+<img src="images/docbook/ts75.png"><h1 class="doctitle">Traffic Server Software Developers Kit</h1>
+</div>
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="TypeIndex.html">Prev</a> — Appendix E. Type Index</div>
+<div class="navnext"></div>
+</div>
+<div id="toc"></div>
+<div class="index">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="ConceptIndex"></a>Index</h2></div></div></div>
+<div class="index">
+<div class="indexdiv">
+<h3>C</h3>
+<dl>
+<dt>compiling on HPUX, <a href="ASimplePlugin.html#Compiling_HPUX">HPUX Example</a>
+</dt>
+<dt>compiling on UNIX, <a href="ASimplePlugin.html#Compiling_Unix">Unix Example</a>
+</dt>
+<dt>compiling on Windows NT, <a href="ASimplePlugin.html#Compiling_Windows">Compiling for Windows NT</a>
+</dt>
+<dt>compiling plugins, examples, <a href="ASimplePlugin.html#CompilingYourPlugin">Compile Your Plugin</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>D</h3>
+<dl>
+<dt>deprecated functions, <a href="DeprecatedMarshBufFuncs.html">Deprecated Functions</a>
+</dt>
+<dt>duplicate MIME fields, <a href="DuplicateMIMEFlds.html">Duplicate MIME Fields Are Not Coalesced</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>G</h3>
+<dl>
+<dt>global hook, <a href="SettingGlobalHook.html">Setting a Global Hook</a>
+</dt>
+<dt>global HTTP hooks, <a href="AddingHooks.html">Adding Hooks</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>H</h3>
+<dl>
+<dt>hello-world example, <a href="ASimplePlugin.html">A Simple Plugin</a>
+</dt>
+<dt>HTTP header, <a href="MIMEHeaders.html">MIME Headers</a>
+</dt>
+<dt>HTTP session, <a href="HTTPSessions.html">HTTP Sessions</a>
+</dt>
+<dt>HTTP transaction, <a href="HTTPSessions.html">HTTP Sessions</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>I</h3>
+<dl>
+<dt>INKEventFunc, <a href="AccessingTransactionProc.html">Accessing the Transaction Being Processed</a>
+</dt>
+<dt>INKHttpAltInfo, <a href="HTTPAlternateSelection.html">HTTP Alternate Selection</a>
+</dt>
+<dt>INKHttpTxn, <a href="AccessingTransactionProc.html">Accessing the Transaction Being Processed</a>, <a href="HTTP_Transactions.html">HTTP Transactions</a>
+</dt>
+<dt>INKMBufferCreate, <a href="HTTPHeaders2.html">HTTP Headers</a>
+</dt>
+<dt>INKVIO, <a href="HTTPTransformationPlugins.html#VIOs">VIOs</a>
+</dt>
+<dt>INK_HTTP_RESPONSE_TRANSFORM_HOOK, <a href="AppendTransformPlugin.html">The Append-Transform Plugin</a>
+</dt>
+<dt>INK_HTTP_SSN_CLOSE_HOOK, <a href="HTTPSessions.html">HTTP Sessions</a>
+</dt>
+<dt>INK_HTTP_SSN_START_HOOK, <a href="HTTPSessions.html">HTTP Sessions</a>
+</dt>
+<dt>INK_LOG_MODE_ADD_TIMESTAMP, <a href="App_SampleSourceCode.html#Sample_blacklist-1.c">blacklist-1.c</a>
+</dt>
+<dt>INT_MAX, <a href="IOGuide.html#VconnectionUsersView">The vconnection user’s view</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>L</h3>
+<dl><dt>lock, <a href="MutexGuide.html#Mutexes">Mutexes</a>
+</dt></dl>
+</div>
+<div class="indexdiv">
+<h3>M</h3>
+<dl>
+<dt>memory leak</dt>
+<dd><dl><dt>in transformation plugins, <a href="Transformations_IO.html#TransformVconnection">Transformation VConnection</a>
+</dt></dl></dd>
+<dt>method(HTTP), <a href="HTTPHeaders.html#AboutHTTPHeaders">About HTTP Headers</a>
+</dt>
+<dt>MIME field, <a href="HTTPHeaders.html#AboutHTTPHeaders">About HTTP Headers</a>, <a href="MIMEHeaders.html">MIME Headers</a>
+</dt>
+<dt>MIME field name, <a href="MIMEHeaders.html">MIME Headers</a>
+</dt>
+<dt>MIME field value, <a href="MIMEHeaders.html">MIME Headers</a>
+</dt>
+<dt>MIME fields, <a href="MIMEFldsBelongAssocMIMEHdr.html">MIME Fields Always Belong to an Associated MIME
+        Header</a>
+</dt>
+<dt>MIME header, <a href="HTTPHeaders.html#AboutHTTPHeaders">About HTTP Headers</a>, <a href="MIMEHeaders.html">MIME Headers</a>
+</dt>
+<dd><dl><dt>Backus-Naur form, <a href="MIMEHeaders.html">MIME Headers</a>
+</dt></dl></dd>
+<dt>multiple plugins, <a href="Updatingplugin.configFile.html">Update the plugin.config File</a>
+</dt>
+<dt>mutexes, <a href="MutexGuide.html#Mutexes">Mutexes</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>N</h3>
+<dl>
+<dt>new MIME field functions, <a href="MIMEFldsBelongAssocMIMEHdr.html">MIME Fields Always Belong to an Associated MIME
+        Header</a>
+</dt>
+<dt>NT</dt>
+<dd><dl><dt>compiling plugins, <a href="ASimplePlugin.html#Compiling_Windows">Compiling for Windows NT</a>
+</dt></dl></dd>
+<dt>null-terminated strings, <a href="GuideTSHTTPHdrSyst.html#NoNullTerminatedStrings">No Null-Terminated Strings</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>P</h3>
+<dl>
+<dt>parent continuation, <a href="BlacklistPlugin.html#CreatingParentContinuation">Creating the Parent Continuation</a>
+</dt>
+<dt>parent INKMLoc, <a href="RlsMarshalBufHandles.html">Release Marshal Buffer Handles</a>
+</dt>
+<dt>parent MIME header, <a href="MIMEFldsBelongAssocMIMEHdr.html">MIME Fields Always Belong to an Associated MIME
+        Header</a>
+</dt>
+<dt>plugin.config, <a href="GetingStarted.html#PluginConfiguration">Plugin Configuration</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>R</h3>
+<dl>
+<dt>read VIO, <a href="HTTPTransformationPlugins.html#WritingContentTransformPlugins">Writing Content Transform Plugins</a>
+</dt>
+<dt>releasing mbuffer handles, <a href="RlsMarshalBufHandles.html">Release Marshal Buffer Handles</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>S</h3>
+<dl>
+<dt>sample code</dt>
+<dd><dl>
+<dt>INKPluginRegister, <a href="PlusingRegisAndVersionCkg.html">Plugin Registration and Version Checking</a>
+</dt>
+<dt>version check, <a href="PlusingRegisAndVersionCkg.html">Plugin Registration and Version Checking</a>
+</dt>
+</dl></dd>
+<dt>statistics</dt>
+<dd><dl><dt>viewing, <a href="ViewStatsUsingTrafLine.html">Viewing Statistics Using Traffic Line</a>
+</dt></dl></dd>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>T</h3>
+<dl>
+<dt>thread locking, <a href="MutexGuide.html#Mutexes">Mutexes</a>
+</dt>
+<dt>Traffic Edge, <a href="PlusingRegisAndVersionCkg.html">Plugin Registration and Version Checking</a>
+</dt>
+<dt>Traffic Line, <a href="ViewStatsUsingTrafLine.html">Viewing Statistics Using Traffic Line</a>
+</dt>
+<dt>Traffic Server, <a href="PlusingRegisAndVersionCkg.html">Plugin Registration and Version Checking</a>
+</dt>
+<dt>transaction, <a href="AccessingTransactionProc.html">Accessing the Transaction Being Processed</a>
+</dt>
+<dd><dl><dt>getting a handle to, <a href="AccessingTransactionProc.html">Accessing the Transaction Being Processed</a>
+</dt></dl></dd>
+<dt>transaction hook, <a href="SettingUpTransacHook.html">Setting Up a Transaction Hook</a>
+</dt>
+<dt>transformation, <a href="HTTPTransformationPlugins.html#WritingContentTransformPlugins">Writing Content Transform Plugins</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>V</h3>
+<dl>
+<dt>vconnection, <a href="HTTPTransformationPlugins.html#WritingContentTransformPlugins">Writing Content Transform Plugins</a>
+</dt>
+<dt>version checking, <a href="PlusingRegisAndVersionCkg.html">Plugin Registration and Version Checking</a>
+</dt>
+<dt>VIO, <a href="HTTPTransformationPlugins.html#WritingContentTransformPlugins">Writing Content Transform Plugins</a>
+</dt>
+</dl>
+</div>
+<div class="indexdiv">
+<h3>W</h3>
+<dl><dt>write VIO, <a href="HTTPTransformationPlugins.html#WritingContentTransformPlugins">Writing Content Transform Plugins</a>
+</dt></dl>
+</div>
+</div>
+</div>
+</body>
+</html>

Propchange: incubator/trafficserver/site/trunk/docs/sdk/ConceptIndex.html
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message