You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2013/08/01 20:58:15 UTC

[01/11] git commit: doc: convert TSIOBufferCreate(3) to sphinx

Updated Branches:
  refs/heads/master 229a20956 -> cecc082d4


doc: convert TSIOBufferCreate(3) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fbe22e49
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fbe22e49
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fbe22e49

Branch: refs/heads/master
Commit: fbe22e49fea0d13f34eb10d3245376d7e33bdfe3
Parents: 229a209
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 10:12:03 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 10:12:03 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                               |  1 +
 doc/reference/api/TSIOBufferCreate.en.rst | 91 ++++++++++++++++++++++++++
 2 files changed, 92 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fbe22e49/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index d9eb3a1..cc449e0 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -217,6 +217,7 @@ man_pages = [
    ('reference/api/TSHttpHookAdd.en', 'TSHttpHookAdd', u'Intercept Traffic Server events', None, u'3ts'),
    ('reference/api/TSHttpParserCreate.en', 'TSHttpParserCreate', u'Parse HTTP headers from memory buffers', None, u'3ts'),
    ('reference/api/TSHttpTxnMilestoneGet.en', 'TSHttpTxnMilestoneGet', u'Get a specified milestone timer value for the current transaction', None, u'3ts'),
+   ('reference/api/TSIOBufferCreate.en', 'TSIOBufferCreate', u'Traffic Server IO buffer API', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fbe22e49/doc/reference/api/TSIOBufferCreate.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSIOBufferCreate.en.rst b/doc/reference/api/TSIOBufferCreate.en.rst
new file mode 100644
index 0000000..5e6ad80
--- /dev/null
+++ b/doc/reference/api/TSIOBufferCreate.en.rst
@@ -0,0 +1,91 @@
+.. 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
+
+================
+TSIOBufferCreate
+================
+
+Library
+=======
+Apache Traffic Server plugin API
+
+Synopsis
+========
+`#include <ts/ts.h>`
+
+.. function:: TSIOBuffer TSIOBufferCreate(void)
+.. function:: TSIOBuffer TSIOBufferSizedCreate(TSIOBufferSizeIndex index)
+.. function:: void TSIOBufferDestroy(TSIOBuffer bufp)
+.. function:: int64_t TSIOBufferWrite(TSIOBuffer bufp, const void * buf, int64_t length)
+.. function:: void TSIOBufferProduce(TSIOBuffer bufp, int64_t nbytes)
+.. function:: int64_t TSIOBufferWaterMarkGet(TSIOBuffer bufp)
+.. function:: void TSIOBufferWaterMarkSet(TSIOBuffer bufp, int64_t water_mark)
+
+Description
+===========
+
+The :type:`TSIOBuffer` data structure is the building block of the TSVConn
+abstraction. An IO buffer is composed of a list of buffer blocks which
+are reference counted so that they can reside in multiple buffers at the
+same time. This makes it extremely efficient to copy data from one IO
+buffer to another using :func:`TSIOBufferCopy` since Traffic Server only needs to
+copy pointers and adjust reference counts appropriately and not actually
+copy any data; however applications should still strive to ensure data
+blocks are a reasonable size.
+
+The IO buffer abstraction provides for a single writer and multiple
+readers. In order for the readers to have no knowledge of each
+other, they manipulate IO buffers through the :type:`TSIOBufferReader`
+data structure. Since only a single writer is allowed, there is no
+corresponding :type:`TSIOBufferWriter` data structure. The writer
+simply modifies the IO buffer directly.
+
+:func:`TSIOBufferCreate` creates an empty :type:`TSIOBuffer`.
+
+:func:`TSIOBufferSizedCreate` creates an empty :type:`TSIOBuffer`
+with an initial capacity of index bytes.
+
+:func:`TSIOBufferDestroy` destroys the IO buffer bufp. Since multiple IO
+buffers can share data, this does not necessarily free all of the data
+associated with the IO buffer but simply decrements the appropriate reference counts.
+
+:func:`TSIOBufferWrite` appends length bytes from the buffer buf to the IO
+buffer bufp and returns the number of bytes successfully written into the
+IO buffer.
+
+:func:`TSIOBufferProduce` makes nbytes of data available for reading in the IO
+buffer bufp. A common pattern for writing to an IO buffer is to copy
+data into a buffer block and then call INKIOBufferProduce to make the new
+data visible to any readers.
+
+The watermark of an TSIOBuffer is the minimum number of bytes of data
+that have to be in the buffer before calling back any continuation that
+has initiated a read operation on this buffer. As a writer feeds data
+into the TSIOBuffer, no readers are called back until the amount of data
+reaches the watermark. Setting a watermark can improve performance
+because it avoids frequent callbacks to read small amounts of data.
+:func:`TSIOBufferWaterMarkGet` gets the current watermark for the IO buffer
+bufp.
+
+:func:`TSIOBufferWaterMarkSet` gets the current watermark for the IO buffer
+bufp to water_mark bytes.
+
+See also
+========
+
+:manpage:`TSAPI(3ts)`, :manpage:`TSIOBufferReaderAlloc(3ts)`


[02/11] git commit: doc: convert TSInstallDirGet(3) to sphinx

Posted by jp...@apache.org.
doc: convert TSInstallDirGet(3) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cdddf8ba
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cdddf8ba
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cdddf8ba

Branch: refs/heads/master
Commit: cdddf8ba70f7f305a40f10dd6702a1f301655c40
Parents: fbe22e4
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 10:18:23 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 10:18:23 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                              |  1 +
 doc/reference/api/TSInstallDirGet.en.rst | 62 +++++++++++++++++++++++++++
 2 files changed, 63 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cdddf8ba/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index cc449e0..f8b7ad8 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -218,6 +218,7 @@ man_pages = [
    ('reference/api/TSHttpParserCreate.en', 'TSHttpParserCreate', u'Parse HTTP headers from memory buffers', None, u'3ts'),
    ('reference/api/TSHttpTxnMilestoneGet.en', 'TSHttpTxnMilestoneGet', u'Get a specified milestone timer value for the current transaction', None, u'3ts'),
    ('reference/api/TSIOBufferCreate.en', 'TSIOBufferCreate', u'Traffic Server IO buffer API', None, u'3ts'),
+   ('reference/api/TSInstallDirGet.en', 'TSInstallDirGet', u'Return Traffic Server installation directories', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cdddf8ba/doc/reference/api/TSInstallDirGet.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSInstallDirGet.en.rst b/doc/reference/api/TSInstallDirGet.en.rst
new file mode 100644
index 0000000..502f172
--- /dev/null
+++ b/doc/reference/api/TSInstallDirGet.en.rst
@@ -0,0 +1,62 @@
+.. 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
+
+===============
+TSInstallDirGet
+===============
+
+Library
+=======
+Apache Traffic Server plugin API
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+
+.. function:: const char * TSInstallDirGet(void)
+.. function:: const char * TSConfigDirGet(void)
+.. function:: const char * TSPluginDirGet(void)
+
+Description
+===========
+
+:func:`TSInstallDirGet` returns the path to the root of the Traffic
+Server installation. :func:`TSConfigDirGet` and :func:`TSPluginDirGet`
+return the complete, absolute path to the configuration directory
+and the plugin installation directory respectively.
+
+Return values
+=============
+
+These functions all return a NUL-terminated string that must not be modified or freed.
+
+Examples
+========
+
+To load a file that is located in the Traffic Server configuration directory::
+
+    #include <ts/ts.h>
+    #include <stdio.h>
+
+    char * path;
+    asprintf(&path, "%s/example.conf", TSConfigDirGet());
+
+See also
+========
+:manpage:`TSAPI(3ts)`


Re: [07/11] git commit: doc: convert TSTrafficServerVersionGet(3) to sphinx

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> doc: convert TSTrafficServerVersionGet(3) to sphinx

Reminder: https://issues.apache.org/jira/browse/TS-1953


> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e0a2dd5d/doc/conf.py
> ----------------------------------------------------------------------
> diff --git a/doc/conf.py b/doc/conf.py
> index e2067b0..d7c9f2b 100644
> --- a/doc/conf.py
> +++ b/doc/conf.py
> @@ -223,6 +223,7 @@ man_pages = [
>     ('reference/api/TSmalloc.en', 'TSmalloc', u'Traffic Server memory
>     allocation API', None, u'3ts'),
>     ('reference/api/TSPluginInit.en', 'TSPluginInit', u'Traffic
>     Server plugin loading and registration', None, u'3ts'),
>     ('reference/api/TSRemap.en', 'TSRemap', u'Traffic Server remap
>     plugin entry points ', None, u'3ts'),
> +   ('reference/api/TSTrafficServerVersionGet.en',
> 'TSTrafficServerVersionGet', u'return Traffic Server version
> information', None, u'3ts'),
>  
>     ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic
>     Server watchdog', None, '8'),
>     ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic
>     Server command line', None, '8'),
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e0a2dd5d/doc/reference/api/TSTrafficServerVersionGet.en.rst
> ----------------------------------------------------------------------
> diff --git a/doc/reference/api/TSTrafficServerVersionGet.en.rst
> b/doc/reference/api/TSTrafficServerVersionGet.en.rst
> new file mode 100644
> index 0000000..e450743
> --- /dev/null
> +++ b/doc/reference/api/TSTrafficServerVersionGet.en.rst
> @@ -0,0 +1,98 @@
> +.. 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
> +
> +=========================
> +TSTrafficServerVersionGet
> +=========================
> +
> +Synopsis
> +========
> +
> +`#include <ts/ts.h>`
> +
> +.. function:: const char * TSTrafficServerVersionGet(void)
> +.. function:: int TSTrafficServerVersionGetMajor(void)
> +.. function:: int TSTrafficServerVersionGetMinor(void)
> +.. function:: int TSTrafficServerVersionGetPatch(void)
> +
> +Description
> +===========
> +
> +:func:`TSTrafficServerVersionGet` returns a pointer to a string of
> characters
> +that indicates the Traffic Server release version. This string must
> not
> +be modified.
> +
> +The other APIs return an integer version number.
> +
> +Example
> +=======
> +
> +::
> +
> +    #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 3.0 */
> +            if (major_ts_version >= 3) {
> +                result = 1;
> +            }
> +        }

no, seriously, we need to get rid of this boiler plate code.

    https://issues.apache.org/jira/browse/TS-1953

TSVersionGE(int major, int minor = -1, int patch = -1) {
  if ( !(TSTrafficServerVersionGetMajor >= major)) {
     return false;
  } else if (minor != -1) {
     if ( !(TSTrafficServerVersionGetMinor >= minor)) {
        return false;
     } else if (patch != -1 ) {
        if ( !(TSTrafficServerVersionGetPatch >= patch)) {
           return false;
        }
     }
  }
  return true;
}

This, and equivalent functions could be written as macros.

> +
> +        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(TS_SDK_VERSION_3_0 , &info) !=
> TS_SUCCESS) {
> +            TSError("Plugin registration failed. 0);
> +        }
> +
  -        if (!check_ts_version()) {
  +        if (!TSVersionGE(3,0)) {
> +            TSError("Plugin requires Traffic Server 3.0 or later0);
> +            return;
> +        }
> +
> +        TSDebug("debug-hello", "Hello World!0);
> +    }
> +
> +See also
> +========
> +
> +:manpage:`TSAPI(3ts)`
> 
> 

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

[07/11] git commit: doc: convert TSTrafficServerVersionGet(3) to sphinx

Posted by jp...@apache.org.
doc: convert TSTrafficServerVersionGet(3) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e0a2dd5d
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e0a2dd5d
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e0a2dd5d

Branch: refs/heads/master
Commit: e0a2dd5d630557390fd3216a1f5c8080b0dbcb57
Parents: fa4be92
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 11:38:15 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 11:38:15 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                                     |  1 +
 .../api/TSTrafficServerVersionGet.en.rst        | 98 ++++++++++++++++++++
 2 files changed, 99 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e0a2dd5d/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index e2067b0..d7c9f2b 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -223,6 +223,7 @@ man_pages = [
    ('reference/api/TSmalloc.en', 'TSmalloc', u'Traffic Server memory allocation API', None, u'3ts'),
    ('reference/api/TSPluginInit.en', 'TSPluginInit', u'Traffic Server plugin loading and registration', None, u'3ts'),
    ('reference/api/TSRemap.en', 'TSRemap', u'Traffic Server remap plugin entry points ', None, u'3ts'),
+   ('reference/api/TSTrafficServerVersionGet.en', 'TSTrafficServerVersionGet', u'return Traffic Server version information', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e0a2dd5d/doc/reference/api/TSTrafficServerVersionGet.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSTrafficServerVersionGet.en.rst b/doc/reference/api/TSTrafficServerVersionGet.en.rst
new file mode 100644
index 0000000..e450743
--- /dev/null
+++ b/doc/reference/api/TSTrafficServerVersionGet.en.rst
@@ -0,0 +1,98 @@
+.. 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
+
+=========================
+TSTrafficServerVersionGet
+=========================
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+
+.. function:: const char * TSTrafficServerVersionGet(void)
+.. function:: int TSTrafficServerVersionGetMajor(void)
+.. function:: int TSTrafficServerVersionGetMinor(void)
+.. function:: int TSTrafficServerVersionGetPatch(void)
+
+Description
+===========
+
+:func:`TSTrafficServerVersionGet` returns a pointer to a string of characters
+that indicates the Traffic Server release version. This string must not
+be modified.
+
+The other APIs return an integer version number.
+
+Example
+=======
+
+::
+
+    #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 3.0 */
+            if (major_ts_version >= 3) {
+                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(TS_SDK_VERSION_3_0 , &info) != TS_SUCCESS) {
+            TSError("Plugin registration failed. 0);
+        }
+
+        if (!check_ts_version()) {
+            TSError("Plugin requires Traffic Server 3.0 or later0);
+            return;
+        }
+
+        TSDebug("debug-hello", "Hello World!0);
+    }
+
+See also
+========
+
+:manpage:`TSAPI(3ts)`


[11/11] git commit: doc: remove Library section from man pages

Posted by jp...@apache.org.
doc: remove Library section from man pages


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/cecc082d
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/cecc082d
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/cecc082d

Branch: refs/heads/master
Commit: cecc082d440c7ee13c0bdff806f2fb69de47bd4d
Parents: d85f4d9
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 11:58:02 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 11:58:02 2013 -0700

----------------------------------------------------------------------
 doc/reference/api/TSAPI.en.rst                 |  6 +++---
 doc/reference/api/TSDebug.en.rst               |  8 ++------
 doc/reference/api/TSHttpHookAdd.en.rst         | 10 +++-------
 doc/reference/api/TSHttpParserCreate.en.rst    |  5 -----
 doc/reference/api/TSHttpTxnMilestoneGet.en.rst |  5 -----
 doc/reference/api/TSIOBufferCreate.en.rst      |  4 ----
 doc/reference/api/TSInstallDirGet.en.rst       |  4 ----
 7 files changed, 8 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cecc082d/doc/reference/api/TSAPI.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSAPI.en.rst b/doc/reference/api/TSAPI.en.rst
index d2ab1b2..df24011 100644
--- a/doc/reference/api/TSAPI.en.rst
+++ b/doc/reference/api/TSAPI.en.rst
@@ -16,9 +16,9 @@
 
 .. default-domain:: c
 
-=======
-`TSAPI`
-=======
+=====
+TSAPI
+=====
 
 Synopsis
 ========

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cecc082d/doc/reference/api/TSDebug.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSDebug.en.rst b/doc/reference/api/TSDebug.en.rst
index a57d8cd..dae2d70 100644
--- a/doc/reference/api/TSDebug.en.rst
+++ b/doc/reference/api/TSDebug.en.rst
@@ -16,13 +16,9 @@
 
 .. default-domain:: c
 
-==========
-`TSDebug`
-==========
-
-Library
 =======
-Apache Traffic Server plugin API
+TSDebug
+=======
 
 Synopsis
 ========

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cecc082d/doc/reference/api/TSHttpHookAdd.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSHttpHookAdd.en.rst b/doc/reference/api/TSHttpHookAdd.en.rst
index f61219f..657b336 100644
--- a/doc/reference/api/TSHttpHookAdd.en.rst
+++ b/doc/reference/api/TSHttpHookAdd.en.rst
@@ -16,13 +16,9 @@
 
 .. default-domain:: c
 
-===============
-`TSHttpHookAdd`
-===============
-
-Library
-=======
-Apache Traffic Server plugin API
+=============
+TSHttpHookAdd
+=============
 
 Synopsis
 ========

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cecc082d/doc/reference/api/TSHttpParserCreate.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSHttpParserCreate.en.rst b/doc/reference/api/TSHttpParserCreate.en.rst
index faa0a70..6d388e0 100644
--- a/doc/reference/api/TSHttpParserCreate.en.rst
+++ b/doc/reference/api/TSHttpParserCreate.en.rst
@@ -20,11 +20,6 @@
 TSHttpParserCreate
 ===================
 
-Library
-=======
-
-Apache Traffic Server plugin API
-
 Synopsis
 ========
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cecc082d/doc/reference/api/TSHttpTxnMilestoneGet.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSHttpTxnMilestoneGet.en.rst b/doc/reference/api/TSHttpTxnMilestoneGet.en.rst
index 9b4013f..c922258 100644
--- a/doc/reference/api/TSHttpTxnMilestoneGet.en.rst
+++ b/doc/reference/api/TSHttpTxnMilestoneGet.en.rst
@@ -19,11 +19,6 @@
 TSHttpTxnMilestoneGet
 =====================
 
-Library
-=======
-
-Apache Traffic Server plugin API
-
 Synopsis
 ========
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cecc082d/doc/reference/api/TSIOBufferCreate.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSIOBufferCreate.en.rst b/doc/reference/api/TSIOBufferCreate.en.rst
index 5e6ad80..a385c83 100644
--- a/doc/reference/api/TSIOBufferCreate.en.rst
+++ b/doc/reference/api/TSIOBufferCreate.en.rst
@@ -20,10 +20,6 @@
 TSIOBufferCreate
 ================
 
-Library
-=======
-Apache Traffic Server plugin API
-
 Synopsis
 ========
 `#include <ts/ts.h>`

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/cecc082d/doc/reference/api/TSInstallDirGet.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSInstallDirGet.en.rst b/doc/reference/api/TSInstallDirGet.en.rst
index 502f172..96fc7dd 100644
--- a/doc/reference/api/TSInstallDirGet.en.rst
+++ b/doc/reference/api/TSInstallDirGet.en.rst
@@ -20,10 +20,6 @@
 TSInstallDirGet
 ===============
 
-Library
-=======
-Apache Traffic Server plugin API
-
 Synopsis
 ========
 


[05/11] git commit: doc: convert TSPluginInit(3) to sphinx

Posted by jp...@apache.org.
doc: convert TSPluginInit(3) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/80b644e7
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/80b644e7
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/80b644e7

Branch: refs/heads/master
Commit: 80b644e7267cd543aad3a60230968cb7ed5c194d
Parents: c976718
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 10:51:12 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 10:51:12 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                           |  1 +
 doc/reference/api/TSPluginInit.en.rst | 75 ++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/80b644e7/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index 75bf8b1..9d8edfd 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -221,6 +221,7 @@ man_pages = [
    ('reference/api/TSInstallDirGet.en', 'TSInstallDirGet', u'Return Traffic Server installation directories', None, u'3ts'),
    ('reference/api/TSMBufferCreate.en', 'TSMBufferCreate', u'Traffic Server marshall buffer API', None, u'3ts'),
    ('reference/api/TSmalloc.en', 'TSmalloc', u'Traffic Server memory allocation API', None, u'3ts'),
+   ('reference/api/TSPluginInit.en', 'TSPluginInit', u'Traffic Server plugin loading and registration', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/80b644e7/doc/reference/api/TSPluginInit.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSPluginInit.en.rst b/doc/reference/api/TSPluginInit.en.rst
new file mode 100644
index 0000000..ad75d9b
--- /dev/null
+++ b/doc/reference/api/TSPluginInit.en.rst
@@ -0,0 +1,75 @@
+.. 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
+
+============
+TSPluginInit
+============
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+
+.. function:: void TSPluginInit(int argc, const char* argv[])
+.. function:: TSReturnCode TSPluginRegister(TSSDKVersion sdk_version, TSPluginRegistrationInfo* plugin_info)
+
+Description
+===========
+
+:func:`TSPluginInit` must be defined by all plugins. Traffic Server
+calls this initialization routine when it loads the plugin and sets
+argc and argv appropriately based on the values in plugin.config.
+argc is a count of the number of arguments in the argument vector,
+argv. The count is at least one because the first argument in the
+argument vector is the plugins name, which must exist in order for
+the plugin to be loaded. argv is the vector of arguments. The number
+of arguments in the vector is argc, and argv[0] always contains the
+name of the plugin shared library.  :func:`TSPluginRegister` registers
+the appropriate SDK version for your plugin.  Use this function to
+make sure that the version of Traffic Server on which your plugin
+is running supports the plugin.
+
+Return values
+=============
+
+:func:`TSPluginRegister` returns :data:`TS_ERROR` if the plugin registration failed.
+
+Examples
+========
+
+::
+
+    #include <ts/ts.h>
+
+    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(TS_SDK_VERSION_3_0 , &info) != TS_SUCCESS) {
+            TSError("Plugin registration failed. 0);
+        }
+    }
+
+See also
+========
+
+:manpage:`TSAPI(3ts)`, :manpage:`TSInstallDirGet(3ts)`


[10/11] git commit: doc: add new manpages to HTML docs

Posted by jp...@apache.org.
doc: add new manpages to HTML docs


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d85f4d9a
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d85f4d9a
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d85f4d9a

Branch: refs/heads/master
Commit: d85f4d9a81b8eeb64cc20d1cb6d9159b3be1b6d5
Parents: 46bb782
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 11:56:10 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 11:56:10 2013 -0700

----------------------------------------------------------------------
 doc/reference/api/index.en.rst | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d85f4d9a/doc/reference/api/index.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/index.en.rst b/doc/reference/api/index.en.rst
index dcd34b3..3224697 100644
--- a/doc/reference/api/index.en.rst
+++ b/doc/reference/api/index.en.rst
@@ -21,8 +21,16 @@ API Reference
 .. toctree::
   :maxdepth: 2
 
-  TSAPI.en
-  TSDebug.en
-  TSHttpHookAdd.en
-  TSHttpParserCreate.en
-  TSHttpTxnMilestoneGet.en
+  TSAPI.en.rst
+  TSDebug.en.rst
+  TSHttpHookAdd.en.rst
+  TSHttpParserCreate.en.rst
+  TSHttpTxnMilestoneGet.en.rst
+  TSIOBufferCreate.en.rst
+  TSInstallDirGet.en.rst
+  TSMBufferCreate.en.rst
+  TSPluginInit.en.rst
+  TSRemap.en.rst
+  TSTrafficServerVersionGet.en.rst
+  TSUrlCreate.en.rst
+  TSmalloc.en.rst


[06/11] git commit: doc: convert TSRemap(3) to sphinx

Posted by jp...@apache.org.
doc: convert TSRemap(3) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fa4be92b
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fa4be92b
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fa4be92b

Branch: refs/heads/master
Commit: fa4be92b4d59ecc64fff75c827390c1abc5ffed0
Parents: 80b644e
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 11:27:56 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 11:27:56 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                      |  1 +
 doc/reference/api/TSRemap.en.rst | 85 +++++++++++++++++++++++++++++++++++
 2 files changed, 86 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fa4be92b/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index 9d8edfd..e2067b0 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -222,6 +222,7 @@ man_pages = [
    ('reference/api/TSMBufferCreate.en', 'TSMBufferCreate', u'Traffic Server marshall buffer API', None, u'3ts'),
    ('reference/api/TSmalloc.en', 'TSmalloc', u'Traffic Server memory allocation API', None, u'3ts'),
    ('reference/api/TSPluginInit.en', 'TSPluginInit', u'Traffic Server plugin loading and registration', None, u'3ts'),
+   ('reference/api/TSRemap.en', 'TSRemap', u'Traffic Server remap plugin entry points ', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fa4be92b/doc/reference/api/TSRemap.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSRemap.en.rst b/doc/reference/api/TSRemap.en.rst
new file mode 100644
index 0000000..53668e7
--- /dev/null
+++ b/doc/reference/api/TSRemap.en.rst
@@ -0,0 +1,85 @@
+.. 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
+
+===========
+TSRemapInit
+===========
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+`#include <ts/remap.h>`
+
+.. function:: TSReturnCode TSRemapInit(TSRemapInterface * api_info, char* errbuf, int errbuf_size)
+.. function:: void TSRemapDone(void)
+.. function:: TSRemapStatus TSRemapDoRemap(void * ih, TSHttpTxn rh, TSRemapRequestInfo * rri)
+.. function:: TSReturnCode TSRemapNewInstance(int argc, char * argv[], void ** ih, char * errbuf, int errbuf_size)
+.. function:: void TSRemapDeleteInstance(void * )
+.. function:: void TSRemapOSResponse(void * ih, TSHttpTxn rh, int os_response_type)
+
+Description
+===========
+
+The Traffic Server remap interface provides a simplified mechanism for
+plugins to manipulate HTTP transactions. A remap plugin is not global; it
+is configured on a per-remap rule basis, which enables you to customize
+how URLs are redirected based on individual rules in the remap.config
+file. Writing a remap plugin consists of implementing one or more of the
+remap entry points and configuring the remap.config configuration file to
+route the transaction through your plugin. Multiple remap plugins can be
+specified for a single remap rule, resulting in a remap plugin chain
+where each pligin is given an opportunity to examine the HTTP transaction.
+
+:func:`TSRemapInit` is a required entry point. This function will be called
+once when Traffic Server loads the plugin. If the optional :func:`TSRemapDone`
+entry point is available, Traffic Server will call then when unloading
+the remap plugin.
+
+A remap plugin may be invoked for different remap rules. Traffic Server
+will call the entry point each time a plugin is specified in a remap
+rule. When a remap plugin instance is no longer required, Traffic Server
+will call :func:`TSRemapDeleteInstance`.
+
+:func:`TSRemapDoRemap` is called for each HTTP transaction. This is a mandatory
+entry point. In this function, the remap plugin may examine and modify
+the HTTP transaction.
+
+Return values
+=============
+
+:func:`TSRemapInit` and :func:`TSRemapNewInstance` should return
+:data:`TS_SUCCESS` on success, and :data:`TS_ERROR` otherwise. A
+return value of :data:`TS_ERROR` is unrecoverable.
+
+:func:`TSRemapDoRemap` returns a status code that indicates whether
+the HTTP transaction has been modified and whether Traffic Server
+should continue to evaluate the chain of remap plugins. If the
+transaction was modified, the plugin should return
+:data:`TSREMAP_DID_REMAP` or :data:`TSREMAP_DID_REMAP_STOP`; otherwise
+it should return :data:`TSREMAP_NO_REMAP` or :data:`TSREMAP_NO_REMAP_STOP`.
+If Traffic Server should not send the transaction to subsequent
+plugins in the remap chain, return :data:`TSREMAP_NO_REMAP_STOP`
+or :data:`TSREMAP_DID_REMAP_STOP`.  Returning :data:`TSREMAP_ERROR`
+causes Traffic Server to stop evaluating the remap chain and respond
+with an error.
+
+See also
+========
+
+:manpage:`TSAPI(3ts)`


[08/11] git commit: doc: convert TSUrlCreate(2) to sphinx

Posted by jp...@apache.org.
doc: convert TSUrlCreate(2) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6a50da53
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6a50da53
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6a50da53

Branch: refs/heads/master
Commit: 6a50da533e42eda81799b423fe967757472fe49c
Parents: e0a2dd5
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 11:53:45 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 11:53:45 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                          |   1 +
 doc/reference/api/TSUrlCreate.en.rst | 140 ++++++++++++++++++++++++++++++
 2 files changed, 141 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6a50da53/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index d7c9f2b..9e6e6d3 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -224,6 +224,7 @@ man_pages = [
    ('reference/api/TSPluginInit.en', 'TSPluginInit', u'Traffic Server plugin loading and registration', None, u'3ts'),
    ('reference/api/TSRemap.en', 'TSRemap', u'Traffic Server remap plugin entry points ', None, u'3ts'),
    ('reference/api/TSTrafficServerVersionGet.en', 'TSTrafficServerVersionGet', u'return Traffic Server version information', None, u'3ts'),
+   ('reference/api/TSUrlCreate.en', 'TSUrlCreate', u'Traffic Server URL manipulation API', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6a50da53/doc/reference/api/TSUrlCreate.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSUrlCreate.en.rst b/doc/reference/api/TSUrlCreate.en.rst
new file mode 100644
index 0000000..28c14b8
--- /dev/null
+++ b/doc/reference/api/TSUrlCreate.en.rst
@@ -0,0 +1,140 @@
+.. 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
+
+===========
+TSUrlCreate
+===========
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+
+.. function:: TSReturnCode TSUrlCreate(TSMBuffer bufp, TSMLoc * locp)
+.. function:: TSReturnCode TSUrlClone(TSMBuffer dest_bufp, TSMBuffer src_bufp, TSMLoc src_url, TSMLoc * locp)
+.. function:: TSReturnCode TSUrlCopy(TSMBuffer dest_bufp, TSMLoc dest_url, TSMBuffer src_bufp, TSMLoc src_url)
+.. function:: void TSUrlPrint(TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp)
+.. function:: TSParseResult TSUrlParse(TSMBuffer bufp, TSMLoc offset, const char ** start, const char * end)
+.. function:: int TSUrlLengthGet(TSMBuffer bufp, TSMLoc offset)
+.. function:: char * TSUrlStringGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: const char * TSUrlSchemeGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: TSReturnCode TSUrlSchemeSet(TSMBuffer bufp, TSMLoc offset, const char * value, int length)
+.. function:: const char * TSUrlUserGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: TSReturnCode TSUrlUserSet(TSMBuffer bufp, TSMLoc offset, const char * value, int length)
+.. function:: const char * TSUrlPasswordGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: TSReturnCode TSUrlPasswordSet(TSMBuffer bufp, TSMLoc offset, const char * value, int length)
+.. function:: const char * TSUrlHostGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: TSReturnCode TSUrlHostSet(TSMBuffer bufp, TSMLoc offset, const char * value, int length)
+.. function:: int TSUrlPortGet(TSMBuffer bufp, TSMLoc offset)
+.. function:: TSReturnCode TSUrlPortSet(TSMBuffer bufp, TSMLoc offset, int port)
+.. function:: const char * TSUrlPathGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: TSReturnCode TSUrlPathSet(TSMBuffer bufp, TSMLoc offset, const char * value, int length)
+.. function:: const char * TSUrlHttpParamsGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: TSReturnCode TSUrlHttpParamsSet(TSMBuffer bufp, TSMLoc offset, const char * value, int length)
+.. function:: const char * TSUrlHttpQueryGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: TSReturnCode TSUrlHttpQuerySet(TSMBuffer bufp, TSMLoc offset, const char * value, int length)
+.. function:: const char * TSUrlHttpFragmentGet(TSMBuffer bufp, TSMLoc offset, int * length)
+.. function:: TSReturnCode TSUrlHttpFragmentSet(TSMBuffer bufp, TSMLoc offset, const char * value, int length)
+.. function:: TSReturnCode TSStringPercentEncode(const char * str, int str_len, char * dst, size_t dst_size, size_t * length, const unsigned char * map)
+.. function:: TSReturnCode TSUrlPercentEncode(TSMBuffer bufp, TSMLoc offset, char * dst, size_t dst_size, size_t * length, const unsigned char * map)
+.. function:: TSReturnCode TSStringPercentDecode(const char * str, size_t str_len, char * dst, size_t dst_size, size_t * length)
+
+Description
+===========
+
+The URL data structure is a parsed version of a standard internet URL.
+The Traffic Server URL API provides access to URL data stored in marshal
+buffers. The URL functions can create, copy, retrieve or delete entire
+URLs, and retrieve or modify parts of URLs, such as their port or scheme
+information.
+
+:func:`TSUrlCreate` creates a new URL within the marshal buffer bufp. Release
+the resulting handle with a call to TSHandleMLocRelease.
+:func:`TSUrlClone` copies the contents of the URL at location src_url within
+the marshal buffer src_bufp to a location within the marshal buffer
+dest_bufp. Release the returned handle with a call to
+:func:`TSHandleMLocRelease`.
+
+:func:`TSUrlCopy` copies the contents of the URL at location src_url within
+the marshal buffer src_bufp to the location dest_url within the marshal
+buffer dest_bufp. :func:`TSUrlCopy` works correctly even if src_bufp and
+dest_bufp point to different marshal buffers. It is important for the
+destination URL (its marshal buffer and :type:`TSMLoc`) to have been created
+before copying into it.
+
+:func:`TSUrlPrint` formats a URL stored in an :type:`TSMBuffer` to an :type:`TSIOBuffer`.
+
+:func:`TSUrlParse` parses a URL. The start pointer is both an input and an output
+parameter and marks the start of the URL to be parsed. After a successful
+parse, the start pointer equals the end pointer. The end pointer
+must be one byte after the last character you want to parse. The URL
+parsing routine assumes that everything between start and end is part of
+the URL. It is up to higher level parsing routines, such as
+:func:`TSHttpHdrParseReq`, to determine the actual end of the URL.
+
+:func:`TSUrlLengthGet` calculates the length of the URL located at offset
+within the marshal buffer bufp if it were returned as a string. This
+length will be the same as the length returned by :func:`TSUrlStringGet`.
+
+:func:`TSUrlStringGet` constructs a string representation of the URL located at
+offset within the marshal buffer bufp. :func:`TSUrlStringGet` stores the
+length of the allocated string in the parameter length. This is the same
+length that :func:`TSUrlLengthGet` returns. The returned string is allocated by
+a call to :func:`TSmalloc` and must be freed by a call to :func:`TSfree`. If length
+is NULL then no attempt is made to de-reference it.
+
+:func:`TSUrlSchemeGet`, :func:`TSUrlUserGet`, :func:`TSUrlPasswordGet`, :func:`TSUrlHostGet`,
+:func:`TSUrlHttpParamsGet`, :func:`TSUrlHttpQueryGet` and :func:`TSUrlHttpFragmentGet` each
+retrieve an internal pointer to the specified portion of the URL from the
+marshall buffer bufp. The length of the returned string is placed in
+length and a pointer to the URL portion is returned. The returned string
+is not guaranteed to be NUL-terminated.
+
+:func:`TSUrlSchemeSet`, :func:`TSUrlUserSet`, :func:`TSUrlPasswordSet`, :func:`TSUrlHostSet`,
+:func:`TSUrlHttpParamsSet`, :func:`TSUrlHttpQuerySet` and :func:`TSUrlHttpFragmentSet` each
+set the specified portion of the URL located at offset within the marshal
+buffer bufp to the string value. If length is -1 then these functions
+assume that value is NUL-terminated. Otherwise, the length of the string
+value is taken to be length. These functions copy the string to within
+bufp, so it can be subsequently modified or deleted.
+
+:func:`TSUrlPortGet` retrieves the port number portion of the URL located at
+offset within the marshal buffer bufp, It returns 0 if there is no port
+number.
+
+:func:`TSUrlPortSet` sets the port number portion of the URL located at offset
+within the marshal buffer bufp to the value port.
+
+:func:`TSStringPercentEncode` performs percent-encoding of the string str,
+storing the new string in the dst buffer. The length parameter will be
+set to the new (encoded) string length, or 0 if the encoding failed.
+TSUrlPercentEncode is similar but operates on a URL object. If the
+optional map parameter is provided, it should be a map of characters to
+encode.
+
+:func:`TSStringPercentDecode` perform percent-decoding of the string in the
+buffer, writing to the dst buffer. The source and destination can be the
+same, in which case they overwrite. The decoded string is always guaranteed
+to be no longer than the source string.
+
+See also
+========
+
+:manpage:`TSAPI(3ts)`,
+:manpage:`TSMBufferCreate(3ts)`,
+:manpage:`TSmalloc(3ts)`


[04/11] git commit: doc: convert TSmalloc(3) to sphinx

Posted by jp...@apache.org.
doc: convert TSmalloc(3) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/c9767181
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/c9767181
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/c9767181

Branch: refs/heads/master
Commit: c97671817cfc0abf06a40318aec87acd8b5b47c1
Parents: 4b14cee
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 10:43:07 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 10:43:07 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                       |  1 +
 doc/reference/api/TSmalloc.en.rst | 78 ++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c9767181/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index 922ee96..75bf8b1 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -220,6 +220,7 @@ man_pages = [
    ('reference/api/TSIOBufferCreate.en', 'TSIOBufferCreate', u'Traffic Server IO buffer API', None, u'3ts'),
    ('reference/api/TSInstallDirGet.en', 'TSInstallDirGet', u'Return Traffic Server installation directories', None, u'3ts'),
    ('reference/api/TSMBufferCreate.en', 'TSMBufferCreate', u'Traffic Server marshall buffer API', None, u'3ts'),
+   ('reference/api/TSmalloc.en', 'TSmalloc', u'Traffic Server memory allocation API', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/c9767181/doc/reference/api/TSmalloc.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSmalloc.en.rst b/doc/reference/api/TSmalloc.en.rst
new file mode 100644
index 0000000..a050200
--- /dev/null
+++ b/doc/reference/api/TSmalloc.en.rst
@@ -0,0 +1,78 @@
+.. 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
+
+========
+TSmalloc
+========
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+
+.. function:: void * TSmalloc(size_t size , const char * path)
+.. function:: void * TSrealloc(void * ptr , size_t size , const char * path)
+.. function:: char * TSstrdup(const char * str)
+.. function:: char * TSstrndup(const char * str, size_t size)
+.. function:: size_t TSstrlcpy(char * dst , const char * src , size_t size)
+.. function:: size_t TSstrlcat(char * dst , const char * src , size_t size)
+.. function:: void TSfree(void * ptr)
+
+Description
+===========
+
+Traffic Server provides a number of routines for allocating and freeing
+memory. These routines correspond to similar routines in the C library.
+For example, :func:`TSrealloc` behaves like the C library routine :func:`realloc`.
+There are two reasons to use the routines provided by Traffic Server. The
+first is portability. The Traffic Server API routines behave the same on
+all of Traffic Servers supported platforms. For example, :func:`realloc` does
+not accept an argument of :data:`NULL` on some platforms. The second reason is
+that the Traffic Server routines actually track the memory allocations by
+file and line number. This tracking is very efficient, is always turned
+on, and is useful for tracking down memory leaks.
+
+:func:`TSmalloc` returns a pointer to size bytes of memory allocated from the
+heap. Traffic Server uses :func:`TSmalloc` internally for memory allocations.
+Always use :func:`TSfree` to release memory allocated by :func:`TSmalloc`; do not use
+:func:`free`.
+
+:func:`TSstrdup` returns a pointer to a new string that is a duplicate
+of the string pointed to by str. The memory for the new string is
+allocated using :func:`TSmalloc` and should be freed by a call to
+:func:`TSfree`.  :func:`TSstrndup` returns a pointer to a new string that
+is a duplicate of the string pointed to by str and size bytes
+long. The new string will be NUL-terminated. This API is very
+useful for transforming non NUL-terminated string values returned
+by APIs such as :func:`TSMimeHdrFieldStringValueGet` into NLL-terminated
+string values. The memory for the new string is allocated using
+:func:`TSmalloc` and should be freed by a call to :func:`TSfree`.
+
+:func:`TSstrlcpy` copies up to size - 1 characters from the NUL-terminated
+string src to dst, NUL-terminating the result.
+
+:func:`TSstrlcat` appends the NUL-terminated string src to the end of dst. It
+will append at most size - strlen(dst) - 1 bytes, NUL-terminating the
+result.
+
+:func:`TSfree` releases the memory allocated by :func:`TSmalloc` or :func:`TSrealloc`. If
+ptr is :data:`NULL`, :func:`TSfree` does no operation.
+
+See also
+========
+:manpage:`TSAPI(3ts)`


[03/11] git commit: doc: convert TSMBufferCreate(3) to sphinx

Posted by jp...@apache.org.
doc: convert TSMBufferCreate(3) to sphinx


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4b14cee2
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4b14cee2
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4b14cee2

Branch: refs/heads/master
Commit: 4b14cee2f6b68e9579ef3d2ed9b206e798da5b9f
Parents: cdddf8b
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 10:29:16 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 10:29:16 2013 -0700

----------------------------------------------------------------------
 doc/conf.py                              |  1 +
 doc/reference/api/TSMBufferCreate.en.rst | 95 +++++++++++++++++++++++++++
 2 files changed, 96 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4b14cee2/doc/conf.py
----------------------------------------------------------------------
diff --git a/doc/conf.py b/doc/conf.py
index f8b7ad8..922ee96 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -219,6 +219,7 @@ man_pages = [
    ('reference/api/TSHttpTxnMilestoneGet.en', 'TSHttpTxnMilestoneGet', u'Get a specified milestone timer value for the current transaction', None, u'3ts'),
    ('reference/api/TSIOBufferCreate.en', 'TSIOBufferCreate', u'Traffic Server IO buffer API', None, u'3ts'),
    ('reference/api/TSInstallDirGet.en', 'TSInstallDirGet', u'Return Traffic Server installation directories', None, u'3ts'),
+   ('reference/api/TSMBufferCreate.en', 'TSMBufferCreate', u'Traffic Server marshall buffer API', None, u'3ts'),
 
    ('reference/commands/traffic_cop.en', 'traffic_cop', u'Traffic Server watchdog', None, '8'),
    ('reference/commands/traffic_line.en', 'traffic_line', u'Traffic Server command line', None, '8'),

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4b14cee2/doc/reference/api/TSMBufferCreate.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/api/TSMBufferCreate.en.rst b/doc/reference/api/TSMBufferCreate.en.rst
new file mode 100644
index 0000000..600e570
--- /dev/null
+++ b/doc/reference/api/TSMBufferCreate.en.rst
@@ -0,0 +1,95 @@
+.. 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
+
+===============
+TSMBufferCreate
+===============
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+
+.. function:: TSMBuffer TSMBufferCreate(void)
+.. function:: TSReturnCode TSMBufferDestroy(TSMBuffer bufp)
+.. function:: TSReturnCode TSHandleMLocRelease(TSMBuffer bufp, TSMLoc parent, TSMLoc mloc)
+
+Description
+===========
+
+The marshal buffer or :type:`TSMBuffer` is a heap data structure that stores
+parsed URLs, MIME headers and HTTP headers. You can allocate new objects
+out of marshal buffers, and change the values within the marshal buffer.
+Whenever you manipulate an object, you require the handle to the object
+(:type:`TSMLoc`) and the marshal buffer containing the object (:type:`TSMBuffer`).
+
+Any marshal buffer fetched by :func:`TSHttpTxn*Get` will be used by other parts
+of the system. Be careful not to destroy these shared, transaction marshal buffers.
+
+:func:`TSMBufferCreate` creates a new marshal buffer and initializes
+the reference count. :func:`TSMBufferDestroy` Ignores the reference
+count and destroys the marshal buffer bufp. The internal data buffer
+associated with the marshal buffer is also destroyed if the marshal
+buffer allocated it.
+
+:func:`TSHandleMLocRelease` Releases the :type:`TSMLoc` mloc created
+from the :type:`TSMLoc` parent. If a :type:`TSMLoc` is obtained from
+a transaction, it does not have a parent :type:`TSMLoc`. Use the
+the constant :data:`TS_NULL_MLOC` as its parent.
+
+Return values
+=============
+
+:func:`TSMBufferDestroy` and :func:`TSHandleMLocRelease` return
+:data:`TS_SUCCESS` on success, or :data:`TS_ERROR` on failure.
+:func:`TSMBufferCreate` returns the new :type:`TSMBuffer`.
+
+Examples
+========
+
+::
+
+    #include <ts/ts.h>
+
+    static void
+    copyResponseMimeHdr (TSCont pCont, TSHttpTxn pTxn)
+    {
+        TSMBuffer respHdrBuf, tmpBuf;
+        TSMLoc respHttpHdrLoc, tmpMimeHdrLoc;
+
+        if (!TSHttpTxnClientRespGet(pTxn, &respHdrBuf, &respHttpHdrLoc)) {
+            TSError("couldn't retrieve client response header0);
+            TSHandleMLocRelease(respHdrBuf, TS_NULL_MLOC, respHttpHdrLoc);
+            goto done;
+        }
+
+        tmpBuf = TSMBufferCreate();
+        tmpMimeHdrLoc = TSMimeHdrCreate(tmpBuf);
+        TSMimeHdrCopy(tmpBuf, tmpMimeHdrLoc, respHdrBuf, respHttpHdrLoc);
+        TSHandleMLocRelease(tmpBuf, TS_NULL_MLOC, tmpMimeHdrLoc);
+        TSHandleMLocRelease(respHdrBuf, TS_NULL_MLOC, respHttpHdrLoc);
+        TSMBufferDestroy(tmpBuf);
+
+    done:
+        TSHttpTxnReenable(pTxn, TS_EVENT_HTTP_CONTINUE);
+    }
+
+See also
+========
+
+:manpage:`TSAPI(3ts)`


[09/11] git commit: doc: remove nroff man pages

Posted by jp...@apache.org.
doc: remove nroff man pages


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/46bb782f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/46bb782f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/46bb782f

Branch: refs/heads/master
Commit: 46bb782f15e1ec68aa3e3c01dc45c8e7c91eb0f8
Parents: 6a50da5
Author: James Peach <jp...@apache.org>
Authored: Thu Aug 1 11:54:31 2013 -0700
Committer: James Peach <jp...@apache.org>
Committed: Thu Aug 1 11:54:31 2013 -0700

----------------------------------------------------------------------
 doc/Makefile.am                     |  14 --
 doc/sdk/TSAPI.3                     | 170 -------------
 doc/sdk/TSDebug.3                   | 145 -----------
 doc/sdk/TSHttpHookAdd.3             | 150 ------------
 doc/sdk/TSHttpParserCreate.3        | 128 ----------
 doc/sdk/TSHttpTxnMilestoneGet.3     |  68 -----
 doc/sdk/TSIOBufferCreate.3          | 134 ----------
 doc/sdk/TSInstallDirGet.3           |  60 -----
 doc/sdk/TSMBufferCreate.3           | 110 ---------
 doc/sdk/TSMalloc.3                  | 153 ------------
 doc/sdk/TSPluginInit.3              |  86 -------
 doc/sdk/TSRemap.3                   | 131 ----------
 doc/sdk/TSTrafficServerVersionGet.3 | 110 ---------
 doc/sdk/TSUrlCreate.3               | 409 -------------------------------
 14 files changed, 1868 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/Makefile.am
----------------------------------------------------------------------
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 48d8d64..4715e4d 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -81,20 +81,6 @@ dist_trafficshell_DATA = \
 man1_MANS = \
   man/traffic_shell.1
 
-man3_MANS = \
-  sdk/TSAPI.3 \
-  sdk/TSDebug.3 \
-  sdk/TSHttpHookAdd.3 \
-  sdk/TSHttpParserCreate.3 \
-  sdk/TSIOBufferCreate.3 \
-  sdk/TSInstallDirGet.3 \
-  sdk/TSMBufferCreate.3 \
-  sdk/TSMalloc.3 \
-  sdk/TSPluginInit.3 \
-  sdk/TSRemap.3 \
-  sdk/TSTrafficServerVersionGet.3 \
-  sdk/TSUrlCreate.3
-
 EXTRA_DIST = \
   Doxyfile.in \
   $(dist_trafficshell_DATA)

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSAPI.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSAPI.3 b/doc/sdk/TSAPI.3
deleted file mode 100644
index 9e91a8f..0000000
--- a/doc/sdk/TSAPI.3
+++ /dev/null
@@ -1,170 +0,0 @@
-.\"  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. .\"
-.Dd December 22, 2011
-.Dt TSAPI 3ts TSAPI
-.Sh NAME
-.Nm TSAPI
-.Nd introduction to the Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.In ts/remap.h
-.Sh DESCRIPTION
-The Traffic Server API enables you to create plugins, using the C
-programming language, that customize the behavior of your Traffic
-Server installation.
-.Pp
-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:
-.Pp
-.nf
-    for (;;) {
-        event = get_next_event();
-        handle_event (event);
-    }
-.fn
-.Pp
-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.
-.Pp
-Possible uses for plugins include the following:
-.Bl -bullet
-.It
-HTTP processing plugins can filter, blacklist, authorize users or
-transform content.
-.It
-Protocol plugins can enable Traffic Server to proxy-cache
-new protocol content
-.It
-A blacklisting plugin denies attempts to access web sites that are
-off-limits.
-.It
-Append transform plugins add data to HTTP response content.
-.It
-An image conversion plugin transforms JPEG images to GIF images.
-.It
-Compression plugins send 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).
-.It
-Authorization plugins check a user's permissions to access particular
-web sites. The plugin could consult a local authorization program
-or send queries to an authorization server.
-.It
-A plugin that gathers client information from request headers and
-enters this information in a database.
-.It
-A protocol plugin listen for specific protocol requests on a
-designated port and then uses Traffic Server's proxy server & cache
-to serve client requests.
-.El
-.Sh NAMING CONVENTIONS
-The Traffic Server API adheres to the following naming conventions:
-.Bl -bullet
-.It
-The TS prefix is used for all function and variable names defined
-in the Traffic Server API.
-For example,
-.Ft TS_EVENT_NONE ,
-.Ft TSMutex ,
-and
-.Ft TSContCreate .
-.It
-Enumerated values are always written in all uppercase letters.
-For example,
-.Ft TS_EVENT_NONE
-and
-.Ft TS_VC_CLOSE_ABORT .
-.It
-Constant values are all uppercase; enumerated values can be seen
-as a subset of constants.
-For example,
-.Ft TS_URL_SCHEME_FILE
-and
-.Ft TS_MIME_FIELD_ACCEPT .
-.It
-The names of defined types are mixed-case.
-For example,
-.Ft TSHttpSsn
-and
-.Ft TSHttpTxn .
-.It
-Function names are mixed-case.
-For example,
-.Fn TSUrlCreate
-and
-.Fn TSContDestroy .
-.It
-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
-.Fn TSUrlPasswordGet .
-.It
-Common verbs like Create, Destroy, Get, Set, Copy, Find, Retrieve,
-Insert, Remove, and Delete are used only when appropriate.
-.El
-.Sh PLUGIN LOADING AND CONFIGURATION
-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,
-.Fn TSPluginInit .
-The records.config file defines the path to each
-plugin shared library.
-.Pp
-The sample plugin.config file below contains a comment line, a blank
-line, and two plugin configurations:
-.Pp
-.nf
-    # This is a comment line.
-    my-plugin.so www.junk.com www.trash.com www.garbage.com
-    some-plugin.so arg1 arg2 $proxy.config.http.cache.on
-.fn
-.Pp
-Each plugin configuration in the plugin.config file resembles a
-UNIX or DOS shell command; each line in plugin.config cannot exceed
-1023 characters.
-.Pp
-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.
-.Pp
-Plugins are loaded and initialized by Traffic Server in the order
-they appear in the plugin.config file.
-.Sh PLUGIN INITIALIZATION
-Each plugin must define an initialization function named
-.Fn TSPluginInit
-that Traffic Server invokes when the plugin is loaded.
-.Fn TSPluginInit
-is commonly used to read configuration information and
-register hooks for event notification.
-.Sh FILES
-.Pa <CONFIG_DIR>/plugin.config ,
-.Pa <CONFIG_DIR>/records.config
-.Sh SEE ALSO
-.Xr TSPluginInit 3ts
-.\" vim: set ts=4 sw=4 et :

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSDebug.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSDebug.3 b/doc/sdk/TSDebug.3
deleted file mode 100644
index bef7853..0000000
--- a/doc/sdk/TSDebug.3
+++ /dev/null
@@ -1,145 +0,0 @@
-.\"  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. .\"
-.Dd October 19, 2012
-.Dt TSDebug 3ts TSAPI
-.Sh NAME
-
-.Nm TSDebug,
-.Nm TSError,
-.Nm TSIsDebugTagSet,
-.Nm TSDebugSpecific,
-.Nm TSHttpTxnDebugSet,
-.Nm TSHttpSsnDebugSet,
-.Nm TSHttpTxnDebugGet,
-.Nm TSHttpSsnDebugGet,
-.Nm TSAssert,
-.Nm TSReleaseAssert
-.Nd Traffic Server debugging APIs
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-
-.Ft void
-.Fo TSDebug
-.Fa "const char * tag"
-.Fa "const char * format"
-.Fa ...
-.Fc
-
-.Ft void
-.Fo TSError
-.Fa "const char * tag"
-.Fa "const char * format"
-.Fa ...
-.Fc
-
-.Ft int
-.Fo TSIsDebugTagSet
-.Fa "const char * tag"
-.Fc
-
-.Ft void
-.Fo TSDebugSpecific
-.Fa "int debug_flag"
-.Fa "const char * tag"
-.Fa "const char * format"
-.Fa ...
-.Fc
-
-.Ft void
-.Fo TSHttpTxnDebugSet
-.Fa "TSHttpTxn txnp"
-.Fa "int on"
-.Fc
-
-.Ft void
-.Fo TSHttpSsnDebugSet
-.Fa "TSHttpSsn ssn"
-.Fa "int on"
-.Fc
-
-.Ft int
-.Fo TSHttpTxnDebugGet
-.Fa "TSHttpTxn txnp"
-.Fc
-
-.Ft int
-.Fo TSHttpSsnDebugGet
-.Fa "TSHttpSsn ssn"
-.Fc
-
-.Ft void
-.Fo TSAssert
-.Fa expr
-.Fc
-
-.Ft void
-.Fo TSReleaseAssert
-.Fa expr
-.Fc
-
-.Sh DESCRIPTION
-
-.Fn TSError
-is similar to
-.Fn printf
-except that instead of writing the output to the C standard output,
-it writes output to the Traffic Server error log.
-
-.Pp
-.Fn TSDebug
-is the same as
-.Fn TSError
-except that it only logs the debug message if the given debug tag
-is enabled. It writes output to the Traffic Server debug log.
-
-.Pp
-.Fn TSIsDebugSet
-returns non-zero if the given debug tag is enabled.
-
-.Pp
-In debug mode,
-.Fn TSAssert
-Traffic Server to prints the file name, line number and expression,
-and then aborts. In release mode, the expression is not removed but
-the effects of printing an error message and aborting are.
-.Fn TSReleaseAssert
-prints an error message and aborts in both release and debug mode.
-
-.Pp
-.Fn TSDebugSpecific
-emits a debug line even if the debug tag is turned off, as long as
-debug flag is enabled. This can be used in conjuction with
-.Fn TSHttpTxnDebugSet ,
-.Fn TSHttpSsnDebugSet ,
-.Fn TSHttpTxnDebugGet ,
-and
-.Fn TSHttpSsnDebugGet
-to enable debugging on specific session and transaction objects.
-
-.Sh EXAMPLES
-.nf
-#include <ts/ts.h>
-
-// Emit debug message if "tag" is enabled or the txn debug flag is set.
-TSDebugSpecifc(TSHttpTxnDebugGet(txn), "tag" ,
-        "Hello World from transaction %p", txn);
-
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts
-.\" vim: set ts=4 sw=4 et :

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSHttpHookAdd.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSHttpHookAdd.3 b/doc/sdk/TSHttpHookAdd.3
deleted file mode 100644
index fbb89b3..0000000
--- a/doc/sdk/TSHttpHookAdd.3
+++ /dev/null
@@ -1,150 +0,0 @@
-.\"  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 .\"
-.Dd December 11, 2012
-.Dt TSHttpHookAdd 3ts TSAPI
-.Sh NAME
-.Nm TSHttpHookAdd,
-.Nm TSHttpSsnHookAdd,
-.Nm TSHttpTxnHookAdd
-.Nd intercept Traffic Server events
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft "void"
-.Fo TSHttpHookAdd
-.Fa "TSHttpHookID id"
-.Fa "TSCont contp"
-.Fc
-.Ft "void"
-.Fo TSHttpSsnHookAdd
-.Fa "TSHttpSsn ssnp"
-.Fa "TSHttpHookID id"
-.Fa "TSCont contp"
-.Fc
-.Ft "void"
-.Fo TSHttpTxnHookAdd
-.Fa "TSHttpTxn txnp"
-.Fa "TSHttpHookID id"
-.Fa "TSCont contp"
-.Fc
-.Sh DESCRIPTION
-.Pp
-Hooks are points in Traffic Server transaction processing where plugins
-can step in and do some work. Registering a plugin function for
-callback amounts to adding the function to a hook. You can register
-your plugin to be called back for every single transaction, or for
-specific transactions only.
-.Pp
-HTTP transaction hooks are set on a global basis using the function
-.Fn TSHttpHookAdd .
-This means that the continuation specified as the parameter to
-.Fn TSHttpHookAdd
-is called for every transaction.
-.Fn TSHttpHookAdd
-is typically called from
-.Fn TSPluginInit
-or
-.Fn TSRemapInit .
-.Pp
-A session consists of a single client connection to Traffic Server.
-A session can consist of several transactions in succession. The
-session starts when the client connection opens, and ends when the
-connection closes.
-.Fn TSHttpSsnHookAdd
-adds
-.Fa contp
-to the end of the list of HTTP transaction hooks specified by
-.Fa id .
-This means that
-.Fa contp
-is called back for every transaction within the session, at the
-point specified by the hook ID. Since
-.Fa contp
-is added to a session, it is not possible to call
-.Fn TSHttpSsnHookAdd
-from the plugin initialization routine; the plugin needs a handle
-to an HTTP session.
-
-.Pp
-A transaction consists of a single HTTP request from a client and
-the response that Traffic Server sends to that client. A transaction
-begins when Traffic Server receives a request, and ends when Traffic
-Server sends the response.
-.Fn TSHttpTxnHookAdd
-adds
-.Fa contp
-to the end of the list of HTTP transaction hooks specified by
-.Fa id .
-Since
-.Fa contp
-is added to a transaction, it is not possible to call
-.Fn TSHttpTxnHookAdd
-from the plugin initialization routine but only when the plugin has
-a handle to an HTTP transaction.
-
-.Sh RETURN VALUES
-None. Adding hooks is always successful.
-.Sh EXAMPLES
-.nf
-#include <ts/ts.h>
-
-static void
-txn_handler (TSHttpTxn txnp, TSCont contp)
-{
-    //handle transaction
-}
-
-static void
-handle_session (TSHttpSsn ssnp, TSCont contp)
-{
-    TSHttpSsnHookAdd (ssnp, TS_HTTP_TXN_START_HOOK, contp);
-}
-
-static int
-ssn_handler (TSCont contp, TSEvent event, void *edata)
-{
-    TSHttpSsn ssnp;
-    TSHttpTxn txnp;
-
-    switch (event){
-    case TS_EVENT_HTTP_SSN_START:
-       ssnp = (TSHttpSsn) edata;
-       handle_session (ssnp, contp);
-       TSHttpSsnReenable (ssnp, TS_EVENT_HTTP_CONTINUE);
-       return 0;
-    case TS_EVENT_HTTP_TXN_START:
-       txnp = (TSHttpTxn) edata;
-       txn_handler (txnp, contp);
-       TSHttpTxnReenable (txnp, TS_EVENT_HTTP_CONTINUE);
-       return 0;
-    default:
-         break;
-    }
-
-    return 0;
-}
-
-void
-TSPluginInit (int argc, const char *argv[])
-{
-    TSCont contp;
-    contp = TSContCreate (ssn_handler, NULL);
-    TSHttpHookAdd (TS_HTTP_SSN_START_HOOK, contp);
-}
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts ,
-.Xr TSContCreate 3ts

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSHttpParserCreate.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSHttpParserCreate.3 b/doc/sdk/TSHttpParserCreate.3
deleted file mode 100644
index f517045..0000000
--- a/doc/sdk/TSHttpParserCreate.3
+++ /dev/null
@@ -1,128 +0,0 @@
-.\"  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 .\"
-.Dd February 14, 2013
-.Dt TSHttpParserCreate 3ts TSAPI
-.Sh NAME
-.Nm TSHttpParserCreate,
-.Nm TSHttpHdrParseReq,
-.Nm TSHttpHdrParseResp,
-.Nm TSHttpParserClear,
-.Nm TSHttpParserDestroy
-.Nd Parse HTTP headers from memory buffers
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft "TSHttpParser"
-.Fo TSHttpParserCreate
-.Fa "void"
-.Fc
-.Ft "TSParseResult"
-.Fo TSHttpHdrParseReq
-.Fa "TSHttpParser parser"
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char** start"
-.Fa "const char* end"
-.Fc
-.Ft "TSParseResult"
-.Fo TSHttpHdrParseResp
-.Fa "TSHttpParser parser"
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char** start"
-.Fa "const char* end"
-.Fc
-.Ft "void"
-.Fo TSHttpParserClear
-.Fa "TSHttpParser parser"
-.Fc
-.Ft "void"
-.Fo TSHttpParserDestroy
-.Fa "TSHttpParser parser"
-.Fc
-.Sh DESCRIPTION
-.Fn TSHttpParserCreate
-creates an HTTP parser object. The parser's data structure contains
-information about the header being parsed. A single HTTP parser can
-be used multiple times, though not simultaneously. Before being
-used again, the parser must be cleared by calling
-.Fn TSHttpParserClear .
-
-.Pp
-.Fn TSHttpHdrParseReq
-parses an HTTP request header. The HTTP header
-.Fa offset
-must already be created, and must reside inside the marshal buffer
-.Fa bufp .
-The
-.Fa start
-argument points to the current position of the string
-buffer being parsed and the
-.Fa end
-argument points to one byte after the end of the buffer to be parsed.
-On return,
-.Fa start
-is modified to point past the last character parsed.
-.Pp
-It is possible to parse an HTTP request header a single byte at a
-time using repeated calls to TSHttpHdrParseReq. As long as an error
-does not occur, the TSHttpHdrParseReq function will consume that
-single byte and ask for more.
-.Fn TSHttpHdrParseReq
-should be called after
-.Fa TS_HTTP_READ_REQUEST_HDR_HOOK .
-
-.Pp
-.Fn TSHttpHdrParseResp
-operates in the same manner as
-.Fn TSHttpHdrParseReq
-except it parses an HTTP response header. It should be called after
-.Fa TS_HTTP_READ_RESPONSE_HDR_HOOK .
-
-.Pp
-.Fn TSHttpParserDestroy
-clears the specified HTTP parser so it may be used again.
-.Pp
-.Fn TSHttpParserDestroy
-destroys the TSHttpParser object pointed to by
-.Fa parser .
-The 
-.Fa parser
-pointer must not be NULL.
-.Fn 
-.Sh RETURN VALUES
-.Fn TSHttpHdrParseReq
-and
-.Fn TSHttpHdrParseResp
-both return a TSParseResult value.
-.Fa TS_PARSE_ERROR
-is returned on error,
-.Fa TS_PARSE_CONT 
-is returned if parsing of the header stopped because the end of the buffer was
-reached, and
-.Fa TS_PARSE_DONE
-or
-.Fa TS_PARSE_OK
-when a \\r\\n\\r\\n pattern is encountered, indicating the end of the header.
-.Sh BUGS
-The distinction between the
-.Fa TS_PARSE_DONE
-and
-.Fa TS_PARSE_OK
-is not well-defined. Plugins should expect both status codes and treat them
-equivalently.
-.Sh SEE ALSO
-.Xr TSAPI 3ts

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSHttpTxnMilestoneGet.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSHttpTxnMilestoneGet.3 b/doc/sdk/TSHttpTxnMilestoneGet.3
deleted file mode 100644
index c97e798..0000000
--- a/doc/sdk/TSHttpTxnMilestoneGet.3
+++ /dev/null
@@ -1,68 +0,0 @@
-.\"  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 .\"
-.Dd February 25, 2013
-.Dt TSHttpTxnMilestoneGet 3ts TSAPI
-.Sh NAME
-.Nm TSHttpTxnMilestoneGet
-.Nd Get a specified milestone timer value for the current transaction.
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft "TSReturnCode"
-.Fo TSHttpTxnMilestoneGet
-.Fa "TSHttpTxn txnp"
-.Fa "TSMilestonesType milestone"
-.Fa "TSHRTime *time"
-.Fc
-.Sh DESCRIPTION
-The TSHttpTxnMilestoneGet API will fetch a specific milestone timer value
-for the current request (txnp). These timers are calculated during the lifetime
-of a transaction, and are all in TSHRTime (nanosecons), meassured from the
-beginning of the transaction. The time argument is a pointer to a valid
-TSHRtime storage, and is set upon success.
-.Pp
-The supported TSMilestonesType milestone types are
-.Pp
-.Bl -tag -width "TS_MILESTONE_SERVER_READ_HEADER_DONE" -compact -offset indent
-.It TS_MILESTONE_UA_BEGIN
-.It TS_MILESTONE_UA_READ_HEADER_DONE
-.It TS_MILESTONE_UA_BEGIN_WRITE
-.It TS_MILESTONE_UA_CLOSE
-.It TS_MILESTONE_SERVER_FIRST_CONNECT
-.It TS_MILESTONE_SERVER_CONNECT
-.It TS_MILESTONE_SERVER_CONNECT_END
-.It TS_MILESTONE_SERVER_BEGIN_WRITE
-.It TS_MILESTONE_SERVER_FIRST_READ
-.It TS_MILESTONE_SERVER_READ_HEADER_DONE
-.It TS_MILESTONE_SERVER_CLOSE
-.It TS_MILESTONE_CACHE_OPEN_READ_BEGIN
-.It TS_MILESTONE_CACHE_OPEN_READ_END
-.It TS_MILESTONE_CACHE_OPEN_WRITE_BEGIN
-.It TS_MILESTONE_CACHE_OPEN_WRITE_END
-.It TS_MILESTONE_DNS_LOOKUP_BEGIN
-.It TS_MILESTONE_DNS_LOOKUP_END
-.It TS_MILESTONE_SM_START
-.It TS_MILESTONE_SM_FINISH
-.It TS_MILESTONE_LAST_ENTRY
-.El
-.Sh RETURN VALUES
-Success or error.
-.Sh EXAMPLES
-.nf
-#include <ts/ts.h>
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSIOBufferCreate.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSIOBufferCreate.3 b/doc/sdk/TSIOBufferCreate.3
deleted file mode 100644
index cee3243..0000000
--- a/doc/sdk/TSIOBufferCreate.3
+++ /dev/null
@@ -1,134 +0,0 @@
-.\"  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 .\"
-.Dd January 25, 2013
-.Dt TSIOBufferCreate 3ts TSAPI
-.Sh NAME
-.Nm TSIOBufferCreate,
-.Nm TSIOBufferSizedCreate,
-.Nm TSIOBufferDestroy,
-.Nm TSIOBufferWrite,
-.Nm TSIOBufferProduce,
-.Nm TSIOBufferWaterMarkGet,
-.Nm TSIOBufferWaterMarkSet
-.Nd Traffic Server IO Buffer API
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft "TSIOBuffer"
-.Fo TSIOBufferCreate
-.Fa "void"
-.Fc
-.Ft "TSIOBuffer"
-.Fo TSIOBufferSizedCreate
-.Fa "TSIOBufferSizeIndex index"
-.Fc
-.Ft "void"
-.Fo TSIOBufferDestroy
-.Fa "TSIOBuffer bufp"
-.Fc
-.Ft "int64_t"
-.Fo TSIOBufferWrite
-.Fa "TSIOBuffer bufp"
-.Fa "const void* buf"
-.Fa "int64_t length"
-.Fc
-.Ft "void"
-.Fo TSIOBufferProduce
-.Fa "TSIOBuffer bufp"
-.Fa "int64_t nbytes"
-.Fc
-.Ft "int64_t"
-.Fo TSIOBufferWaterMarkGet
-.Fa "TSIOBuffer bufp"
-.Fc
-.Ft "void"
-.Fo TSIOBufferWaterMarkSet
-.Fa "TSIOBuffer bufp"
-.Fa "int64_t water_mark"
-.Fc
-.Sh DESCRIPTION
-.Pp
-The TSIOBuffer data structure is the building block of the TSVConn
-abstraction. An IO buffer is composed of a list of buffer blocks
-which are reference counted so that they can reside in multiple
-buffers at the same time. This makes it extremely efficient to copy
-data from one IO buffer to another using TSIOBufferCopy since Traffic
-Server only needs to copy pointers and adjust reference counts
-appropriately and not actually copy any data; however applications
-should still strive to ensure data blocks are a reasonable size.
-.Pp
-The IO buffer abstraction provides for a single writer and multiple
-readers. In order for the readers to have no knowledge of each
-other, they manipulate IO buffers through the TSIOBufferReader
-data structure. Since only a single writer is allowed, there is no
-corresponding TSIOBufferWriter data structure. The writer simply
-modifies the IO buffer directly.
-.Pp
-.Fn TSIOBufferCreate
-creates an empty TSIOBuffer.
-.Pp
-.Fn TSIOBufferSizedCreate
-creates an empty TSIOBuffer with an initial capacity of
-.Fa index
-bytes.
-.Pp
-.Fn TSIOBufferDestroy
-destroys the IO buffer
-.Fa bufp .
-Since multiple IO buffers can share data, this does not necessarily free
-all of the data associated with the IO buffer but simply decrements
-the appropriate reference counts.
-.Pp
-.Fn TSIOBufferWrite
-appends
-.Fa length
-bytes
-from the buffer
-.Fa buf
-to the IO buffer
-.Fa bufp
-and returns the number of bytes successfully written into the IO buffer.
-.Pp
-.Fn TSIOBufferProduce
-makes
-.Fa nbytes
-of data available for reading in the IO buffer
-.Fa bufp .
-A common pattern for writing to an IO buffer is to copy data into
-a buffer block and then call INKIOBufferProduce to make the new
-data visible to any readers.
-.Pp
-The watermark of an TSIOBuffer is the minimum number of bytes of
-data that have to be in the buffer before calling back any continuation
-that has initiated a read operation on this buffer.  As a writer
-feeds data into the TSIOBuffer, no readers are called back until
-the amount of data reaches the watermark. Setting a watermark can
-improve performance because it avoids frequent callbacks to read
-small amounts of data.
-.Pp
-.Fn TSIOBufferWaterMarkGet
-gets the current watermark for the IO buffer
-.Fa bufp .
-.Pp
-.Fn TSIOBufferWaterMarkSet
-gets the current watermark for the IO buffer
-.Fa bufp
-to
-.Fa water_mark
-bytes.
-.Sh SEE ALSO
-.Xr TSAPI 3ts ,
-.Xr TSIOBufferReaderAlloc 3ts

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSInstallDirGet.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSInstallDirGet.3 b/doc/sdk/TSInstallDirGet.3
deleted file mode 100644
index 9ebcbf0..0000000
--- a/doc/sdk/TSInstallDirGet.3
+++ /dev/null
@@ -1,60 +0,0 @@
-.\"  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 .\"
-.Dd November 23, 2012
-.Dt TSInstallDirGet 3ts TSAPI
-.Sh NAME
-.Nm TSInstallDirGet,
-.Nm TSConfigDirGet,
-.Nm TSPluginDirGet
-.Nd Return Traffic Server installation directories
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft "const char*"
-.Fo TSInstallDirGet
-.Fa "void"
-.Fc
-.Ft "const char*"
-.Fo TSConfigDirGet
-.Fa "void"
-.Fc
-.Ft "const char*"
-.Fo TSPluginDirGet
-.Fa "void"
-.Fc
-.Sh DESCRIPTION
-.Fn TSInstallDirGet
-returns the path to the root of the Traffic Server installation.
-.Fn TSConfigDirGet
-and
-.Fn TSPluginDirGet
-return the complete, absolute path to the configuration directory
-and the plugin installation directory respectively.
-.Sh RETURN VALUES
-These functions all return a NUL-terminated string that must not be modified or
-freed.
-.Sh EXAMPLES
-To load a file that is located in the Traffic Server configuration directory:
-.Pp
-.nf
-#include <ts/ts.h>
-#include <stdio.h>
-
-char * path;
-asprintf(&path, "%s/example.conf", TSConfigDirGet());
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSMBufferCreate.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSMBufferCreate.3 b/doc/sdk/TSMBufferCreate.3
deleted file mode 100644
index 0d2a0c7..0000000
--- a/doc/sdk/TSMBufferCreate.3
+++ /dev/null
@@ -1,110 +0,0 @@
-.\"  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 .\"
-.Dd October 25, 2012
-.Dt TSMBufferCreate 3ts TSAPI
-.Sh NAME
-.Nm TSMBufferCreate,
-.Nm TSMBufferDestroy,
-.Nm TSHandleMLocRelease
-.Nd Traffic Server marshall buffers
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft "TSMBuffer"
-.Fo TSMBufferCreate
-.Fa "void"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSMBufferDestroy
-.Fa "TSMBuffer bufp"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSHandleMLocRelease
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc parent"
-.Fa "TSMLoc mloc"
-.Fc
-.Sh DESCRIPTION
-The marshal buffer or TSMBuffer is a heap data structure that
-stores parsed URLs, MIME headers and HTTP headers. You can allocate
-new objects out of marshal buffers, and change the values within
-the marshal buffer. Whenever you manipulate an object, you require
-the handle to the object (TSMLoc) and the marshal buffer containing
-the object (TSMBuffer).
-.Pp
-Any marshal buffer fetched by
-.Fn TSHttpTxn*Get
-will be used by other parts of the system. Be careful not to destroy these shared, transaction marshal buffers.
-
-.Fn TSMBufferCreate
-creates a new marshal buffer and initializes the reference count.
-.Fn TSMBufferDestroy
-Ignores the reference count and destroys the marshal buffer
-.Fa bufp .
-The internal data buffer associated with the marshal buffer is also
-destroyed if the marshal buffer allocated it.
-
-.Fn TSHandleMLocRelease
-Releases the TSMLoc
-.Fa mloc
-created from the TSMLoc
-.Fa parent .
-If a TSMLoc is obtained from a transaction, it does not have a parent
-TSMLoc. Use the the constant
-.Fa TS_NULL_MLOC
-as its parent.
-
-.Sh RETURN VALUES
-.Fn TSMBufferDestroy
-and 
-.Fn TSHandleMLocRelease 
-return
-.Fa TS_SUCCESS
-on success, or
-.Fa TS_ERROR
-on failure.
-.Fn TSMBufferCreate
-returns the new TSMBuffer.
-
-.Sh EXAMPLES
-.nf
-#include <ts/ts.h>
-
-static void
-copyResponseMimeHdr (TSCont pCont, TSHttpTxn pTxn)
-{
-  TSMBuffer respHdrBuf, tmpBuf;
-  TSMLoc respHttpHdrLoc, tmpMimeHdrLoc;
-
-  if (!TSHttpTxnClientRespGet(pTxn, &respHdrBuf, &respHttpHdrLoc)) {
-    TSError("couldn't retrieve client response header\n");
-    TSHandleMLocRelease(respHdrBuf, TS_NULL_MLOC, respHttpHdrLoc);
-    goto done;
-  }
-
-  tmpBuf = TSMBufferCreate();
-  tmpMimeHdrLoc = TSMimeHdrCreate(tmpBuf);
-  TSMimeHdrCopy(tmpBuf, tmpMimeHdrLoc, respHdrBuf, respHttpHdrLoc);
-  TSHandleMLocRelease(tmpBuf, TS_NULL_MLOC, tmpMimeHdrLoc);
-  TSHandleMLocRelease(respHdrBuf, TS_NULL_MLOC, respHttpHdrLoc);
-  TSMBufferDestroy(tmpBuf);
-
-done:
-  TSHttpTxnReenable(pTxn, TS_EVENT_HTTP_CONTINUE);
-}
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSMalloc.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSMalloc.3 b/doc/sdk/TSMalloc.3
deleted file mode 100644
index 51b7e20..0000000
--- a/doc/sdk/TSMalloc.3
+++ /dev/null
@@ -1,153 +0,0 @@
-.\"  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. .\"
-.Dd October 19, 2012
-.Dt TSMalloc 3ts TSAPI
-.Sh NAME
-
-.Nm TSMalloc,
-.Nm TSrealloc,
-.Nm TSstrdup,
-.Nm TSstrndup,
-.Nm TSstrlcpy,
-.Nm TSstrlcat,
-.Nm TSfree
-.Nd TrafficServer memory allocation APIs
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-
-.Ft "void *"
-.Fo TSmalloc
-.Fa "size_t size"
-.Fa "const char * path"
-.Fc
-
-.Ft "void *"
-.Fo TSrealloc
-.Fa "void * ptr"
-.Fa "size_t size"
-.Fa "const char * path"
-.Fc
-
-.Ft "char *"
-.Fo TSstrdup
-.Fa "const char * str"
-.Fa "int64_t length"
-.Fa "const char * path"
-.Fc
-
-.Ft size_t
-.Fo TSstrlcpy
-.Fa "char * dst"
-.Fa "const char * src"
-.Fa "size_t size"
-.Fc
-
-.Ft size_t
-.Fo TSstrlcat
-.Fa "char * dst"
-.Fa "const char * src"
-.Fa "size_t size"
-.Fc
-
-.Ft void
-.Fo TSfree
-.Fa "void * ptr"
-.Fc
-
-.Sh DESCRIPTION
-Traffic Server provides a number of routines for allocating and freeing
-memory. These routines correspond to similar routines in the C
-library. For example, 
-.Fn TSrealloc
-behaves like the C library routine
-.Fn realloc .
-There are two reasons to use the routines provided by
-Traffic Server. The first is portability. The Traffic Server API routines
-behave the same on all of Traffic Server’s supported platforms. For
-example,
-.Fn realloc
-does not accept an argument of NULL on some
-platforms. The second reason is that the Traffic Server routines
-actually track the memory allocations by file and line number. This
-tracking is very efficient, is always turned on, and is useful for
-tracking down memory leaks.
-
-.Fn TSmalloc
-returns a pointer to
-.Fa size
-bytes of memory allocated from the heap. Traffic Server uses 
-.Fn TSmalloc
-internally for memory allocations.
-Always use 
-.Fn TSfree
-to release memory allocated by 
-.Fn TSmalloc ; do not
-use
-.Fn free .
-
-.Fn TSstrdup
-returns a pointer to a new string that is a duplicate of the string
-pointed to by
-.Fa str .
-The memory for the new string is allocated using
-.Fn TSMalloc
-and should be freed by a call to
-.Fn TSfree .
-
-.Fn TSstrndup
-returns a pointer to a new string that is a duplicate of the string
-pointed to by
-.Fa str
-and
-.Fa length
-bytes long. The new string will be
-NULL-terminated. This API is very useful for transforming non NULL-terminated string values returned by APIs such as
-.Fn TSMimeHdrFieldStringValueGet
-into NULL-terminated string values. The memory for the new string is allocated using
-.Fn TSmalloc and
-should be freed by a call to
-.Fn TSfree .
-
-.Fn TSstrlcpy
-copies up to
-.Fa size
-- 1 characters from the NULL-terminated string
-.Fa src
-to
-.Fa dst ,
-NULL-terminating the result.
-
-.Fn TSstrlcat
-appends the NULL-terminated string src to the end of dst. It will append at most
-.Fa size
-- strlen(dst) - 1 bytes, NULL-terminating the result.
-
-.Fn TSfree
-releases the memory allocated by
-.Fn Tsmalloc
-or
-.Fn TSrealloc .
-If
-.Fa ptr
-is NULL,
-.Fn TSfree
-does no operation.
-
-.Sh SEE ALSO
-.Xr TSAPI 3ts
-.\" vim: set ts=4 sw=4 et :

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSPluginInit.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSPluginInit.3 b/doc/sdk/TSPluginInit.3
deleted file mode 100644
index a040c8a..0000000
--- a/doc/sdk/TSPluginInit.3
+++ /dev/null
@@ -1,86 +0,0 @@
-.\"  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 .\"
-.Dd October 25, 2012
-.Dt TSPluginInit 3ts TSAPI
-.Sh NAME
-.Nm TSPluginInit,
-.Nm TSPluginRegister,
-.Nd Traffic Server plugin loading and registration
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft void
-.Fo TSPluginInit
-.Fa "int argc"
-.Fa "const char* argv[]"
-.Fc
-.Ft TSReturnCode
-.Fo TSPluginRegister
-.Fa "TSSDKVersion sdk_version"
-.Fa "TSPluginRegistrationInfo* plugin_info"
-.Fc
-.Sh DESCRIPTION
-
-.Fn TSPluginInit
-must be defined by all plugins. Traffic Server calls this initialization routine
-when it loads the plugin and sets
-.Fa argc
-and
-.Fa argv
-appropriately based on the values in plugin.config.
-.Fa argc
-is a count of the number of arguments in the argument vector,
-.Fa argv .
-The count is at least one because the first argument in the argument vector is the plugin’s name, which must exist in order for the plugin to be loaded.
-.Fa argv
-is the vector of arguments. The number of arguments in the vector is
-.Fa argc ,
-and
-.Fa argv[0]
-always contains the name of the plugin shared library.
-
-.Fn TSPluginRegister
-registers the appropriate SDK version for your plugin. Use this function to
-make sure that the version of Traffic Server on which your plugin is running
-supports the plugin.
-
-.Sh RETURN VALUES
-.Fn TSPluginRegister
-returns
-.Fa TS_ERROR
-if the plugin registration failed.
-
-.Sh EXAMPLES
-.nf
-#include <ts/ts.h>
-
-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 (TS_SDK_VERSION_2_0 , &info) != TS_SUCCESS) {
-         TSError ("Plugin registration failed. \n");
-      }
-}
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts ,
-.Xr TSInstallDirGet 3ts

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSRemap.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSRemap.3 b/doc/sdk/TSRemap.3
deleted file mode 100644
index db0e329..0000000
--- a/doc/sdk/TSRemap.3
+++ /dev/null
@@ -1,131 +0,0 @@
-.\"  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 .\"
-.Dd October 30, 2012
-.Dt TSRemapInit 3ts TSAPI
-.Sh NAME
-.Nm TSRemapInit,
-.Nm TSRemapDone,
-.Nm TSRemapDoRemap,
-.Nm TSRemapNewInstance,
-.Nm TSRemapDeleteInstance,
-.Nm TSRemapOSResponse
-.Nd remap plugin entry points
-.Sh LIBRARY
-Apache Traffic Server remap plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.In ts/remap.h
-.Ft "TSReturnCode"
-.Fo TSRemapInit
-.Fa "TSRemapInterface* api_info"
-.Fa "char* errbuf"
-.Fa "int errbuf_size"
-.Fc
-.Ft "void"
-.Fo TSRemapDone
-.Fa "void"
-.Fc
-.Ft "TSRemapStatus"
-.Fo TSRemapDoRemap
-.Fa "void* ih"
-.Fa "TSHttpTxn rh"
-.Fa "TSRemapRequestInfo* rri"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSRemapNewInstance
-.Fa "int argc"
-.Fa "char* argv[]"
-.Fa "void** ih"
-.Fa "char* errbuf"
-.Fa "int errbuf_size"
-.Fc
-.Ft "void"
-.Fo TSRemapDeleteInstance
-.Fa "void*"
-.Fc
-.Ft "void"
-.Fo TSRemapOSResponse
-.Fa "void* ih"
-.Fa "TSHttpTxn rh"
-.Fa "int os_response_type"
-.Fc
-.Sh DESCRIPTION
-The Traffic Server remap interface provides a simplified mechanism
-for plugins to manipulate HTTP transactions. A remap plugin is not
-global; it is configured on a per-remap rule basis, which enables
-you to customize how URLs are redirected based on individual rules
-in the remap.config file. Writing a remap plugin consists of implementing one
-or more of the remap entry points and configuring the remap.config
-configuration file to route the transaction through your plugin. Multiple
-remap plugins can be specified for a single remap rule, resulting in a remap
-plugin chain where each pligin is given an opportunity to examine the HTTP
-transaction.
-.Pp
-.Fn TSRemapInit
-is a required entry point. This function will be called once when Traffic
-Server loads the plugin. If the optional
-.Fn TSRemapDone
-entry point is available, Traffic Server will call then when unloading the
-remap plugin.
-.Pp
-A remap plugin may be invoked for different remap rules. Traffic Server will
-call the
-.fn TSRemapNewInstance
-entry point each time a plugin is specified in a remap rule. When a remap
-plugin instance is no longer required, Traffic Server will call
-.Fn TSRemapDeleteInstance .
-.Pp
-.Fn TSRemapDoRemap
-is called for each HTTP transaction. This is a mandatory entry point. In this
-function, the remap plugin may examine and modify the HTTP transaction.
-.Sh RETURN VALUES
-.Fn TSRemapInit
-and
-.Fn TSRemapNewInstance
-should return
-.Fa TS_SUCCESS
-on success, and
-.Fa TS_ERROR
-otherwise. A return value of
-.Fa TS_ERROR
-is unrecoverable.
-.Pp
-.Fn TSRemapDoRemap
-returns a status code that indicates whether the HTTP transaction has been
-modified and whether Traffic Server should continue to evaluate the chain of
-remap plugins. If the transaction was modified, the plugin should return
-.Fa TSREMAP_DID_REMAP
-or
-.Fa TSREMAP_DID_REMAP_STOP ;
-otherwise it should return
-.Fa TSREMAP_NO_REMAP
-or
-.Fa TSREMAP_NO_REMAP_STOP .
-If Traffic Server should not send the transaction to subsequent plugins in the
-remap chain, return
-.Fa TSREMAP_NO_REMAP_STOP
-or
-.Fa TSREMAP_DID_REMAP_STOP .
-Returning
-.Fa TSREMAP_ERROR
-causes Traffic Server to stop evaluating the remap chain and respond with an
-error.
-.Sh EXAMPLES
-.nf
-#include <ts/ts.h>
-#include <ts/remap.h>
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSTrafficServerVersionGet.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSTrafficServerVersionGet.3 b/doc/sdk/TSTrafficServerVersionGet.3
deleted file mode 100644
index da41211..0000000
--- a/doc/sdk/TSTrafficServerVersionGet.3
+++ /dev/null
@@ -1,110 +0,0 @@
-.\"  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. .\"
-.Dd December 22, 2011
-.Dt TSTrafficServerVersionGet 3ts TSAPI
-.Sh NAME
-.Nm TSTrafficServerVersionGet,
-.Nm TSTrafficServerVersionGetMajor,
-.Nm TSTrafficServerVersionGetMinor,
-.Nm TSTrafficServerVersionGetMajor
-.Nd return TrafficServer version information
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft "const char *"
-.Fo TSTrafficServerVersionGet
-.Fa void
-.Fc
-.Ft "int"
-.Fo TSTrafficServerVersionGetMajor
-.Fa void
-.Fc
-.Ft "int"
-.Fo TSTrafficServerVersionGetMinor
-.Fa void
-.Fc
-.Ft "int"
-.Fo TSTrafficServerVersionGetPatch
-.Fa void
-.Fc
-.Sh DESCRIPTION
-.Fn TSTrafficServerVersionGet
-returns the string that indicates the release version of Traffic
-Server running the plugin.
-.Sh "RETURN VALUES"
-.Fn TSTrafficServerVersionGet
-returns a pointer to a string of characters that indicates the Traffic
-Server release version. This string must not be modified.
-.Pp
-The other APIs return an integer version number.
-.Sh EXAMPLE
-.nf
-#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(TS_SDK_VERSION_2_0 , &info) != TS_SUCCESS) {
-        TSError("Plugin registration failed. \n");
-    }
-
-    if (!check_ts_version()) {
-        TSError("Plugin requires Traffic Server 2.0 or later\n");
-        return;
-    }
-
-    TSDebug("debug-hello", "Hello World!\n");
-}
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts
-.\" vim: set ts=4 sw=4 et :

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/46bb782f/doc/sdk/TSUrlCreate.3
----------------------------------------------------------------------
diff --git a/doc/sdk/TSUrlCreate.3 b/doc/sdk/TSUrlCreate.3
deleted file mode 100644
index 01ec98a..0000000
--- a/doc/sdk/TSUrlCreate.3
+++ /dev/null
@@ -1,409 +0,0 @@
-.\"  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 .\"
-.Dd October 25, 2012
-.Dt TSUrlCreate 3ts TSAPI
-.Sh NAME
-.Nm TSUrlCreate,
-.Nm TSUrlClone,
-.Nm TSUrlCopy,
-.Nm TSUrlPrint,
-.Nm TSUrlParse,
-.Nm TSUrlLengthGet,
-.Nm TSUrlStringGet,
-.Nm TSUrlSchemeGet,
-.Nm TSUrlSchemeSet,
-.Nm TSUrlUserGet,
-.Nm TSUrlUserSet,
-.Nm TSUrlPasswordGet,
-.Nm TSUrlPasswordSet,
-.Nm TSUrlHostGet,
-.Nm TSUrlHostSet,
-.Nm TSUrlPortGet,
-.Nm TSUrlPortSet,
-.Nm TSUrlPathGet,
-.Nm TSUrlPathSet,
-.Nm TSUrlHttpParamsGet,
-.Nm TSUrlHttpParamsSet,
-.Nm TSUrlHttpQueryGet,
-.Nm TSUrlHttpQuerySet,
-.Nm TSUrlHttpFragmentGet,
-.Nm TSUrlHttpFragmentSet,
-.Nm TSStringPercentEncode,
-.Nm TSUrlPercentEncode,
-.Nm TSStringPercentDecode
-.Nd Traffic Server URL manipulation API
-.Sh LIBRARY
-Apache Traffic Server plugin API
-.Sh SYNOPSIS
-.In ts/ts.h
-.Ft "TSReturnCode"
-.Fo TSUrlCreate
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc* locp"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlClone
-.Fa "TSMBuffer dest_bufp"
-.Fa "TSMBuffer src_bufp"
-.Fa "TSMLoc src_url"
-.Fa "TSMLoc* locp"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlCopy
-.Fa "TSMBuffer dest_bufp"
-.Fa "TSMLoc dest_url"
-.Fa "TSMBuffer src_bufp"
-.Fa "TSMLoc src_url"
-.Fc
-.Ft "void"
-.Fo TSUrlPrint
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "TSIOBuffer iobufp"
-.Fc
-.Ft "TSParseResult"
-.Fo TSUrlParse
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char** start"
-.Fa "const char* end"
-.Fc
-.Ft "int"
-.Fo TSUrlLengthGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fc
-.Ft "char*"
-.Fo TSUrlStringGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int* length"
-.Fc
-.Ft "const char*"
-.Fo TSUrlSchemeGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int *length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlSchemeSet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char* value"
-.Fa "int length"
-.Fc
-.Ft "const char*"
-.Fo TSUrlUserGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int* length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlUserSet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char* value"
-.Fa "int length"
-.Fc
-.Ft "const char*"
-.Fo TSUrlPasswordGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int* length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlPasswordSet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char* value"
-.Fa "int length"
-.Fc
-.Ft "const char*"
-.Fo TSUrlHostGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int* length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlHostSet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char* value"
-.Fa "int length"
-.Fc
-.Ft "int"
-.Fo TSUrlPortGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlPortSet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int port"
-.Fc
-.Ft "const char*"
-.Fo TSUrlPathGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int* length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlPathSet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char* value"
-.Fa "int length"
-.Fc
-.Ft "const char*"
-.Fo TSUrlHttpParamsGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int* length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlHttpParamsSet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char* value"
-.Fa "int length"
-.Fc
-.Ft "const char*"
-.Fo TSUrlHttpQueryGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int* length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlHttpQuerySet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char* value"
-.Fa "int length"
-.Fc
-.Ft "const char*"
-.Fo TSUrlHttpFragmentGet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "int* length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlHttpFragmentSet
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "const char* value"
-.Fa "int length"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSStringPercentEncode
-.Fa "const char *str"
-.Fa "int str_len"
-.Fa "char *dst"
-.Fa "size_t dst_size"
-.Fa "size_t *length"
-.Fa "const unsigned char *map"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSUrlPercentEncode
-.Fa "TSMBuffer bufp"
-.Fa "TSMLoc offset"
-.Fa "char *dst"
-.Fa "size_t dst_size"
-.Fa "size_t *length"
-.Fa "const unsigned char *map"
-.Fc
-.Ft "TSReturnCode"
-.Fo TSStringPercentDecode
-.Fa "const char *str"
-.Fa "size_t str_len"
-.Fa "char *dst"
-.Fa "size_t dst_size"
-.Fa "size_t *length"
-.Fc
-
-.Sh DESCRIPTION
-The URL data structure is a parsed version of a standard internet
-URL. The Traffic Server URL API provides access to URL data
-stored in marshal buffers. The URL functions can create, copy,
-retrieve or delete entire URLs, and retrieve or modify parts of
-URLs, such as their port or scheme information.
-
-.Fn TSURLCreate
-creates a new URL within the marshal buffer
-.Fa bufp. Release the resulting handle with a call to
-.Fa TSHandleMLocRelease .
-
-.Pp
-.Fn TSUrlClone
-copies the contents of the URL at location
-.Fa src_url
-within the marshal buffer
-.Fa src_bufp
-to a location within the marshal buffer
-.Fa dest_bufp .
-Release the returned handle with a call to
-.Fn TSHandleMLocRelease .
-
-.Pp
-.Fn TSUrlCopy,
-copies the contents of the URL at location
-.Fa src_url
-within the marshal buffer
-.Fa src_bufp
-to the location
-.Fa dest_url
-within the marshal buffer
-.Fa dest_bufp .
-.Fn TSUrlCopy
-works correctly even if
-.Fa src_bufp
-and
-.Fa dest_bufp
-point to different marshal buffers. It is important
-for the destination URL (its marshal buffer and TSMLoc) to have
-been created before copying into it.
-
-.Pp
-.Fn TSUrlPrint
-formats a URL stored in an TSMBuffer to an TSIOBuffer.
-
-.Pp
-.Fn TSUrlParse
-parses a URL. The
-.Fa start
-pointer is both an input and an output
-parameter and marks the start of the URL to be parsed. After a
-successful parse, the
-.Fa start
-pointer equals the
-.Fa end
-pointer. The
-.Fa end
-pointer must be one byte after the last character you want to
-parse. The URL parsing routine assumes that everything between start
-and end is part of the URL. It is up to higher level parsing routines,
-such as
-.Fn TSHttpHdrParseReq ,
-to determine the actual end of the URL.
-
-.Pp
-.Fn TSUrlLengthGet
-calculates the length of the URL located at
-.Fa offset
-within the marshal buffer
-.Fa bufp
-if it were returned as a string. This length will be the same as the length returned by
-.Fn TSUrlStringGet .
-
-.Fn TSUrlStringGet
-constructs a string representation of the URL located at
-.Fa offset
-within the marshal buffer
-.Fn bufp .
-.Fn TSUrlStringGet
-stores the length of the allocated string in the parameter
-.Fa length .
-This is the same length that
-.Fn TSUrlLengthGet
-returns. The returned string is allocated by a call to
-.Fn TSmalloc
-and must be freed by a call to
-.Fn TSfree .
-If length is NULL then no attempt is made to de-reference it.
-
-
-.Pp
-.Fn TSUrlSchemeGet ,
-.Fn TSUrlUserGet ,
-.Fn TSUrlPasswordGet ,
-.Fn TSUrlHostGet ,
-.Fn TSUrlHttpParamsGet ,
-.Fn TSUrlHttpQueryGet
-and
-.Fn TSUrlHttpFragmentGet
-each retrieve an internal pointer to the specified portion of the
-URL from the marshall buffer
-.Fa bufp .
-The length of the returned string is placed in
-.Fa length
-and a pointer to the URL portion is returned. The returned string
-is not guaranteed to be NUL-terminated.
-
-.Pp
-.Fn TSUrlSchemeSet ,
-.Fn TSUrlUserSet ,
-.Fn TSUrlPasswordSet ,
-.Fn TSUrlHostSet ,
-.Fn TSUrlHttpParamsSet ,
-.Fn TSUrlHttpQuerySet
-and
-.Fn TSUrlHttpFragmentSet
-each set the specified portion of the URL located at 
-.Fa offset
-within the marshal buffer
-.Fa bufp
-to the string value. If
-.Fa length
-is -1 then these functions assume that value is NUL-terminated.
-Otherwise, the length of the string
-.Fa value
-is taken to be
-.Fa length .
-These functions copy the string to within
-.Fa bufp ,
-so it can be subsequently modified or deleted.
-
-.Pp
-.Fn TSUrlPortGet
-retrieves the port number portion of the URL located at
-.Fa offset
-within the marshal buffer
-.Fa bufp ,
-It returns 0 if there is no port number.
-
-.Pp
-.Fn TSUrlPortSet
-sets the port number portion of the URL located at
-.Fa offset within the marshal buffer
-.Fa bufp
-to the value
-.Fa port .
-
-.Pp
-.Fn TSStringPercentEncode
-performs percent-encoding of the string
-.Fa str ,
-storing the new string in the
-.Fa dst
-buffer. The
-.Fa length
-parameter will be
-set to the new (encoded) string length, or 0 if the encoding failed.
-.Fa TSUrlPercentEncode
-is similar but operates on a URL object. If the optional
-.Fa map
-parameter is provided, it should be a map of characters to encode.
-.Pp
-.Fn TSStringPercentDecode
-perform percent-decoding of the string in the buffer, writing
-to the
-.Fa dst
-buffer. The source and destination can be the same,
-in which case they overwrite. The decoded string is always
-guaranteed to be no longer than the source string.
-
-.fi
-.Sh SEE ALSO
-.Xr TSAPI 3ts