trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrew...@apache.org
Subject svn commit: r831152 [14/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
Added: incubator/trafficserver/site/trunk/docs/sdk/GenerateLicenseKey.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/GenerateLicenseKey.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/GenerateLicenseKey.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/GenerateLicenseKey.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,94 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Generating a License Key</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="PluginManagement.html" title="Chapter 16. Plugin Management">
+<link rel="prev" href="SetUpLicensing.html" title="Setting Up Licensing">
+<link rel="next" href="LoggingAPI.html" title="Guide to the Logging API">
+<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="SetUpLicensing.html">Prev</a> — Setting Up Licensing</div>
+<div class="navnext">Guide to the Logging API — <a accesskey="n" href="LoggingAPI.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="GenerateLicenseKey"></a>Generating a License Key</h2></div></div></div>
+<p>The <code class="code">gen_key</code> tool generates a license key based on
+      your plugin name (which must match the plugin name entered in the
+      <code class="filename">plugin.db</code> file), an expiration date, and a customer
+      ID (so that you can give different license keys to different customers).
+      You can specify an expiration date of 0 which means that the plugin
+      never expires.</p>
+<h3>
+<a name="id390849"></a>Running the gen_key tool</h3>
+<div class="orderedlist"><ol type="1">
+<li><p>On Unix, <code class="code">cd</code> to the <code class="filename">sdk/tools</code>
+          directory in your SDK package. On NT, open a DOS command window and
+          <code class="code">cd</code> to the <code class="filename">sdk/tools</code>
+          directory.</p></li>
+<li>
+<p>Enter the following:</p>
+<p><code class="code">gen_key plugin_name ID expiration</code></p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><code class="filename">* plugin_name</code> is the name of the
+              plugin and it needs to match the name specified in
+              <code class="filename">plugin.db</code></p></li>
+<li><p><code class="code">ID</code> is a string of 5 alphanumeric characters,
+              used to identify different customers</p></li>
+<li>
+<p><code class="code">expiration</code> is the expiration date of the
+              plugin in the following format:</p>
+<p><code class="code">mmddyyyy</code></p>
+<p>For example, <code class="code">03312001</code> for March 31, 2001. Use
+              <code class="code">0</code> for no expiration.</p>
+</li>
+</ul></div>
+</li>
+</ol></div>
+</div>
+</body>
+</html>

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

Added: incubator/trafficserver/site/trunk/docs/sdk/GetingStarted.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/GetingStarted.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/GetingStarted.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/GetingStarted.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,304 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Chapter 1. Getting Started</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="Conventions.html" title="Typographical Conventions">
+<link rel="next" href="ASimplePlugin.html" title="A Simple 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">
+<link rel="section" href="GetingStarted.html#UnderstandingTSPlugins" title="Understanding Traffic Server Plugins">
+<link rel="section" href="ASimplePlugin.html" title="A Simple Plugin">
+<link rel="section" href="PlusingRegisAndVersionCkg.html" title="Plugin Registration and Version Checking">
+<link rel="section" href="NamingConventions.html" title="Naming Conventions">
+<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="Conventions.html">Prev</a> — Typographical Conventions</div>
+<div class="navnext">A Simple Plugin — <a accesskey="n" href="ASimplePlugin.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="GetingStarted"></a>Chapter 1. Getting Started</h2></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"><a href="GetingStarted.html#UnderstandingTSPlugins">Understanding Traffic Server Plugins</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="GetingStarted.html#RoleOfPlugins">The Role of Plugins</a></span></dt>
+<dt><span class="section"><a href="GetingStarted.html#PossibleUses">Possible Uses for Plugins</a></span></dt>
+<dt><span class="section"><a href="GetingStarted.html#PluginLoading">Plugin Loading</a></span></dt>
+<dt><span class="section"><a href="GetingStarted.html#PluginConfiguration">Plugin Configuration</a></span></dt>
+<dt><span class="section"><a href="GetingStarted.html#ConfigFileRules">Configuration File Rules</a></span></dt>
+<dt><span class="section"><a href="GetingStarted.html#PluginInitialization">Plugin Initialization</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="ASimplePlugin.html">A Simple Plugin</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="ASimplePlugin.html#CompilingYourPlugin">Compile Your Plugin</a></span></dt>
+<dd><dl>
+<dt><span class="section"><a href="ASimplePlugin.html#Compiling_Unix">Unix Example</a></span></dt>
+<dt><span class="section"><a href="ASimplePlugin.html#Compiling_HPUX">HPUX Example</a></span></dt>
+<dt><span class="section"><a href="ASimplePlugin.html#Compiling_Windows">Compiling for Windows NT</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="Updatingplugin.configFile.html">Update the <code class="filename">plugin.config</code> File</a></span></dt>
+<dt><span class="section"><a href="SpecifyingPluginLocation.html">Specify the Plugin’s Location</a></span></dt>
+<dt><span class="section"><a href="RestartingTS.html">Restart Traffic Server</a></span></dt>
+</dl></dd>
+<dt><span class="section"><a href="PlusingRegisAndVersionCkg.html">Plugin Registration and Version Checking</a></span></dt>
+<dt><span class="section"><a href="NamingConventions.html">Naming Conventions</a></span></dt>
+</dl>
+</div>
+<p>The Traffic Server API enables you to create plugins, using the C
+    programming language, that customize the behavior of your Traffic Server
+    installation. This chapter contains the following sections:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="GetingStarted.html#UnderstandingTSPlugins" title="Understanding Traffic Server Plugins">“Understanding Traffic Server Plugins”</a>— a brief introduction
+        to plugins. For more details, see <a href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">Chapter 2, <i>How to Create Traffic Server Plugins</i></a></p></li>
+<li><p><a href="ASimplePlugin.html" title="A Simple Plugin">“A Simple Plugin”</a>— walks through compiling and
+        loading an example "hello world" plugin.</p></li>
+<li><p><a href="PlusingRegisAndVersionCkg.html" title="Plugin Registration and Version Checking">“Plugin Registration and Version Checking”</a>—shows you how to
+        register your plugin and check that it's compatible with the version
+        of Traffic Server you're using.</p></li>
+<li><p><a href="NamingConventions.html" title="Naming Conventions">“Naming Conventions”</a>—outlines Traffic Server API
+        naming conventions. For guidelines on creating plugin source code, see
+        <a href="CreatingTSPlugins.html" title="Chapter 2. How to Create Traffic Server Plugins">Chapter 2, <i>How to Create Traffic Server Plugins</i></a>.</p></li>
+</ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="UnderstandingTSPlugins"></a>Understanding Traffic Server Plugins</h2></div></div></div>
+<p>Traffic Server enables sophisticated caching and processing of
+      web-related traffic, such as DNS and HTTP requests and responses.</p>
+<p>Traffic Server itself consists of an event-driven loop that can be
+      simplified as follows:</p>
+<pre class="programlisting">for (;;) {
+event = get_next_event();
+handle_event (event);
+}</pre>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="RoleOfPlugins"></a>The Role of Plugins</h3></div></div></div>
+<p>You compile your plugin source code to create a shared library
+        that Traffic Server loads when it is started. Your plugin contains
+        callback functions that are registered for specific Traffic Server
+        events. When Traffic Server needs to process an event, it invokes any
+        and all call-back functions you have registered for that event
+        type.</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>Since plugins add object code to Traffic Server, programming
+          errors in a plugin can have serious implications. Bugs in your
+          plugin, such as an out-of-range pointer, can cause Traffic Server
+          processes to crash and may ultimately result in unpredictable
+          behavior.</p></td></tr>
+</table></div>
+<div class="figure">
+<a name="Fig_PluginProcess"></a><p class="title"><b>Figure 1.1. Plugin Process</b></p>
+<div class="mediaobject"><img src="images/plugin_process.jpg" alt="Plugin Process"></div>
+</div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="PossibleUses"></a>Possible Uses for Plugins</h3></div></div></div>
+<p>Possible uses for plugins include the following:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>HTTP processing (plugins can filter, blacklist, authorize
+            users, transform content)</p></li>
+<li><p>Protocol support (plugins can enable Traffic Server to
+            proxy-cache new protocol content)</p></li>
+</ul></div>
+<p>Some examples of plugins include:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Blacklisting plugin: denies attempts to access web sites
+            that are off-limits.</p></li>
+<li><p>Append transform plugin: adds text to HTTP response
+            content.</p></li>
+<li><p>Image conversion plugin: transforms JPEG images to GIF
+            images.</p></li>
+<li><p>Compression plugin: sends response content to a compression
+            server that compresses the data (alternatively, a compression
+            library local to the Traffic Server host machine could do the
+            compression).</p></li>
+<li><p>Authorization plugin: checks user’s permissions to access
+            particular web sites. The plugin could consult a local
+            authorization program or send queries to an authorization
+            server.</p></li>
+<li><p>A plugin that gathers client information from request
+            headers and enters this information in a database.</p></li>
+<li><p>Protocol plugin: listens for specific protocol requests on a
+            designated port, and then uses Traffic Server’s proxy server &amp;
+            cache to serve client requests.</p></li>
+</ul></div>
+<p><a href="GetingStarted.html#Fig_PossibleTSPlugins" title="Figure 1.2. Possible Traffic Server Plugins">Figure 1.2, “Possible Traffic Server Plugins”</a> illustrates several
+        types of plugins:</p>
+<div class="figure">
+<a name="Fig_PossibleTSPlugins"></a><p class="title"><b>Figure 1.2. Possible Traffic Server Plugins</b></p>
+<div class="mediaobject"><img src="images/Uses.jpg" alt="Possible Traffic Server Plugins"></div>
+</div>
+<p>You can find basic examples of several plugins in the sample
+        code provided with the SDK:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><code class="filename">append-transform.c</code> adds text from a
+            specified file to HTTP/text responses. This plugin is explained in
+            detail in <a href="AppendTransformPlugin.html" title="The Append-Transform Plugin">“The Append-Transform Plugin”</a>.</p></li>
+<li><p>The compression plugin in the figure communicates with a
+            server that actually does the compression. The
+            <code class="filename">server-transform.c</code> plugin shows how to open a
+            connection to a transformation server, have the server do the
+            transformation, and send transformed data back to the client. In
+            <code class="filename">server-transform.c</code>, the transformation is
+            null, but a compression or image translation plugin could be
+            implemented in a similar way.</p></li>
+<li><p><code class="filename">basic-auth.c</code> performs basic HTTP proxy
+            authorization.</p></li>
+<li><p><code class="filename">blacklist-1.c</code> reads blacklisted servers
+            from a configuration file and denies client access to these
+            servers. The plugin has a configuration interface where the
+            Traffic Server administrator can modify the list of blacklisted
+            servers through the Traffic Manager GUI. This plugin is explained
+            in detail in <a href="BlacklistPlugin.html" title="The Blacklist Plugin">“The Blacklist Plugin”</a> .</p></li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="PluginLoading"></a>Plugin Loading</h3></div></div></div>
+<p>When Traffic Server is first started, it consults the
+        <code class="filename">plugin.config</code> file to determine the names of all
+        the shared plugin libraries that need to be loaded. The
+        <code class="filename">plugin.config</code> file also defines arguments that
+        are to be passed to each plugin’s initialization function,
+        <code class="function">INKPluginInit</code>. The
+        <code class="filename">records.config</code> file defines the path to each
+        plugin shared library, described in <a href="SpecifyingPluginLocation.html" title="Specify the Plugin’s Location">“Specify the Plugin’s Location”</a>.</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>The path for each of these files is
+          <code class="filename"><code class="varname">&lt;root_dir&gt;</code>/config/</code>,
+          where <code class="varname">&lt;root_dir&gt;</code> is where you installed
+          Traffic Server.</p></td></tr>
+</table></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="PluginConfiguration"></a>Plugin Configuration<a class="indexterm" name="id306433"></a></h3></div></div></div>
+<p>The sample <code class="filename">plugin.config</code> file below
+        contains a comment line, a blank line, and two plugin
+        configurations:</p>
+<pre class="programlisting"># This is a comment line.
+
+my-plugin.so www.junk.com www.trash.com www.garbage.com
+some-plugin.so arg1 arg2 $proxy.config.http.cache.on</pre>
+<p>Each plugin configuration in the
+        <code class="filename">plugin.config</code> file resembles a UNIX or DOS shell
+        command; each line in <code class="filename">plugin.config</code> cannot exceed
+        1023 characters.</p>
+<p>The first plugin configuration is for a plugin named
+        <code class="filename">my-plugin.so</code>; it contains three arguments that
+        are to be passed to that plugin’s initialization routine. The second
+        configuration is for a plugin named
+        <code class="filename">some-plugin.so</code> which contains three arguments.
+        The last argument, <em class="parameter"><code>$proxy.config.http.cache.on</code></em>,
+        is actually a configuration variable. Traffic Server will look up the
+        specified configuration variable and substitute its value.</p>
+<p>On the Windows version of Traffic Server, the plugin shared
+        library file is a <code class="filename">.dll</code> file. An example line in
+        <code class="filename">plugin.config</code> would be the following:</p>
+<pre class="programlisting">nt_plugin.dll</pre>
+<p><a name="MultipleEntries_SamePlugin"></a>Plugins with global
+        variables should not appear more than once in
+        <code class="filename">plugin.config</code>. For example, if you enter:</p>
+<pre class="programlisting">add-header.so header1
+add-header.so header2</pre>
+<p>then the second global variable, header2, would be used for both
+        instances. A simple workaround is to give different names to different
+        instances of the same plugin. For example:</p>
+<pre class="programlisting">cp add-header.so add-header1.so
+cp add-header.so add-header2.so</pre>
+<p>The following entries would have the desired result
+        below:</p>
+<pre class="programlisting">add-header1.so header1
+add-header2.so header2</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="ConfigFileRules"></a>Configuration File Rules</h3></div></div></div>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Comment lines begin with <span class="bold"><strong>#</strong></span>
+            and continue to the end of the line.</p></li>
+<li><p>Blank lines are ignored.</p></li>
+<li><p>Plugins are loaded and initialized by Traffic Server in the
+            order they appear in the <code class="filename">plugin.config</code>
+            file.</p></li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="PluginInitialization"></a>Plugin Initialization</h3></div></div></div>
+<p>Each plugin must define an initialization function named
+        <code class="function">INKPluginInit</code> that Traffic Server invokes at the
+        time the plugin is loaded. The <code class="function">INKPluginInit</code>
+        function is commonly used to read configuration information and
+        register hooks for event notification.</p>
+<p>The <code class="function">INKPluginInit</code> function has two
+        arguments:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>The <code class="code">argc</code> argument represents the number of
+            arguments defined in the <code class="filename">plugin.config</code> file
+            for that particular plugin</p></li>
+<li><p>The <code class="code">argv</code> argument is an array of pointers to
+            the actual arguments defined in the
+            <code class="filename">plugin.config</code> file for that plugin</p></li>
+</ul></div>
+<p>See <a href="InitializationFunctions.html#INKPluginInit" title="INKPluginInit">“INKPluginInit”</a> for details about
+        <code class="function">INKPluginInit</code>.</p>
+</div>
+</div>
+</div>
+</body>
+</html>

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

Added: incubator/trafficserver/site/trunk/docs/sdk/GuideTSHTTPHdrSyst.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/GuideTSHTTPHdrSyst.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/GuideTSHTTPHdrSyst.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/GuideTSHTTPHdrSyst.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,122 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Guide to Traffic Server HTTP Header System</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="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="prev" href="HTTPHeaders.html" title="Chapter 10. HTTP Headers">
+<link rel="next" href="DuplicateMIMEFlds.html" title="Duplicate MIME Fields Are Not Coalesced">
+<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="GuideTSHTTPHdrSyst.html#NoNullTerminatedStrings" title="No Null-Terminated Strings">
+<link rel="subsection" href="DuplicateMIMEFlds.html" title="Duplicate MIME Fields Are Not Coalesced">
+<link rel="subsection" href="MIMEFldsBelongAssocMIMEHdr.html" title="MIME Fields Always Belong to an Associated MIME
+        Header">
+<link rel="subsection" href="RlsMarshalBufHandles.html" title="Release Marshal Buffer Handles">
+<link rel="subsection" href="DeprecatedMarshBufFuncs.html" title="Deprecated 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="HTTPHeaders.html">Prev</a> — Chapter 10. HTTP Headers</div>
+<div class="navnext">Duplicate MIME Fields Are Not Coalesced — <a accesskey="n" href="DuplicateMIMEFlds.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="GuideTSHTTPHdrSyst"></a>Guide to Traffic Server HTTP Header System</h2></div></div></div>
+<p>Please read this section.</p>
+<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="images/docbook/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>Previous versions of Traffic Server are named Traffic Server.
+        Throughout this manual, Traffic Server, Traffic Server 3.0, Traffic
+        Server 3.5, and Traffic Server 5.2 refer to previous versions of
+        Traffic Server. For version checking, Traffic Server 1.5 is equivalent
+        to Traffic Server 5.5.</p>
+<p>Older (pre-4.0) versions of Traffic Server’s header processing
+        system analysed and disassembled HTTP headers for convenience, at
+        considerable performance cost. New performance enhancements do not
+        assume this breakdown and reassembly. The consequences are the
+        following.</p>
+</td></tr>
+</table></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="NoNullTerminatedStrings"></a>No Null-Terminated Strings<a class="indexterm" name="id380931"></a></h3></div></div></div>
+<p>In Traffic Server 5.2 and newer, you cannot assume that the
+        string data contained in marshal buffers (data such as URLs and MIME
+        fields) is stored in null-terminated string copies. This means that
+        your plugins should always use the length parameter when retrieving or
+        manipulating these strings. You <span class="bold"><strong>cannot</strong></span> pass in <code class="code">NULL</code> for
+        string-length return values. String values returned from marshall
+        buffers are not null-terminated. If you need a null-terminated value,
+        use <code class="function">INKstrndup</code> to automatically null-terminate a
+        string. The strings that come back, which are not null-terminated,
+        <span class="bold"><strong>cannot</strong></span> be passed into the common
+        <code class="code">str*()</code> routines.</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top">
+<p>Values returned from a marshall buffer can be
+          <code class="code">NULL</code>, which means the field or object requested does
+          not exist.</p>
+<p>For example (from the <code class="code">blacklist-1</code> sample):</p>
+<pre class="programlisting">char *host_string;
+int host_length;
+host_string = INKUrlHostGet (bufp, url_loc, &amp;host_length);
+for (i = 0; i &lt; nsites; i++) {
+if (strncmp (host_string, sites[i], host_length) == 0) {
+...
+}</pre>
+<p>See the sample plugins for more examples.</p>
+</td></tr>
+</table></div>
+</div>
+</div>
+</body>
+</html>

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

Added: incubator/trafficserver/site/trunk/docs/sdk/HTTPAlternateSelection.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/HTTPAlternateSelection.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/HTTPAlternateSelection.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/HTTPAlternateSelection.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,237 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>HTTP Alternate Selection</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="HTTPHooksAndTransactions.html" title="Chapter 8. HTTP Hooks and Transactions">
+<link rel="prev" href="InitiateHTTPConnection.html" title="Initiate HTTP Connection">
+<link rel="next" href="MiscellaneousInterfaceGuide.html" title="Chapter 9. Miscellaneous Interface Guide">
+<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="InitiateHTTPConnection.html">Prev</a> — Initiate HTTP Connection</div>
+<div class="navnext">Chapter 9. Miscellaneous Interface Guide — <a accesskey="n" href="MiscellaneousInterfaceGuide.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="HTTPAlternateSelection"></a>HTTP Alternate Selection</h2></div></div></div>
+<p>The HTTP alternate selection functions provide a mechanism for
+      hooking into Traffic Server’s alternate selection mechanism and
+      augmenting it with additional information. HTTP alternate selection
+      refers to the process of choosing between several alternate versions of
+      a document for a given URL. Alternates arise because the HTTP 1.1
+      specification allows different documents to be sent back for the same
+      URL depending on the clients request. For example, a server might send
+      back a GIF image to a client who only accepts GIF images and might send
+      back a JPEG image to a client who only accepts JPEG images.</p>
+<p>The alternate selection mechanism is invoked when Traffic Server
+      looks up a URL in its cache. For each URL Traffic Server stores a vector
+      of alternates. For each alternate in this vector, Traffic Server
+      computes a quality value between 0 and 1 for how “good” the alternate
+      is. A quality value of 0 means that the alternate is unacceptable. A
+      quality value of 1 means that the alternate is a perfect match.</p>
+<p>If a plugin hooks onto <code class="code">theINK_HTTP_SELECT_ALT_HOOK</code> it
+      will be called back when Traffic Server performs alternate selection.
+      You cannot register locally to the hook
+      <code class="code">INK_HTTP_SELECT_ALT_HOOK</code> by using INKHttpTxnHookAdd, but by
+      using only INKHttpHookAdd. It is only valid to hook onto the global list
+      of <code class="code">INK_HTTP_SELECT_ALT_HOOK</code>’s since Traffic Server does not
+      actually have an HTTP transaction or an HTTP session on hand when
+      alternate selection is performed. Traffic Server calls each of the
+      select alternate hooks with the event</p>
+<p><code class="code">INK_EVENT_HTTP_SELECT_ALT</code>. The void *edata argument
+      that is passed to the continuation is a pointer to an
+      <code class="code">INKHttpAltInfo</code><a class="indexterm" name="id379481"></a> structure. It can be used later to call the HTTP
+      alternate selection functions listed at the end of this section. Unlike
+      other hooks, this alternate selection callout is non-blocking and the
+      expectation is that the quality value for the alternate will be changed
+      by a call to <code class="function">INKHttpAltInfoQualitySet</code>.</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>HTTP SM does not have to be reenabled using
+        <code class="function">INKHttpTxnReenable</code> or any other APIs. Just return
+        from the function.</p></td></tr>
+</table></div>
+<p>Below is a sample of code that illustrates how to call the
+      Alternate APIs.</p>
+<pre class="programlisting">static void handle_select_alt(INKHttpAltInfo infop)
+{
+   INKMBuffer client_req_buf, cache_resp_buf;
+   INKMLoc client_req_hdr, cache_resp_hdr;
+
+   INKMLoc accept_transform_field;
+   INKMLoc content_transform_field;
+
+   int accept_transform_len = -1, content_transform_len = -1;
+   const char* accept_transform_value = NULL;
+   const char* content_transform_value = NULL;
+   int content_plugin, accept_plugin;
+
+   float quality;
+
+   /* get client request, cached request and cached response */
+   INKHttpAltInfoClientReqGet (infop, &amp;client_req_buf, &amp;client_req_hdr);
+   INKHttpAltInfoCachedRespGet(infop, &amp;cache_resp_buf, &amp;cache_resp_hdr);
+
+   /* get the Accept-Transform field value from the client request */
+   accept_transform_field = INKMimeHdrFieldFind(client_req_buf,
+client_req_hdr, "Accept-Transform", -1);
+   if (accept_transform_field) {
+      INKMimeHdrFieldValueStringGet(client_req_buf, client_req_hdr,
+   accept_transform_field, 0, &amp;accept_transform_value,
+   &amp;accept_transform_len);
+      INKDebug(DBG_TAG, "Accept-Transform = |%s|",
+   accept_transform_value);
+      }
+
+   /* get the Content-Transform field value from cached server response
+*/
+   content_transform_field = INKMimeHdrFieldFind(cache_resp_buf,
+cache_resp_hdr, "Content-Transform", -1);
+   if (content_transform_field) {
+      INKMimeHdrFieldValueStringGet(cache_resp_buf, cache_resp_hdr,
+   content_transform_field,
+      0, &amp;content_transform_value,
+   &amp;content_transform_len);
+      INKDebug(DBG_TAG, "Content-Transform = |%s|",
+   content_transform_value);
+      }
+
+      /* compute quality */
+      accept_plugin = (accept_transform_value &amp;&amp; (accept_transform_len &gt; 0) &amp;&amp;
+                        (strncmp(accept_transform_value, "plugin",
+accept_transform_len) == 0));
+
+   content_plugin = (content_transform_value &amp;&amp; (content_transform_len &gt;0) &amp;&amp;
+                       (strncmp(content_transform_value, "plugin",
+content_transform_len) == 0));
+
+   if (accept_plugin) {
+      quality = content_plugin ? 1.0 : 0.0;
+   } else {
+      quality = content_plugin ? 0.0 : 0.5;
+   }
+
+   INKDebug(DBG_TAG, "Setting quality to %3.1f", quality);
+
+   /* set quality for this alternate */
+   INKHttpAltInfoQualitySet(infop, quality)/
+
+   /* cleanup */
+   if (accept_transform_value)
+      INKHandleStringRelease(client_req_buf, accept_transform_field,
+   accept_transform_value);
+      if (accept_transform_field)
+         INKHandleMLocRelease(client_req_buf, client_req_hdr,
+   accept_transform_field);
+      INKHandleMLocRelease(client_req_buf, INK_NULL_MLOC, client_req_hdr);
+
+      if (content_transform_value)
+         INKHandleStringRelease(cache_resp_buf, content_transform_field,
+   content_transform_value);
+      if (content_transform_field)
+         INKHandleMLocRelease(cache_resp_buf, cache_resp_hdr,
+   content_transform_field);
+      INKHandleMLocRelease(cache_resp_buf, INK_NULL_MLOC, cache_resp_hdr);
+   }
+
+
+   static int alt_plugin(INKCont contp, INKEvent event, void *edata)
+   {
+      INKHttpAltInfo infop;
+
+      switch (event) {
+      case INK_EVENT_HTTP_SELECT_ALT:
+         infop = (INKHttpAltInfo)edata;
+         handle_select_alt(infop);
+         break;
+
+      default:
+         break;
+      }
+
+      return 0;
+   }
+
+   void INKPluginInit (int argc, const char *argv[])
+   {
+         INKHttpHookAdd(INK_HTTP_SELECT_ALT_HOOK, INKContCreate (alt_plugin,
+   NULL));
+}</pre>
+<p>Traffic Server augments the alternate selection through these
+      callouts using the following algorithm.</p>
+<div class="orderedlist"><ol type="1">
+<li><p>Traffic Server computes its own quality value for the
+          alternate. Traffic Server takes into account the quality of the
+          accept match, the encoding match and the language match.</p></li>
+<li><p>Traffic Server then calls out each of the continuations on the
+          global <code class="code">INK_HTTP_SELECT_ALT_HOOK</code>’s list.</p></li>
+<li><p>It multiplies its quality value with the value returned by
+          each callout. Since all of the values are clamped to be between 0
+          and 1, the final value will be between 0 and 1.</p></li>
+<li><p>This algorithm also ensures that a single callout can block
+          the usage of a given alternate by specifying a quality value of
+          0.</p></li>
+</ol></div>
+<p>A common usage for the alternate selection mechanism is when a
+      plugin transforms a document for some clients and not for others and
+      wants to store both the transformed and un-transformed document. The
+      client’s request would specify whether it accepted the transformed
+      document and the plugin could then determine if the alternate matched
+      this specification and set the quality level for the alternate
+      appropriately.</p>
+<p>The HTTP alternate selection functions are:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="AlternateSelectionFunctions.html#INKHttpAltInfoCachedReqGet" title="INKHttpAltInfoCachedReqGet">“INKHttpAltInfoCachedReqGet”</a></p></li>
+<li><p><a href="AlternateSelectionFunctions.html#INKHttpAltInfoCachedRespGet" title="INKHttpAltInfoCachedRespGet">“INKHttpAltInfoCachedRespGet”</a></p></li>
+<li><p><a href="AlternateSelectionFunctions.html#INKHttpAltInfoClientReqGet" title="INKHttpAltInfoClientReqGet">“INKHttpAltInfoClientReqGet”</a></p></li>
+<li><p><a href="AlternateSelectionFunctions.html#INKHttpAltInfoQualitySet" title="INKHttpAltInfoQualitySet">“INKHttpAltInfoQualitySet”</a></p></li>
+</ul></div>
+</div>
+</body>
+</html>

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

Added: incubator/trafficserver/site/trunk/docs/sdk/HTTPFunctions.html
URL: http://svn.apache.org/viewvc/incubator/trafficserver/site/trunk/docs/sdk/HTTPFunctions.html?rev=831152&view=auto
==============================================================================
--- incubator/trafficserver/site/trunk/docs/sdk/HTTPFunctions.html (added)
+++ incubator/trafficserver/site/trunk/docs/sdk/HTTPFunctions.html Thu Oct 29 23:23:25 2009
@@ -0,0 +1,96 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>HTTP 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="INKThreadSelf.html" title="INKThreadSelf">
+<link rel="next" href="HTTPSessionFunctions.html" title="Session 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="subsection" href="HTTPFunctions.html#HTTPHookFunctions" title="Hook Functions">
+<link rel="subsection" href="HTTPSessionFunctions.html" title="Session Functions">
+<link rel="subsection" href="HTTPTransactionFunctions.html" title="HTTP Transaction 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="INKThreadSelf.html">Prev</a> — INKThreadSelf</div>
+<div class="navnext">Session Functions — <a accesskey="n" href="HTTPSessionFunctions.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="HTTPFunctions"></a>HTTP Functions</h2></div></div></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="HTTPHookFunctions"></a>Hook Functions</h3></div></div></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="INKHttpHookAdd"></a>INKHttpHookAdd</h4></div></div></div>
+<p>Adds an HTTP hook.</p>
+<div class="variablelist"><dl>
+<dt><span class="term">Prototype</span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpHookAdd (INKHttpHookId
+                <em class="replaceable"><code>id</code></em>, INKCont
+                <em class="replaceable"><code>contp</code></em>)</code></p></dd>
+<dt><span class="term">Description</span></dt>
+<dd><p>Adds <code class="code"><em class="replaceable"><code>contp</code></em></code> to
+                the end of the list of global HTTP hooks specified by
+                <code class="code"><em class="replaceable"><code>id</code></em></code>. Since
+                <code class="function">INKHttpHookAdd</code> is adding
+                <code class="code"><em class="replaceable"><code>contp</code></em></code> to a global list
+                this function is only safe to call from the plugin
+                initialization routine.</p></dd>
+<dt><span class="term">Returns</span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the hook is successfully
+                added.</p>
+<p><code class="code">INK_ERROR</code> if the hook is not added.</p>
+</dd>
+<dt><span class="term">First release</span></dt>
+<dd><p>Traffic Server 3.0</p></dd>
+</dl></div>
+</div>
+</div>
+</div>
+</body>
+</html>

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



Mime
View raw message