You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bu...@apache.org on 2010/12/15 03:46:17 UTC
svn commit: r780712 - in
/websites/staging/trafficserver/trunk/content/docs/trunk: ./
sdk/getting-started/
sdk/header-based-plugin-examples/basic-authorization-plugin/
sdk/header-based-plugin-examples/blacklist-plugin/
sdk/how-to-create-trafficserver-p...
Author: buildbot
Date: Wed Dec 15 02:46:17 2010
New Revision: 780712
Log:
Staging update by buildbot
Modified:
websites/staging/trafficserver/trunk/content/docs/trunk/STATUS
websites/staging/trafficserver/trunk/content/docs/trunk/sdk/getting-started/index.en.html
websites/staging/trafficserver/trunk/content/docs/trunk/sdk/header-based-plugin-examples/basic-authorization-plugin/setting-a-transaction-hook.en.html
websites/staging/trafficserver/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.html
websites/staging/trafficserver/trunk/content/docs/trunk/sdk/how-to-create-trafficserver-plugins/index.en.html
websites/staging/trafficserver/trunk/content/docs/trunk/sdk/how-to-create-trafficserver-plugins/roadmap-for-creating-plugins.en.html
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/STATUS
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/STATUS (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/STATUS Wed Dec 15 02:46:17 2010
@@ -55,7 +55,7 @@ how-to-create-trafficserver-plugins --
remap-plugin -- igalic
header-based-plugin-examples -- igalic
http-transformation-plugin -- igalic
-new-protocol-plugins
+new-protocol-plugins -- igalic
cache-plugin
http-hoooks-and-transactions
misc-interface-guide
@@ -71,3 +71,10 @@ remap-plugin -- igalic
sample-source-code
troubleshooting-tips
+
+Findings
+=================
+
+- you can create id=Anchors for virtually every element using: {#AnchorName} YAY!
+
+- Make sure to put pictures in their own pragraph.
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/getting-started/index.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/getting-started/index.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/getting-started/index.en.html Wed Dec 15 02:46:17 2010
@@ -72,7 +72,7 @@ for that event type.</p>
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>
-<h4 id="PluginProcess">Plugin Process</h4>
+<p id="PluginProcess"><strong>Plugin Process</strong></p>
<p><img alt="Plugin Process" src="/images/sdk/plugin_process.jpg" /></p>
<h3 id="possible_uses_for_plugins">Possible Uses for Plugins</h3>
<p>Possible uses for plugins include the following:</p>
@@ -118,7 +118,7 @@ port and then uses Traffic Server's prox
</ul>
<p>The figure below, <a href="#possibleTSplugins">Possible Traffic Server Plugins</a>,
illustrates several types of plugins.</p>
-<h4 id="possibleTSplugins">Possible Traffic Server Plugins</h4>
+<p id="possibleTSplugins"><strong>Possible Traffic Server Plugins</strong></p>
<p><img alt="Possible Traffic Server Plugins" src="/images/sdk/Uses.jpg" /></p>
<p>You can find basic examples for many plugins in the SDK sample code:</p>
<ul>
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/header-based-plugin-examples/basic-authorization-plugin/setting-a-transaction-hook.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/header-based-plugin-examples/basic-authorization-plugin/setting-a-transaction-hook.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/header-based-plugin-examples/basic-authorization-plugin/setting-a-transaction-hook.en.html Wed Dec 15 02:46:17 2010
@@ -22,7 +22,7 @@
<div id="content">
<p><a href="working-with-http-headers">Prev</a> - Working With HTTP Headers</p>
-<p>Chapter 5. HTTP Transformation Plugins - <a href="../../http-transformation-plugin">Next</a></p>
+<p>HTTP Transformation Plugins - <a href="../../http-transformation-plugin">Next</a></p>
<h3 id="SettingaTransactionHook">Setting a Transaction Hook</h3>
<p>If the request does not have the <code>Proxy-Authorization</code> field set to Basic
authorization or a valid username/password, then the plugin sends the
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.html Wed Dec 15 02:46:17 2010
@@ -28,7 +28,10 @@
two arguments of <code>TSHttpHookAdd</code> are the hook ID and the continuation to call
when processing the event corresponding to the hook. In <code>blacklist-1.c</code>, the
global hook is added as follows:</p>
-<p><code>TSHttpHookAdd (TS_HTTP_OS_DNS_HOOK, contp);</code></p>
+<div class="codehilite"><pre><span class="n">TSHttpHookAdd</span> <span class="p">(</span><span class="n">TS_HTTP_OS_DNS_HOOK</span><span class="p">,</span> <span class="n">contp</span><span class="p">);</span>
+</pre></div>
+
+
<p>Above, <code>TS_HTTP_OS_DNS_HOOK</code> is the ID for the origin server DNS lookup hook
and <code>contp</code> is the parent continuation created earlier.</p>
<p>This means that the Blacklist plugin is called at every origin server DNS lookup.
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/how-to-create-trafficserver-plugins/index.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/how-to-create-trafficserver-plugins/index.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/how-to-create-trafficserver-plugins/index.en.html Wed Dec 15 02:46:17 2010
@@ -28,15 +28,8 @@
<ul>
<li><a href="#HowtoCreateTSPlugins">How to Create Traffic Server Plugins</a><ul>
<li><a href="#TheAsynchronousEventModel">The Asynchronous Event Model</a><ul>
-<li><a href="#TSInternals">Traffic Server Internals</a><ul>
-<li><a href="#TSwithPlugins">Traffic Server with Plugins</a></li>
-</ul>
-</li>
<li><a href="#TSHTTPStateMachine">Traffic Server HTTP State Machine</a><ul>
<li><a href="#HTTPTransaction">HTTP Transaction</a></li>
-<li><a href="#SimplifiedHTTPTransaction">Simplified HTTP Transaction</a></li>
-<li><a href="#APIHooksCorrespondingtoStates">API Hooks Corresponding to States</a></li>
-<li><a href="#BlacklistPlugin">Blacklist Plugin</a></li>
<li><a href="#TypesofHooks">Types of Hooks</a></li>
</ul>
</li>
@@ -99,12 +92,12 @@ I/O tasks. Processors talk to the event
An executing thread calls back a continuation by sending it an event. When
a continuation receives an event, it wakes up, does some work, and either destroys
itself or goes back to sleep & waits for the next event.</p>
-<h4 id="TSInternals">Traffic Server Internals</h4>
+<p id="TSInternals"><strong>Traffic Server Internals</strong></p>
<p><img alt="Traffic Server Internals" src="/images/sdk/event_sys80.jpg" /></p>
<p>Plugins are typically implemented as continuations. All of the sample code
plugins (except <code>hello-world</code>) are continuations that are created when Traffic
Server starts up; they then wait for events that trigger them into activity.</p>
-<h4 id="TSwithPlugins">Traffic Server with Plugins</h4>
+<p id="TSwithPlugins"><strong>Traffic Server with Plugins</strong></p>
<p><img alt="Traffic Server with Plugins" src="/images/sdk/evt_plugin120.jpg" /></p>
<p>A plugin may consist of just one static continuation that is called whenever
certain events happen. Examples of such plugins include <code>blacklist-1.c</code>, <code>basic-auth.c</code>,
@@ -145,7 +138,7 @@ it could be an error message. The conten
cache or Traffic Server might fetch it from the origin server. The following
diagram shows some states in a typical transaction - specifically, the scenario
wherein content is served from cache.</p>
-<h4 id="SimplifiedHTTPTransaction">Simplified HTTP Transaction</h4>
+<p id="SimplifiedHTTPTransaction"><strong>Simplified HTTP Transaction</strong></p>
<p><img alt="Simplified HTTP Transaction" src="/images/sdk/transact75.jpg" /></p>
<p>In the diagram above, Traffic Server accepts the client connection, reads the
request headers, looks up the origin server's IP address, and looks for the
@@ -162,7 +155,7 @@ a any stage, then the HTTP state machine
and sends a reply. If the reply is an error, then the transaction closes. If
the reply is not an error, then Traffic Server first sends the response content
before it closes the transaction.</p>
-<h4 id="APIHooksCorrespondingtoStates">API Hooks Corresponding to States</h4>
+<p id="APIHooksCorrespondingtoStates"><strong>API Hooks Corresponding to States</strong></p>
<p><img alt="API Hooks Corresponding to States Listed in" src="/images/sdk/transact_hook75.jpg" /></p>
<p>You use hooks as triggers to start your plugin. The name of a hook reflects
the Traffic Server state that was <em>just completed</em>. For example, the "OS DNS
@@ -171,7 +164,7 @@ For a plugin that requires the IP addres
hook is the right one to use. The Blacklist plugin works in this manner, as
shown in the <a href="#BlacklistPlugin">Blacklist Plugin</a>
diagram below.</p>
-<h4 id="BlacklistPlugin">Blacklist Plugin</h4>
+<p id="BlacklistPlugin"><strong>Blacklist Plugin</strong></p>
<p><img alt="Blacklist Plugin" src="/images/sdk/blacklist75.jpg" /></p>
<p>Traffic Server calls the Blacklist plugin right after the origin server DNS
lookup. The plugin checks the requested host against a list of blacklisted
Modified: websites/staging/trafficserver/trunk/content/docs/trunk/sdk/how-to-create-trafficserver-plugins/roadmap-for-creating-plugins.en.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/trunk/sdk/how-to-create-trafficserver-plugins/roadmap-for-creating-plugins.en.html (original)
+++ websites/staging/trafficserver/trunk/content/docs/trunk/sdk/how-to-create-trafficserver-plugins/roadmap-for-creating-plugins.en.html Wed Dec 15 02:46:17 2010
@@ -29,29 +29,29 @@ API hooks, and the asynchronous event mo
capabilities of Traffic Server API functions. These are quite broad:</p>
<ul>
<li>
-<p><strong>HTTP header manipulation functions</strong>
-Obtain information about and manipulate HTTP headers, URLs, & MIME headers.</p>
+<p><strong>HTTP header manipulation functions</strong></p>
+<p>Obtain information about and manipulate HTTP headers, URLs, & MIME headers.</p>
</li>
<li>
-<p><strong>HTTP transaction functions</strong>
-Get information about and modify HTTP transactions (for example: get the client
+<p><strong>HTTP transaction functions</strong></p>
+<p>Get information about and modify HTTP transactions (for example: get the client
IP associated to the transaction; get the server IP; get parent proxy information)</p>
</li>
<li>
-<p><strong>IO functions</strong>
-Manipulate vconnections (virtual connections, used for network and disk I/O)</p>
+<p><strong>IO functions</strong></p>
+<p>Manipulate vconnections (virtual connections, used for network and disk I/O)</p>
</li>
<li>
-<p><strong>Network connection functions</strong>
-Open connections to remote servers.</p>
+<p><strong>Network connection functions</strong></p>
+<p>Open connections to remote servers.</p>
</li>
<li>
-<p><strong>Statistics functions</strong>
-Define and compute statistics for your plugin's activity.</p>
+<p><strong>Statistics functions</strong></p>
+<p>Define and compute statistics for your plugin's activity.</p>
</li>
<li>
-<p><strong>Traffic Server management functions</strong>
-Obtain values for Traffic Server configuration and statistics variables.</p>
+<p><strong>Traffic Server management functions</strong></p>
+<p>Obtain values for Traffic Server configuration and statistics variables.</p>
</li>
</ul>
<p>Below are some guidelines for creating a plugin:</p>