trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [05/51] trafficserver git commit: Documentation reorganization
Date Tue, 03 Nov 2015 06:09:41 GMT
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/adding-statistics.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/adding-statistics.en.rst b/doc/sdk/adding-statistics.en.rst
deleted file mode 100644
index a49c26c..0000000
--- a/doc/sdk/adding-statistics.en.rst
+++ /dev/null
@@ -1,70 +0,0 @@
-Adding Statistics
-*****************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-   
-   http://www.apache.org/licenses/LICENSE-2.0
-   
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-This chapter describes how to add statistics to your plugins. Statistics
-can be coupled or uncoupled; **coupled** statistics are quantities that
-are related and must therefore be updated together. The Traffic Server
-API statistics functions add your plugin's statistics to the Traffic
-Server statistics system. You can view your plugin statistics as you
-would any other Traffic Server statistic, using Traffic Line (Traffic
-Server's command line interface). This chapter contains the following
-topics:
-
-.. toctree::
-   :maxdepth: 2
-
-   adding-statistics/coupled-statistics.en
-   adding-statistics/viewing-statistics-using-traffic-line.en
-
-
-Uncoupled Statistics
---------------------
-
-A statistic is an object of type ``TSStat``. The value of the statistic
-is of type ``TSStatType``. The possible ``TSStatTypes`` are:
-
--  ``TSSTAT_TYPE_INT64``
-
--  ``TSSTAT_TYPE_FLOAT``
-
-There is *no* ``TSSTAT_TYPE_INT32``.
-
-To add uncoupled statistics, follow the steps below:
-
-1. Declare your statistic as a global variable in your plugin. For
-   example:
-
-   .. code-block:: c
-
-      static TSStat my_statistic;
-
-2. In ``TSPluginInit``, create new statistics using ``TSStatCreate``.
-   When you create a new statistic, you need to give it an "external"
-   name that the Traffic Server command line interface (Traffic Line)
-   uses to access the statistic. For example:
-
-   .. code-block:: c
-
-      my_statistic = TSStatCreate ("my.statistic", TSSTAT_TYPE_INT64);
-
-3. Modify (increment, decrement, or other modification) your statistic
-   in plugin functions.
-
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/adding-statistics/coupled-statistics.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/adding-statistics/coupled-statistics.en.rst b/doc/sdk/adding-statistics/coupled-statistics.en.rst
deleted file mode 100644
index 774f509..0000000
--- a/doc/sdk/adding-statistics/coupled-statistics.en.rst
+++ /dev/null
@@ -1,117 +0,0 @@
-Coupled Statistics
-******************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-Use coupled statistics for quantities that are related and therefore
-must be updated jointly.
-
-As a very simple example, suppose you have three statistics: ``sum``,
-``part_1``, and ``part_2``. They must always preserve the relationship
-that ``sum = part_1  + part_2``. If you update ``part_1`` without
-updating ``sum`` at the same time, then the equation becomes untrue.
-Therefore, the statistics are said to be *coupled*.
-
-The mechanism for updating coupled statistics jointly is to create local
-copies of global coupled statistics in the routines that modifiy them.
-When each local copy is updated appropriately, do a global update using
-``TSStatsCoupledUpdate``. To specify which statistics are related to one
-another, establish a coupled statistic category and make sure that each
-coupled statistic belongs to the appropriate category. When it is time
-to do the global update, specify the category to be updated.
-
-.. note::
-
-   The local statistic copy must have a duplicate set of statistics as that
-   of the master copy. Local statistics must also be added to the local
-   statistic category in the same order as their master copy counterparts
-   were originally added.
-
-Below are the steps you need to follow, along with a code example taken
-from the ``redirect-1.c`` sample plugin.
-
-To add coupled statistics:
-~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-1. Declare the global category for your coupled statistics as a global
-   ``TSCoupledStat`` variable in your plugin.
-
-2. Declare your coupled statistics as global ``TSStat`` variables in
-   your plugin.
-
-3. In ``TSPluginInit``, create a new global coupled category using
-   ``TSStatCoupledGlobalCategoryCreate``.
-
-4. In ``TSPluginInit``, create new global coupled statistics using
-   ``TSStatCoupledGlobalAdd``. When you create a new statistic, you need
-   to give it an "external" name that the Traffic Server command line
-   interface (Traffic Line) uses to access the statistic.
-
-5. In any routine wherein you want to modify (increment, decrement, or
-   other modification) your coupled statistics, declare local copies of
-   the coupled category and coupled statistics.
-
-6. Create local copies using ``TSStatCoupledLocalCopyCreate`` and
-   ``TSStatCoupledLocalAdd``.
-
-7. Modify the local copies of your statistics. Then call
-   ``TSStatsCoupledUpdate`` to update the global copies jointly.
-
-8. When you are finished, you must destroy all of the local copies in
-   the category via ``TSStatCoupledLocalCopyDestroy``.
-
-Example Using the redirect-1.c Sample Plugin
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. code-block:: c
-
-    static TSCoupledStat request_outcomes;
-
-    static TSStat requests_all;
-    static TSStat requests_redirects;
-    static TSStat requests_unchanged;
-
-    request_outcomes = TSStatCoupledGlobalCategoryCreate ("request_outcomes"); 
-
-    requests_all = TSStatCoupledGlobalAdd (request_outcomes, "requests.all", TSSTAT_TYPE_FLOAT);
-    requests_redirects = TSStatCoupledGlobalAdd (request_outcomes, "requests.redirects",
-        TSSTAT_TYPE_INT64);
-    requests_unchanged = TSStatCoupledGlobalAdd (request_outcomes, "requests.unchanged", 
-        TSSTAT_TYPE_INT64);
-
-    TSCoupledStat local_request_outcomes;
-    TSStat local_requests_all;
-    TSStat local_requests_redirects;
-    TSStat local_requests_unchanged;
-
-    local_request_outcomes = TSStatCoupledLocalCopyCreate("local_request_outcomes", 
-        request_outcomes); 
-    local_requests_all = TSStatCoupledLocalAdd(local_request_outcomes, "requests.all.local", 
-        TSSTAT_TYPE_FLOAT);
-    local_requests_redirects = TSStatCoupledLocalAdd(local_request_outcomes, 
-        "requests.redirects.local", TSSTAT_TYPE_INT64);
-    local_requests_unchanged = TSStatCoupledLocalAdd(local_request_outcomes, 
-        "requests.unchanged.local", TSSTAT_TYPE_INT64);
-
-    TSStatFloatAddTo( local_requests_all, 1.0 ) ; 
-    ...
-    TSStatIncrement (local_requests_unchanged); 
-    TSStatsCoupledUpdate(local_request_outcomes); 
-
-    TSStatCoupledLocalCopyDestroy(local_request_outcomes); 
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst b/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst
deleted file mode 100644
index 76327f1..0000000
--- a/doc/sdk/adding-statistics/viewing-statistics-using-traffic-line.en.rst
+++ /dev/null
@@ -1,35 +0,0 @@
-Viewing Statistics Using Traffic Line
-*************************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-.. XXX: This documentation seems to be duplicated from the admin docs.
-
-To view statistics for your plugin, follow the steps below:
-
-1. Make sure you know the name of your statistic (i.e., the name used in
-   the ``TSStatCoupledGlobalAdd``, ``TSStatCreate``, or
-   ``TSStatCoupledGlobalCategoryCreate`` call).
-
-2. In your ``<Traffic Server>/bin`` directory, enter the following:
-
-   ::
-
-       ./traffic\_line -r the\_name
-
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/continuations.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/continuations.en.rst b/doc/sdk/continuations.en.rst
deleted file mode 100644
index 286cedc..0000000
--- a/doc/sdk/continuations.en.rst
+++ /dev/null
@@ -1,131 +0,0 @@
-Continuations
-*************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-.. toctree::
-   :maxdepth: 2
-
-   continuations/how-to-activate-continuations.en
-   continuations/writing-handler-functions.en
-
-The continuation interface is Traffic Server's basic callback mechanism.
-**Continuations** are instances of the opaque data type ``TSCont``. In
-its basic form, a continuation represents a handler function and a
-mutex.
-
-This chapter covers the following topics:
-
--  `Mutexes and Data`_
-
--  :doc:`continuations/how-to-activate-continuations.en`
-
--  :doc:`continuations/writing-handler-functions.en`
-
-Mutexes and Data
-----------------
-
-A continuation must be created with a mutex if your continuation does
-one of the following:
-
--  is registered globally (``TSHttpHookAdd`` or ``TSHttpSsnHookAdd``) to
-   an HTTP hook and uses ``TSContDataSet/Get``
-
--  is registered locally (``TSHttpTxnHookAdd``), but for multiple
-   transactions uses ``TSContDataSet/Get``
-
--  uses ``TSCacheXXX``, ``TSNetXXX``, ``TSHostLookup``, or
-   ``TSContSchedule`` APIs
-
-Before being activated, a caller must grab the continuation's mutex.
-This requirement makes it possible for a continuation's handler function
-to safely access its data and to prevent multiple callers from running
-it at the same time (see the :ref:`about-the-sample-protocol` for usage). The
-data protected by the mutex is any global or continuation data
-associated to the continuation by ``TSContDataSet``. This does not
-include the local data created by the continuation handler function. A
-typical example of continuations created with associated data structures
-and mutexes is the transaction state machine created in the sample
-Protocol plugin (see :ref:`one-way-to-implement-a-transaction-state-machine`).
-
-A reentrant call occurs when the continuation passed as an argument to
-the API can be called in the same stack trace as the function calling
-the API. For example, if you call ``TSCacheRead`` (``contp, mykey``), it
-is possible that ``contp``'s handler will be called directly and then
-``TSCacheRead`` returns.
-
-Caveats that could cause issues include the following:
-
--  a continuation has data associated with it (``TSContDataGet``).
-
--  the reentrant call passes itself as a continuation to the reentrant
-   API. In this case, the continuation should not try to access its data
-   after calling the reentrant API. The reason for this is that data may be
-   modified by the section of code in the continuation's handler that
-   handles the event sent by the API. It is recommended that you always
-   return after a reentrant call to avoid accessing something that has been
-   deallocated.
-
-Below is an example, followed by an explanation.
-
-.. code-block:: c
-
-    continuation_handler (TSCont contp, TSEvent event, void *edata) {
-        switch (event) {
-            case event1:
-                TSReentrantCall (contp);
-                /* Return right away after this call */
-                break;
-            case event2:
-                TSContDestroy (contp);
-                break;
-        }
-    }
-
-The above example first assumes that the continuation is called back
-with ``event1``; it then does the first reentrant call that schedules
-the continuation to receive ``event2``. Because the call is reentrant,
-the processor calls back the continuation right away with ``event2`` and
-the continuation is destroyed. If you try to access the continuation or
-one of its members after the reentrant call, then you might access
-something that has been deallocated. To avoid accessing something that
-has been deallocated, never access the continuation or any of its
-members after a reentrant call - just exit the handler.
-
-**Note:** Most HTTP transaction plugin continuations do not need
-non-null mutexes because they're called within the processing of an HTTP
-transaction, and therefore have the transaction's mutex.
-
-It is also possible to specify a continuation's mutex as ``NULL``. This
-should be done only when registering a continuation to a global hook, by
-a call to ``TSHttpHookAdd``. In this case, the continuation can be
-called simultaneously by different instances of HTTP SM running on
-different threads. Having a mutex here would slow and/or hinder Traffic
-Server performance, since all the threads will try to lock the same
-mutex. The drawback of not having a mutex is that such a continuation
-cannot have data associated with it (i.e., ``TSContDataGet/Set`` cannot
-be used).
-
-When using a ``NULL`` mutex it is dangerous to access the continuation's
-data, but usually continuations with ``NULL`` mutexes have no data
-associated with them anyway. An example of such a continuation is one
-that gets called back every time an HTTP request is read, and then
-determines from the request alone if the request should go through or be
-rejected. An HTTP transaction gives its continuation data to the
-``contp``.
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/continuations/how-to-activate-continuations.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/continuations/how-to-activate-continuations.en.rst b/doc/sdk/continuations/how-to-activate-continuations.en.rst
deleted file mode 100644
index 1dd23c2..0000000
--- a/doc/sdk/continuations/how-to-activate-continuations.en.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-How to Activate Continuations
-*****************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-Continuations are activated when they receive an event or by
-``TSContSchedule`` (which schedules a continuation to receive an event).
-Continuations might receive an event because:
-
--  Your plugin calls ``TSContCall``
-
--  The Traffic Server HTTP state machine sends an event corresponding to
-   a particular HTTP hook
-
--  A Traffic Server IO processor (such as a cache processor or net
-   processor) is letting a continuation know there is data (cache or
-   network) available to read or write. These callbacks are a result of
-   using functions such ``TSVConnRead``/``Write`` or
-   ``TSCacheRead``/``Write``
-
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/continuations/writing-handler-functions.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/continuations/writing-handler-functions.en.rst b/doc/sdk/continuations/writing-handler-functions.en.rst
deleted file mode 100644
index c698857..0000000
--- a/doc/sdk/continuations/writing-handler-functions.en.rst
+++ /dev/null
@@ -1,125 +0,0 @@
-Writing Handler Functions
-*************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-.. default-domain:: c
-
-The handler function is the key component of a continuation. It is
-supposed to examine the event and event data, and then do something
-appropriate. The probable action might be to schedule another event for
-the continuation to received, to open up a connection to a server, or
-simply to destroy itself.
-
-The continuation's handler function is a function of type
-:type:`TSEventFunc`. Its arguments are a continuation, an event, and a
-pointer to some data (this data is passed to the continuation by the
-caller - do not confuse this data with the continuation's own data,
-associated by :func:`TSContDataSet`). When the continuation is called back,
-the continuation and an event are passed to the handler function. The
-continuation is a handle to the same continuation that is invoked. The
-handler function typically has a switch statement to handle the events
-it receives:
-
-.. code-block:: c
-
-   static int some_handler (TScont contp, TSEvent event, void *edata)
-   {
-      // .....
-      switch(event) {
-         case TS_EVENT_SOME_EVENT_1:
-            do_some_thing_1;
-            return;
-         case TS_EVENT_SOME_EVENT_2:
-            do_some_thing_2;
-            return;
-         case TS_EVENT_SOME_EVENT_3:
-            do_some_thing_3;
-            return;
-         default: break;
-      }
-      return 0;
-   }
-
-.. caution::
-
-   You might notice that a continuation cannot determine if more events are
-   "in flight" toward it. Do not use :func:`TSContDestroy` to delete a
-   continuation before you make sure that all incoming events, such as
-   those sent because of :func:`TSHttpTxnHookAdd`, have been handled.
-
-The following table lists events and the corresponding type of
-`void* data` passed to handler functions:
-
-============================================ =========================================== ==========================
-Event                                        Event Sender                                Data Type
-============================================ =========================================== ==========================
-:data:`TS_EVENT_HTTP_READ_REQUEST_HDR`       :data:`TS_HTTP_READ_REQUEST_HDR_HOOK`       :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_OS_DNS`                 :data:`TS_HTTP_OS_DNS_HOOK`                 :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_SEND_REQUEST_HDR`       :data:`TS_HTTP_SEND_REQUEST_HDR_HOOK`       :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_READ_CACHE_HDR`         :data:`TS_HTTP_READ_CACHE_HDR_HOOK`         :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_READ_RESPONSE_HDR`      :data:`TS_HTTP_READ_RESPONSE_HDR_HOOK`      :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_SEND_RESPONSE_HDR`      :data:`TS_HTTP_SEND_RESPONSE_HDR_HOOK`      :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_SELECT_ALT`             :data:`TS_HTTP_SELECT_ALT_HOOK`             :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_TXN_START`              :data:`TS_HTTP_TXN_START_HOOK`              :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_TXN_CLOSE`              :data:`TS_HTTP_TXN_CLOSE_HOOK`              :type:`TSHttpTxn`
-:data:`TS_EVENT_HTTP_SSN_START`              :data:`TS_HTTP_SSN_START_HOOK`              :type:`TSHttpSsn`
-:data:`TS_EVENT_HTTP_SSN_CLOSE`              :data:`TS_HTTP_SSN_CLOSE_HOOK`              :type:`TSHttpSsn`
-:data:`TS_EVENT_NONE`
-:data:`TS_EVENT_CACHE_LOOKUP_COMPLETE`       :data:`TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK`  :type:`TSHttpTxn`
-:data:`TS_EVENT_IMMEDIATE`                   :func:`TSVConnClose`
-                                             :func:`TSVIOReenable`
-                                             :func:`TSContSchedule`
-:data:`TS_EVENT_IMMEDIATE`                   :data:`TS_HTTP_REQUEST_TRANSFORM_HOOK`
-:data:`TS_EVENT_IMMEDIATE`                   :data:`TS_HTTP_RESPONSE_TRANSFORM_HOOK`
-:data:`TS_EVENT_CACHE_OPEN_READ`             :func:`TSCacheRead`                         Cache VC
-:data:`TS_EVENT_CACHE_OPEN_READ_FAILED`      :func:`TSCacheRead`                         TS_CACHE_ERROR code
-:data:`TS_EVENT_CACHE_OPEN_WRITE`            :func:`TSCacheWrite`                        Cache VC
-:data:`TS_EVENT_CACHE_OPEN_WRITE_FAILED`     :func:`TSCacheWrite`                        TS_CACHE_ERROR code
-:data:`TS_EVENT_CACHE_REMOVE`                :func:`TSCacheRemove`
-:data:`TS_EVENT_CACHE_REMOVE_FAILED`         :func:`TSCacheRemove`                       TS_CACHE_ERROR code
-:data:`TS_EVENT_NET_ACCEPT`                  :func:`TSNetAccept`                         :type:`TSNetVConnection`
-                                             :func:`TSHttpTxnServerIntercept`
-                                             :func:`TSHttpTxnIntercept`
-:data:`TS_EVENT_NET_ACCEPT_FAILED`           :func:`TSNetAccept`
-                                             :func:`TSHttpTxnServerIntercept`
-                                             :func:`TSHttpTxnIntercept`
-:data:`TS_EVENT_HOST_LOOKUP`                 :func:`TSHostLookup`                        :type:`TSHostLookupResult`
-:data:`TS_EVENT_TIMEOUT`                     :func:`TSContSchedule`
-:data:`TS_EVENT_ERROR`
-:data:`TS_EVENT_VCONN_READ_READY`            :func:`TSVConnRead`                         :type:`TSVIO`
-:data:`TS_EVENT_VCONN_WRITE_READY`           :func:`TSVConnWrite`                        :type:`TSVIO`
-:data:`TS_EVENT_VCONN_READ_COMPLETE`         :func:`TSVConnRead`                         :type:`TSVIO`
-:data:`TS_EVENT_VCONN_WRITE_COMPLETE`        :func:`TSVConnWrite`                        :type:`TSVIO`
-:data:`TS_EVENT_VCONN_EOS`                   :func:`TSVConnRead`                         :type:`TSVIO`
-:data:`TS_EVENT_NET_CONNECT`                 :func:`TSNetConnect`                        :type:`TSVConn`
-:data:`TS_EVENT_NET_CONNECT_FAILED`          :func:`TSNetConnect`                        :type:`TSVConn`
-:data:`TS_EVENT_HTTP_CONTINUE`
-:data:`TS_EVENT_HTTP_ERROR`
-:data:`TS_EVENT_MGMT_UPDATE`                 :func:`TSMgmtUpdateRegister`
-============================================ =========================================== ==========================
-
-The continuation functions are listed below:
-
--  :func:`TSContCall`
--  :func:`TSContCreate`
--  :func:`TSContDataGet`
--  :func:`TSContDataSet`
--  :func:`TSContDestroy`
--  :func:`TSContMutexGet`
--  :func:`TSContSchedule`

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/getting-started.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/getting-started.en.rst b/doc/sdk/getting-started.en.rst
deleted file mode 100644
index 38c14bb..0000000
--- a/doc/sdk/getting-started.en.rst
+++ /dev/null
@@ -1,244 +0,0 @@
-.. _sdk-getting-started:
-
-Getting Started
-***************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-   
-    http://www.apache.org/licenses/LICENSE-2.0
-   
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-.. toctree::
-   :maxdepth: 2
-
-   getting-started/a-simple-plugin.en
-   getting-started/plugin-registration-and-version-checking.en
-   getting-started/naming-conventions.en
-
-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:
-
--  `Understanding Traffic Server Plugins`_ -- a brief introduction to plugins.
-   For more details, see :doc:`how-to-create-trafficserver-plugins.en`
-
--  :doc:`getting-started/a-simple-plugin.en` -- walks through compiling and
-   loading an example ``hello world`` plugin.
-
--  :doc:`getting-started/plugin-registration-and-version-checking.en` -- shows
-   you how to register your plugin and make sure it's compatible with the
-   version of Traffic Server you're using.
-
--  :doc:`getting-started/naming-conventions.en` -- outlines Traffic
-   Server API naming conventions. For guidelines on creating plugin
-   source code, see :doc:`how-to-create-trafficserver-plugins.en`
-
-Understanding Traffic Server Plugins
-------------------------------------
-
-Traffic Server enables sophisticated caching and processing of
-web-related traffic, such as DNS and HTTP requests and responses.
-
-Traffic Server itself consists of an event-driven loop that can be
-simplified as follows:
-
-.. code-block:: c
-
-   for (;;) {
-      event = get_next_event();
-      handle_event (event);
-   }
-
-The Role of Plugins
-~~~~~~~~~~~~~~~~~~~
-
-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've registered for that event type.
-
-.. caution::
-
-   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.
-
-**Plugin Process**
-
-.. _PluginProcess:
-
-.. figure:: /static/images/sdk/plugin_process.jpg
-   :align: center
-   :alt: Plugin Process
-
-   Plugin Process
-   
-Possible Uses for Plugins
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Possible uses for plugins include the following:
-
--  HTTP processing: plugins can filter, blacklist, authorize users,
-   transform content
-
--  Protocol support: plugins can enable Traffic Server to proxy-cache
-   new protocol content
-
-Some examples of plugins include:
-
--  **Blacklisting plugin**: denies attempts to access web sites that are
-   off-limits.
-
--  **Append transform plugin**: adds text to HTTP response content.
-
--  **Image conversion plugin**: transforms JPEG images to GIF images.
-
--  **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).
-
--  **Authorization plugin**: checks a user's permissions to access
-   particular web sites. The plugin could consult a local authorization
-   program or send queries to an authorization server.
-
--  **A plugin that gathers client information** from request headers and
-   enters this information in a database.
-
--  **Protocol plugin**: listens for specific protocol requests on a
-   designated port and then uses Traffic Server's proxy server & cache
-   to serve client requests.
-
-The figure below, :ref:`possibleTSplugins`, illustrates several types of plugins.
-
-**Possible Traffic Server Plugins**
-
-.. _possibleTSplugins:
-
-.. figure:: /static/images/sdk/Uses.jpg
-   :align: center
-   :alt: Possible Traffic Server Plugins
-
-   Possible Traffic Server Plugins
-   
-You can find basic examples for many plugins in the SDK sample code:
-
--  ``append-transform.c`` adds text from a specified file to HTTP/text
-   responses. This plugin is explained in
-   :doc:`http-transformation-plugin/append-transform-plugin.en`
-
--  The compression plugin in the figure communicates with the server
-   that actually does the compression. The ``server-transform.c`` 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. Although the transformation is null in
-   ``server-transform.c``, a compression or image translation plugin
-   could be implemented in a similar way.
-
--  ``basic-auth.c`` performs basic HTTP proxy authorization.
-
--  ``blacklist-1.c`` reads blacklisted servers from a configuration file
-   and denies client access to these servers. This plugin is explained
-   in :doc:`header-based-plugin-examples/blacklist-plugin.en`.
-
-Plugin Loading
-~~~~~~~~~~~~~~
-
-When Traffic Server is first started, it consults the ``plugin.config``
-file to determine the names of all shared plugin libraries that need to
-be loaded. The ``plugin.config`` file also defines arguments that are to
-be passed to each plugin's initialization function, ``TSPluginInit``.
-The :file:`records.config` file defines the path to each plugin shared
-library, as described in :ref:`specify-the-plugins-location`.
-
-.. note:: The path for each of these files is *<root_dir>*\ ``/config/``, where *<root_dir>* is where you installed Traffic Server.
-
-Plugin Configuration
-~~~~~~~~~~~~~~~~~~~~
-
-The sample ``plugin.config`` file below contains a comment line, a blank
-line, and two plugin configurations:
-
-::
-
-    # This is a comment line.
-
-    my-plugin.so junk.example.com trash.example.org garbage.example.edu
-    some-plugin.so arg1 arg2 $proxy.config.http.cache.on
-
-Each plugin configuration in the ``plugin.config`` file resembles a UNIX
-or DOS shell command; each line in ``plugin.config`` cannot exceed 1023
-characters.
-
-The first plugin configuration is for a plugin named ``my-plugin.so``.
-It contains three arguments that are to be passed to that plugin's
-initialization routine. The second configuration is for a plugin named
-``some-plugin.so``; it contains three arguments. The last argument,
-*``$proxy.config.http.cache.on``*, is actually a configuration variable.
-Traffic Server will look up the specified configuration variable and
-substitute its value.
-
-Plugins with global variables should not appear more than once in
-``plugin.config``. For example, if you enter:
-
-::
-
-    add-header.so header1
-    add-header.so header2
-
-then the second global variable, ``header2``, will be used for both
-instances. A simple workaround is to give different names to different
-instances of the same plugin. For example:
-
-::
-
-    cp add-header.so add-header1.so
-    cp add-header.so add-header2.so
-
-These entries will produce the desired result below:
-
-::
-
-    add-header1.so header1
-    add-header2.so header2
-
-Configuration File Rules
-~~~~~~~~~~~~~~~~~~~~~~~~
-
--  Comment lines begin with **#** and continue to the end of the line.
-
--  Blank lines are ignored.
-
--  Plugins are loaded and initialized by Traffic Server in the order
-   they appear in the ``plugin.config`` file.
-
-Plugin Initialization
-~~~~~~~~~~~~~~~~~~~~~
-
-Each plugin must define an initialization function named
-``TSPluginInit`` that Traffic Server invokes when the plugin is loaded.
-The ``TSPluginInit`` function is commonly used to read configuration
-information and register hooks for event notification.
-
-The ``TSPluginInit`` function has two arguments:
-
--  The ``argc`` argument represents the number of arguments defined in
-   the ``plugin.config`` file for that particular plugin
-
--  The ``argv`` argument is an array of pointers to the actual arguments
-   defined in the ``plugin.config`` file for that plugin
-
-See :c:func:`TSPluginInit` for details about ``TSPluginInit``.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/getting-started/a-simple-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/getting-started/a-simple-plugin.en.rst b/doc/sdk/getting-started/a-simple-plugin.en.rst
deleted file mode 100644
index 8685348..0000000
--- a/doc/sdk/getting-started/a-simple-plugin.en.rst
+++ /dev/null
@@ -1,122 +0,0 @@
-A Simple Plugin
-***************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-This section describes how to write, compile, configure, and run a
-simple Traffic Server plugin. You'll follow the steps below:
-
-1. Make sure that your plugin source code contains an ``TSPluginInit``
-   initialization function.
-
-2. Compile your plugin source code, creating a shared library.
-
-3. Add an entry to your plugin's ``plugin.config`` file.
-
-4. Add the path to your plugin shared library into the
-   :file:`records.config` file.
-
-5. Restart Traffic Server.
-
-Compile Your Plugin
-~~~~~~~~~~~~~~~~~~~
-
-The process for compiling a shared library varies with the platform
-used, so the Traffic Server API provides the tsxs tool which you can use
-to create shared libraries on all the supported Traffic Server
-platforms.
-
-Example
-^^^^^^^
-
-Assuming the sample program is stored in the file ``hello-world.c``, you
-could use the following commands to build a shared library
-
-::
-
-    tsxs -o hello-world.so -c hello-world.c
-
-tsxs can be found in ``trafficserver-dev`` package.
-
-This shared library will be your plugin. In order to install it, run
-
-::
-
-    sudo tsxs -o hello-world.so -i
-
-or the equivalent to ``sudo`` on your platform.
-
-Update the ``plugin.config`` File
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Your next step is to tell Traffic Server about the plugin by adding the
-following line to the ``plugin.config`` file. Since our simple plugin
-does not require any arguments, the following ``plugin.config`` will
-work:
-
-::
-
-    # a simple plugin.config for hello-world
-    hello-world.so
-
-Traffic Server can accommodate multiple plugins. If several plugin
-functions are triggered by the same event, then Traffic Server invokes
-each plugin's function in the order each was defined in the
-``plugin.config`` file.
-
-.. _specify-the-plugins-location:
-
-Specify the Plugin's Location
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-All plugins must be located in the directory specified by the
-configuration variable ``proxy.config.plugin.plugin_dir``, which is
-located in the :file:`records.config` file. The directory can be specified
-as an absolute or relative path.
-
-If a relative path is used, then the starting directory will be the
-Traffic Server installation directory as specified in
-``/etc/traffic_server``. The default value is ``libexec/trafficserver``,
-but this can vary based on how the software was configured and built. It
-is common to use the default directory. Be sure to place the shared
-library ``hello-world.so`` inside the directory you've configured.
-
-Restart Traffic Server
-~~~~~~~~~~~~~~~~~~~~~~
-
-The last step is to start/restart Traffic Server. Shown below is the
-output displayed after you've created and loaded your ``hello-world``
-plugin.
-
-::
-
-    # ls libexec/trafficserver
-    hello-world.so*
-    # bin/traffic_server
-    [Mar 27 19:06:31.669] NOTE: updated diags config
-    [Mar 27 19:06:31.680] NOTE: loading plugin 'libexec/trafficserver/hello-world.so'
-    hello world
-    [Mar 27 19:06:32.046] NOTE: cache disabled (initializing)
-    [Mar 27 19:06:32.053] NOTE: cache enabled
-    [Mar 27 19:06:32.526] NOTE: Traffic Server running
-
-**Note:** in the example above, Traffic Server notes are directed to the
-console by specifying ``E`` for ``proxy.config.diags.output.note`` in
-:file:`records.config`. The second note shows Traffic Server attempting to
-load the ``hello-world`` plugin. The third line of Traffic Server output
-is from your plugin.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/getting-started/naming-conventions.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/getting-started/naming-conventions.en.rst b/doc/sdk/getting-started/naming-conventions.en.rst
deleted file mode 100644
index 04a3aa6..0000000
--- a/doc/sdk/getting-started/naming-conventions.en.rst
+++ /dev/null
@@ -1,51 +0,0 @@
-Naming Conventions
-******************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-The Traffic Server API adheres to the following naming conventions:
-
--  The ``TS`` prefix is used for all function and variable names defined
-   in the Traffic Server API. **Examples**:
-   ``TS_EVENT_NONE``,\ ``TSMutex``, and ``TSContCreate``
-
--  Enumerated values are always written in all uppercase letters.
-   **Examples**: ``TS_EVENT_NONE`` and ``TS_VC_CLOSE_ABORT``
-
--  Constant values are all uppercase; enumerated values can be seen as a
-   subset of constants. **Examples**: ``TS_URL_SCHEME_FILE`` and
-   ``TS_MIME_FIELD_ACCEPT``
-
--  The names of defined types are mixed-case. **Examples**:
-   ``TSHttpSsn`` and ``TSHttpTxn``
-
--  Function names are mixed-case. **Examples**: ``TSUrlCreate`` and
-   ``TSContDestroy``
-
--  Function names use the following subject-verb naming style:
-   ``TS-<subject>-<verb>``, where ``<subject>`` goes from general to
-   specific. This makes it easier to determine what a function does by
-   reading its name. **For** **example**: the function to retrieve the
-   password field (the specific subject) from a URL (the general
-   subject) is ``TSUrlPasswordGet``.
-
--  Common verbs like ``Create``, ``Destroy``, ``Get``, ``Set``,
-   ``Copy``, ``Find``, ``Retrieve``, ``Insert``, ``Remove``, and
-   ``Delete`` are used only when appropriate.
-
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst b/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst
deleted file mode 100644
index 17f5c24..0000000
--- a/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst
+++ /dev/null
@@ -1,85 +0,0 @@
-Plugin Registration and Version Checking
-****************************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-Make sure that the functions in your plugin are supported in your
-version of Traffic Server.
-
-Use the following interfaces:
-
--  `TSPluginRegister <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a6d7f514e70abaf097c4a3f1ba01f6df8>`_
--  `TSTrafficServerVersionGet <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a3ef91e01612ffdce6dd040f836db08e8>`_
-
-The following version of ``hello-world`` registers the plugin and
-ensures it's running with a compatible version of Traffic Server.
-
-.. code-block:: c
-
-    #include <stdio.h>
-    #include <ts/ts.h>
-    int
-    check_ts_version()
-    {
-
-     const char *ts_version = TSTrafficServerVersionGet();
-     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", &major_ts_version,
-          &minor_ts_version, &patch_ts_version) != 3) {
-          return 0;
-      }
-
-      /* We need at least Traffic Server 2.0 */
-
-       if (major_ts_version >= 2) {
-          result = 1;
-       }
-       
-      }
-
-      return result;
-    }
-
-    void
-    TSPluginInit (int argc, const char *argv[])
-    {
-
-          TSPluginRegistrationInfo info;
-
-          info.plugin_name = "hello-world";
-          info.vendor_name = "MyCompany";
-          info.support_email = "ts-api-support@MyCompany.com";
-
-          if (!TSPluginRegister(&info)) {
-             TSError ("[plugin_name] Plugin registration failed.");
-          }
-
-          if (!check_ts_version()) {
-             TSError ("[plugin_name] Plugin requires Traffic Server 2.0 or later");
-             return;
-          }
-
-          TSDebug ("debug-hello", "Hello World!\n");
-    }
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples.en.rst b/doc/sdk/header-based-plugin-examples.en.rst
deleted file mode 100644
index 2b28300..0000000
--- a/doc/sdk/header-based-plugin-examples.en.rst
+++ /dev/null
@@ -1,70 +0,0 @@
-.. _header-based-plugin-examples:
-
-Header-Based Plugin Examples
-*****************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-.. toctree::
-   :maxdepth: 2
-
-   header-based-plugin-examples/blacklist-plugin.en
-   header-based-plugin-examples/basic-authorization-plugin.en
-
-Header-based plugins read or modify the headers of HTTP messages that
-Traffic Server sends and receives. Reading this chapter will help you to
-understand the following topics:
-
--  Creating continuations for your plugins
-
--  Adding global hooks
-
--  Adding transaction hooks
-
--  Working with HTTP header functions
-
-The two sample plugins discussed in this chapter are ``blacklist-1.c``
-and ``basic-auth.c``.
-
-Overview
---------
-
-Header-based plugins take actions based on the contents of HTTP request
-or response headers. Examples include filtering (on the basis of
-requested URL, source IP address, or other request header), user
-authentication, or user redirection. Header-based plugins have the
-following common elements:
-
--  The plugin has a static parent continuation that scans all Traffic
-   Server headers (either request headers, response headers, or both).
-
--  The plugin has a global hook. This enables the plugin to check all
-   transactions to determine if the plugin needs to do something.
-
--  The plugin gets a handle to the transaction being processed through
-   the global hook.
-
--  If the plugin needs to do something to transactions in specific
-   cases, then it sets up a transaction hook for a particular event.
-
--  The plugin obtains client header information and does something based
-   on that information.
-
-This chapter demonstrates how these components are implemented in SDK
-sample code.
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst b/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst
deleted file mode 100644
index 8caea52..0000000
--- a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin.en.rst
+++ /dev/null
@@ -1,44 +0,0 @@
-The Basic Authorization Plugin
-******************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-The sample basic authorization plugin, ``basic-auth.c``, checks for
-basic HTTP proxy authorization. In HTTP basic proxy authorization,
-client user names and passwords are contained in the
-``Proxy-Authorization`` 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, then it reenables with an error (effectively stopping the
-transaction) and adds a transaction hook to the send response header
-event.
-
-Creating the Plugin's Parent Continuation and Global Hook
-=========================================================
-
-The parent continuation and global hook are created as follows:
-
-``TSHttpHookAdd (TS_HTTP_OS_DNS_HOOK, TSContCreate (auth_plugin, NULL));``
-
-.. toctree::
-   :maxdepth: 2
-
-   basic-authorization-plugin/implementing-the-handler-and-getting-a-handle-to-the-transaction.en
-   basic-authorization-plugin/working-with-http-headers.en
-   basic-authorization-plugin/setting-a-transaction-hook.en
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/implementing-the-handler-and-getting-a-handle-to-the-transaction.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/implementing-the-handler-and-getting-a-handle-to-the-transaction.en.rst b/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/implementing-the-handler-and-getting-a-handle-to-the-transaction.en.rst
deleted file mode 100644
index 8b7b883..0000000
--- a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/implementing-the-handler-and-getting-a-handle-to-the-transaction.en.rst
+++ /dev/null
@@ -1,44 +0,0 @@
-Implementing the Handler and Getting a Handle to the Transaction
-****************************************************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-The handler function for the plugin's parent continuation is implemented
-as follows:
-
-.. code-block:: c
-
-    static int
-    auth_plugin (TSCont contp, TSEvent event, void *edata)
-    {
-
-         TSHttpTxn txnp = (TSHttpTxn) edata;
-         switch (event) {
-         case TS_EVENT_HTTP_OS_DNS:
-              handle_dns (txnp, contp);
-              return 0;
-         case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
-              handle_response (txnp);
-              return 0;
-         default:
-              break;
-         }
-
-         return 0;
-    }
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/setting-a-transaction-hook.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/setting-a-transaction-hook.en.rst b/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/setting-a-transaction-hook.en.rst
deleted file mode 100644
index 1c877ff..0000000
--- a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/setting-a-transaction-hook.en.rst
+++ /dev/null
@@ -1,55 +0,0 @@
-Setting a Transaction Hook
-**************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-If the request does not have the ``Proxy-Authorization`` field set to
-Basic authorization or a valid username/password, then the plugin sends
-the 407 Proxy authorization ``required`` status code back to the client.
-The client will then prompt the user for a username and password, and
-then resend the request.
-
-In the ``handle_dns`` routine, the following lines handle the
-authorization error case:
-
-.. code-block:: c
-
-    done:
-         TSHttpTxnHookAdd (txnp, TS_HTTP_SEND_RESPONSE_HDR_HOOK, contp);
-         TSHttpTxnReenable (txnp, TS_EVENT_HTTP_ERROR);
-
-If ``handle_dns`` does not find the ``Proxy-Authorization`` field set to
-Basic authorization or a valid username/password, then it adds a
-``SEND_RESPONSE_HDR_HOOK`` to the transaction being processed. This
-means that Traffic Server will call the plugin back when sending the
-client response. ``handle_dns`` reenables the transaction with
-``TS_EVENT_HTTP_ERROR``, which means that the plugin wants Traffic
-Server to terminate the transaction.
-
-When Traffic Server terminates the transaction, it sends the client an
-error message. Because of the ``SEND_RESPONSE_HDR_HOOK``, Traffic Server
-calls the plugin back. The ``auth-plugin`` routine calls
-``handle_response`` to send the client a ``407`` status code. When the
-client resends the request with the ``Proxy-Authorization`` field, a new
-transaction begins.
-
-``handle_dns`` calls ``base64_decode`` to decode the username and
-password; ``handle_dns`` also calls ``authorized`` to validate the
-username and password. In this plugin, sample NT code is provided for
-password validation. UNIX programmers can supply their own validation
-mechanism.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst b/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst
deleted file mode 100644
index 5198b4d..0000000
--- a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst
+++ /dev/null
@@ -1,96 +0,0 @@
-Working With HTTP Headers
-*************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
- 
-   http://www.apache.org/licenses/LICENSE-2.0
- 
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-The plugin checks all client request headers for the Proxy-Authorization
-MIME field, which should contain the user name and password. The
-plugin's continuation handler, ``auth-plugin``, calls ``handle_dns`` to
-check the ``Proxy-Authorization`` field. The ``handle_dns`` routine uses
-``TSHttpTxnClientReqGet`` and ``TSMimeHdrFieldFind`` to obtain the
-``Proxy-Authorization`` field:
-
-.. code-block:: c
-
-    {
-        TSMBuffer bufp;
-        TSMLoc hdr_loc;
-        TSMLoc field_loc;
-        const char *val;
-        char *user, *password;
-
-        if (!TSHttpTxnClientReqGet (txnp, &bufp, &hdr_loc)) {
-            TSError ("[basic_authorization] Couldn't retrieve client request header");
-            goto done;
-        }
-
-        field_loc = TSMimeHdrFieldFind (bufp, hdr_loc,
-                TS_MIME_FIELD_PROXY_AUTHORIZATION);
-
-If the ``Proxy-Authorization`` field is present, then the plugin checks
-that the authentication type is "Basic", and the user name and password
-are present and valid:
-
-.. code-block:: c
-
-    val = TSMimeHdrFieldValueStringGet (bufp, hdr_loc, field_loc, -1, &authval_length);
-    if (!val) {
-        TSError ("[basic_authorization] No value in Proxy-Authorization field");
-        TSHandleMLocRelease (bufp, hdr_loc, field_loc);
-        TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
-        goto done;
-    }
-
-    if (strncmp (val, "Basic", 5) != 0) {
-        TSError ("[basic_authorization] No Basic auth type in Proxy-Authorization");
-        TSHandleMLocRelease (bufp, hdr_loc, field_loc);
-        TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
-        goto done;
-    }
-
-    val += 5;
-    while ((*val == ' ') || (*val == '\t')) {
-        val += 1;
-    }
-
-    user = base64_decode (val);
-    password = strchr (user, ':');
-    if (!password) {
-        TSError ("[basic_authorization] No password in authorization information");
-        TSfree (user);
-        TSHandleMLocRelease (bufp, hdr_loc, field_loc);
-        TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
-        goto done;
-    }
-    *password = '\0';
-    password += 1;
-
-    if (!authorized (user, password)) {
-        TSError ("[basic_authorization] %s:%s not authorized", user, password);
-        TSfree (user);
-        TSHandleMLocRelease (bufp, hdr_loc, field_loc);
-        TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
-        goto done;
-    }
-
-    TSfree (user);
-    TSHandleMLocRelease (bufp, hdr_loc, field_loc);
-    TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
-    TSHttpTxnReenable (txnp, TS_EVENT_HTTP_CONTINUE);
-    return;
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst b/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst
deleted file mode 100644
index 85048e9..0000000
--- a/doc/sdk/header-based-plugin-examples/blacklist-plugin.en.rst
+++ /dev/null
@@ -1,106 +0,0 @@
-The Blacklist Plugin
-********************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-  
-    http://www.apache.org/licenses/LICENSE-2.0
-  
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-The sample blacklisting plugin included in the Traffic Server SDK is
-``blacklist-1.c``. 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 ``Access forbidden``
-message to the client.
-
-The flow of HTTP processing with the blacklist plugin is illustrated in
-the figure titled :ref:`BlackListPlugin`.
-This example also contains a simple configuration management interface.
-It can read a list of blacklisted sites from a file (``blacklist.txt``)
-that can be updated by a Traffic Server administrator. When the
-configuration file is updated, Traffic Server sends an event to the
-plugin that wakes it up to do some work.
-
-Creating the Parent Continuation
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-You create the static parent continuation in the mandatory
-``TSPluginInit`` function. This parent continuation effectively **is**
-the plugin: the plugin executes only 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.
-
-You can specify an optional mutex lock when you create continuations.
-The mutex lock protects data shared by asynchronous processes. Because
-Traffic Server has a multi-threaded design, race conditions can occur if
-several threads try to access the same continuation's data.
-
-Here is how the static parent continuation is created in
-``blacklist-1.c``:
-
-.. code-block:: c
-
-   void
-   TSPluginInit (int argc, const char *argv[])
-   {
-      // ...
-      TSCont contp;
-          
-      contp = TSContCreate (blacklist_plugin, NULL);
-      // ...
-   }
-
-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 ``blacklist_plugin``
-routine consists of a switch statement that covers each of the events
-that might be sent to it:
-
-.. code-block:: c
-
-   static int
-   blacklist_plugin (TSCont contp, TSEvent event, void *edata)
-   {
-      TSHttpTxn txnp = (TSHttpTxn) edata;
-      switch (event) {
-         case TS_EVENT_HTTP_OS_DNS:
-            handle_dns (txnp, contp);
-            return 0;
-         case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
-            handle_response (txnp);
-            return 0;
-         default:
-            TSDebug ("blacklist_plugin", "This event was unexpected: %d\n", );
-            break;
-      }
-      return 0;
-   }
-
-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, ``TS_EVENT_OS_DNS`` is sent because of the global hook
-established in ``TSPluginInit``, ``TS_EVENT_HTTP_SEND_RESPONSE_HDR`` is
-sent because the plugin contains a transaction hook
-(see :doc:`blacklist-plugin/setting-up-a-transaction-hook.en`).
-It is good practice to have a default case in your switch statements.
-
-.. toctree::
-   :maxdepth: 2
-
-   blacklist-plugin/setting-a-global-hook.en
-   blacklist-plugin/accessing-the-transaction-being-processed.en
-   blacklist-plugin/setting-up-a-transaction-hook.en
-   blacklist-plugin/working-with-http-header-functions.en
-

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.rst b/doc/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.rst
deleted file mode 100644
index fd2cc4d..0000000
--- a/doc/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-Accessing the Transaction Being Processed
-*****************************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-  
-    http://www.apache.org/licenses/LICENSE-2.0
-  
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-A continuation's handler function is of type ``TSEventFunc``; the
-prototype is as follows:
-
-``static int function_name (TSCont contp, TSEvent event, void *edata)``
-
-In general, the return value of the handler function is not used. The
-continuation argument is the continuation being called back, the event
-is the event being sent to the continuation, and the data pointed to by
-``void *edata`` depends on the type of event. The data types for each
-event type are listed in :doc:`Writing Handler
-Functions <../../continuations/writing-handler-functions.en>`
-
-The key here is that if the event is an HTTP transaction event, then the
-data passed to the continuation's handler is of type ``TSHttpTxn`` (a
-data type that represents HTTP transactions). Your plugin can then do
-things with the transaction. Here's how it looks in the code for the
-Blacklist plugin's handler:
-
-.. code-block:: c
-
-   static int
-   blacklist_plugin (TSCont contp, TSEvent event, void *edata)
-   {
-      TSHttpTxn txnp = (TSHttpTxn) edata;
-      switch (event) {
-         case TS_EVENT_HTTP_OS_DNS:
-            handle_dns (txnp, contp);
-            return 0;
-         case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
-            handle_response (txnp);
-            return 0;
-         default:
-            break;
-      }
-      return 0;
-   }
-
-For example: when the origin server DNS lookup event is sent,
-``blacklist_plugin`` can call ``handle_dns``\ and pass ``txnp`` as an
-argument.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.rst b/doc/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.rst
deleted file mode 100644
index 749ada2..0000000
--- a/doc/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-Setting a Global Hook
-*********************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-   
-   http://www.apache.org/licenses/LICENSE-2.0
-   
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-Global hooks are always added in ``TSPluginInit`` using
-``TSHttpHookAdd``. The two arguments of ``TSHttpHookAdd`` are the hook
-ID and the continuation to call when processing the event corresponding
-to the hook. In ``blacklist-1.c``, the global hook is added as follows:
-
-.. code-block:: c
-
-   TSHttpHookAdd (TS_HTTP_OS_DNS_HOOK, contp);
-
-Above, ``TS_HTTP_OS_DNS_HOOK`` is the ID for the origin server DNS
-lookup hook and ``contp`` is the parent continuation created earlier.
-
-This means that the Blacklist plugin is called at every origin server
-DNS lookup. When it is called, the handler functio ``blacklist_plugin``
-receives ``TS_EVENT_HTTP_OS_DNS`` and calls ``handle_dns`` to see if the
-request is forbidden.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.rst b/doc/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.rst
deleted file mode 100644
index ad8a901..0000000
--- a/doc/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.rst
+++ /dev/null
@@ -1,82 +0,0 @@
-Setting Up a Transaction Hook
-*****************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-  
-    http://www.apache.org/licenses/LICENSE-2.0
-  
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-The Blacklist plugin sends "access forbidden" messages to clients if
-their requests are directed to blacklisted hosts. Therefore, the plugin
-needs a transaction hook so it will be called back when Traffic Server's
-HTTP state machine reaches the "send response header" event. In the
-Blacklist plugin's ``handle_dns`` routine, the transaction hook is added
-as follows:
-
-.. code-block:: c
-
-   TSMutexLock (sites_mutex);
-   for (i = 0; i < nsites; i++) {
-      if (strncmp (host, sites[i], host_length) == 0) {
-         printf ("blacklisting site: %s\n", sites[i]);
-         TSHttpTxnHookAdd (txnp,
-            TS_HTTP_SEND_RESPONSE_HDR_HOOK,
-            contp);
-         TSHandleMLocRelease (bufp, hdr_loc, url_loc);
-         TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
-         TSHttpTxnReenable (txnp, TS_EVENT_HTTP_ERROR);
-         TSMutexUnlock (sites_mutex);
-         return;
-      }
-   }
-   TSMutexUnlock (sites_mutex);
-   done:
-   TSHttpTxnReenable (txnp, TS_EVENT_HTTP_CONTINUE);
-
-This code fragment shows some interesting features. The plugin is
-comparing the requested site to the list of blacklisted sites. While the
-plugin is using the blacklist, it must acquire the mutex lock for the
-blacklist to prevent configuration changes in the middle of a
-blacklisting operation. If the requested site is blacklisted, then the
-following things happen:
-
-1. A transaction hook is added with ``TSHttpTxnHookAdd``; the plugin is
-   called back at the "send response header" event (i.e., the plugin
-   sends an Access forbidden message to the client). You can see that in
-   order to add a transaction hook, you need a handle to the transaction
-   being processed.
-
-2. The transaction is reenabled using ``TSHttpTxnReenable`` with
-   ``TS_EVENT_HTTP_ERROR`` as its event argument. Reenabling with an
-   error event tells the HTTP state machine to stop the transaction and
-   jump to the "send response header" state. Notice that if the
-   requested site is not blacklisted, then the transaction is reenabled
-   with the ``TS_EVENT_HTTP_CONTINUE`` event.
-
-3. The string and ``TSMLoc`` data stored in the marshal buffer ``bufp``
-   is released by ``TSHandleMLocRelease`` (see :doc:`Release Marshal Buffer
-   Handles <../../http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles.en>`). Release these handles before
-   reenabling the transaction.
-
-/http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles.en.rst
-
-In general, whenever the plugin is doing something to a transaction, it
-must reenable the transaction when it is finished. In other words: every
-time your handler function handles a transaction event, it must call
-``TSHttpTxnReenable`` when it is finished. Similarly, after your plugin
-handles session events (``TS_EVENT_HTTP_SSN_START`` and
-``TS_EVENT_HTTP_SSN_CLOSE``), it must reenable the session with
-``TSHttpSsnReenable``. Reenabling the transaction twice in the same
-plugin routine is a bad error.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst b/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst
deleted file mode 100644
index d5acad0..0000000
--- a/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst
+++ /dev/null
@@ -1,61 +0,0 @@
-Working with HTTP Header Functions
-**********************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-  
-    http://www.apache.org/licenses/LICENSE-2.0
-  
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-The Blacklist plugin examines the host header in every client
-transaction. This is done in the ``handle_dns`` routine, using
-``TSHttpTxnClientReqGet``, ``TSHttpHdrUrlGet``, and ``TSUrlHostGet``.
-
-.. code-block:: c
-
-   static void
-   handle_dns (TSHttpTxn txnp, TSCont contp)
-   {
-   TSMBuffer bufp;
-   TSMLoc hdr_loc;
-   TSMLoc url_loc;
-   const char *host;
-   int i;
-   int host_length;
- 
-   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-      TSError("[blacklist] Couldn't retrieve client request header");
-      goto done;
-   }
- 
-   if (TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) {
-      TSError("[blacklist] Couldn't retrieve request url");
-      TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
-      goto done;
-   }
- 
-   host = TSUrlHostGet(bufp, url_loc, &host_length);
-   if (!host) {
-      TSError("[blacklist] couldn't retrieve request hostname");
-      TSHandleMLocRelease(bufp, hdr_loc, url_loc);
-      TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
-      goto done;
-   }
-
-To access the host header, the plugin must first get the client request,
-retrieve the URL portion, and then obtain the host header. See :doc:`HTTP
-Headers <../../http-headers.en>` for more information about these calls.
-See :doc:`Release Marshal Buffer
-Handles <../../http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles.en>`
-for guidelines on using ``TSHandleMLocRelease``.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/ce162a6d/doc/sdk/how-to-create-trafficserver-plugins.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/how-to-create-trafficserver-plugins.en.rst b/doc/sdk/how-to-create-trafficserver-plugins.en.rst
deleted file mode 100644
index 8868431..0000000
--- a/doc/sdk/how-to-create-trafficserver-plugins.en.rst
+++ /dev/null
@@ -1,241 +0,0 @@
-.. _how-to-create-trafficserver-plugins:
-
-How to Create Traffic Server Plugins
-************************************
-
-.. Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-   
-   http://www.apache.org/licenses/LICENSE-2.0
-   
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.
-
-.. toctree::
-   :maxdepth: 2
-
-   how-to-create-trafficserver-plugins/roadmap-for-creating-plugins.en
-
-This chapter provides a foundation for designing and writing plugins.
-Reading this chapter will help you to understand:
-
--  The asynchronous event mode. This is the design paradigm used
-   throughout Traffic Server; plugins must also follow this design. It
-   includes the callback mechanism for Traffic Server to "wake up" your
-   plugin and put it to work.
-
--  Traffic Server's HTTP processing, with an overview of the HTTP state
-   machine.
-
--  How plugins can hook onto and modify/extend Traffic Server's HTTP
-   processing.
-
--  A :doc:`roadmap for writing plugins <how-to-create-trafficserver-plugins/roadmap-for-creating-plugins.en>`,
-   with an overview of the functionality provided by the Traffic Server
-   API.
-
-The Asynchronous Event Model
-----------------------------
-
-Traffic Server is a multi-threaded process. There are two main reasons
-why a server might use multiple threads:
-
--  To take advantage of the concurrency available with multiple CPUs and
-   multiple I/O devices.
-
--  To manage concurrency from having many simultaneous client
-   connections. For example, a server could create one thread for each
-   connection, allowing the operating system (OS) to control switching
-   between threads.
-
-Traffic Server uses multiple threads for the first reason. However,
-Traffic Server does not use a separate OS thread per transaction because
-it would not be efficient when handling thousands of simultaneous
-connections.
-
-Instead, Traffic Server provides special event-driven mechanisms for
-efficiently scheduling work: the event system and continuations. The
-**event system** is used to schedule work to be done on threads. A
-**continuation** is a passive, event-driven state machine that can do
-some work until it reaches a waiting point; it then sleeps until it
-receives notification that conditions are right for doing more work. For
-example, HTTP state machines (which handle HTTP transactions) are
-implemented as continuations.
-
-Continuation objects are used throughout Traffic Server. Some might live
-for the duration of the Traffic Server process, while others are created
-(perhaps by other continuations) for specific needs and then destroyed.
-:ref:`TSInternals` (below) shows how the major
-components of Traffic Server interact. Traffic Server has several
-**processors**, such as *cache processor* and *net processor*, that
-consolidate cache or network I/O tasks. Processors talk to the event
-system and schedule work on threads. 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.
-
-**Traffic Server Internals**
-
-.. _TSInternals:
-
-.. figure:: /static/images/sdk/event_sys80.jpg
-   :alt: Traffic Server Internals
-
-   Traffic Server Internals
-   
-Plugins are typically implemented as continuations. All of the sample
-code plugins (except ``hello-world``) are continuations that are created
-when Traffic Server starts up; they then wait for events that trigger
-them into activity.
-
-**Traffic Server with Plugins**
-
-.. _TSwithPlugins:
-
-.. figure:: /static/images/sdk/evt_plugin120.jpg
-   :alt: Traffic Server with Plugins
-
-   Traffic Server with Plugins
-   
-A plugin may consist of just one static continuation that is called
-whenever certain events happen. Examples of such plugins include
-``blacklist-1.c``, ``basic-auth.c``, and ``redirect-1.c``.
-Alternatively, a plugin might dynamically create other continuations as
-needed. Transform plugins are built in this manner: a static parent
-continuation checks all transactions to see if any are transformable;
-when a transaction is transformable, the static continuation creates a
-type of continuation called a **vconnection**. The vconnection lives as
-long as it takes to complete the transform and then destroys itself.
-This design can be seen in all of the sample transform plugins. Plugins
-that support new protocols also have this architecture: a static
-continuation listens for incoming client connections and then creates
-transaction state machines to handle each protocol transaction.
-
-When you write plugins, there are several ways to send events to
-continuations. For HTTP plugins, there is a "hook" mechanism that
-enables the Traffic Server HTTP state machine to send your plugin wakeup
-calls when needed. Additionally, several Traffic Server API functions
-trigger Traffic Server sub-processes to send events to plugins:
-``TSContCall``, ``TSVConnRead``, ``TSCacheWrite``, and
-``TSMgmtUpdateRegister``, to name a few.
-
-Traffic Server HTTP State Machine
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Traffic Server performs sophisticated HTTP caching and proxying.
-Important features include checking for alternates and document
-freshness, filtering, supporting cache hierarchies, and hosting. Traffic
-Server handles thousands of client requests at a time and each request
-is handled by an HTTP state machine. These machines follow a complex
-state diagram that includes all of the states required to support
-Traffic Server's features. The Traffic Server API provides hooks to a
-subset of these states, chosen for their relevance to plugins. You can
-view the API hooks and corresponding HTTP states in the
-:ref:`http-txn-state-diagram`.
-
-The example in this section (below) explains how a plugin typically
-intervenes and extends Traffic Server's processing of an HTTP
-transaction. Complete details about hooking on to Traffic Server
-processes are provided in :doc:`http-hooks-and-transactions.en`.
-
-HTTP Transaction
-^^^^^^^^^^^^^^^^
-
-An HTTP transaction consists of a client request for a web document and
-Traffic Server's response. The response could be the requested web
-server content or it could be an error message. The content could come
-from the Traffic Server 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.
-
-**Simplified HTTP Transaction**
-
-.. _SimplifiedHTTPTransaction:
-
-.. figure:: /static/images/sdk/transact75.jpg
-   :alt: Simplified HTTP Transaction
-
-   Simplified HTTP Transaction
-   
-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 requested content in the cache. If the content is not in
-the cache (a "miss"), then Traffic Server opens a connection to the
-origin server and issues a request for the content. If the content is in
-the cache (a "hit"), then Traffic Server checks it for freshness.
-
-If the content is fresh, then Traffic Server sends a reply header to the
-client. If the content is stale, then Traffic Server opens a connection
-to the origin server and requests the content. The figure above,
-:ref:`SimplifiedHTTPTransaction`, does *not*
-show behavior in the event of an error. If there is an error at a any
-stage, then the HTTP state machine jumps to the "send reply header"
-state 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.
-
-**API Hooks Corresponding to States**
-
-.. _APIHooksCorrespondingtoStates:
-
-.. figure:: /static/images/sdk/transact_hook75.jpg
-   :alt: API Hooks Corresponding to States Listed in
-
-   API Hooks Corresponding to States Listed in
-   
-You use hooks as triggers to start your plugin. The name of a hook
-reflects the Traffic Server state that was *just completed*. For
-example, the "OS DNS lookup" hook wakes up a plugin right *after* the
-origin server DNS lookup. For a plugin that requires the IP address of
-the requested origin server, this hook is the right one to use. The
-Blacklist plugin works in this manner, as shown in the :ref:`BlackListPlugin`
-diagram below.
-
-**Blacklist Plugin**
-
-.. _BlackListPlugin:
-
-.. figure:: /static/images/sdk/blacklist75.jpg
-   :alt: Blacklist Plugin
-
-   Blacklist Plugin
-   
-Traffic Server calls the Blacklist plugin right after the origin server
-DNS lookup. The plugin checks the requested host against a list of
-blacklisted servers; if the request is allowed, then the transaction
-proceeds. If the host is forbidden, then the Blacklist plugin sends the
-transaction into an error state. When the HTTP state machine gets to the
-"send reply header" state, it then calls the Blacklist plugin to provide
-the error message that's sent to the client.
-
-Types of Hooks
-^^^^^^^^^^^^^^
-
-The Blacklist plugin's hook to the "origin server DNS lookup" state is a
-****global hook****, meaning that the plugin is called *every time*
-there's an HTTP transaction with a DNS lookup event. The plugin's hook
-to the "send reply header" state is a ****transaction hook****,
-meaning that this hook is only invoked for *specified transactions* (in
-the Blacklist example, it's only used for requests to blacklisted
-servers). Several examples of setting up hooks are provided in the code
-example chapters: :doc:`header-based-plugin-examples.en` and
-:doc:`http-transformation-plugin.en`
-
-**Header manipulation plugins**, such as filtering, basic authorization,
-or redirects, usually have a global hook to the DNS lookup or the read
-request header states. If specific actions need to be done to the
-transaction further on, then the plugin adds itself to a transaction
-hook. **Transformation plugins** require a \*\*global hook \*\*to check
-all transactions for transformability followed by a **transform hook**,
-which is a type of transaction hook used specifically for transforms.
-


Mime
View raw message