You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bu...@apache.org on 2013/12/24 19:32:22 UTC
svn commit: r891679 [17/24] - in /websites/staging/trafficserver/trunk:
cgi-bin/ content/ content/docs/ content/docs/trunk/
content/docs/trunk/admin/ content/docs/trunk/admin/cluster-howto/
content/docs/trunk/admin/configuration-files/ content/docs/tru...
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIONTodoGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIONTodoGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIONTodoGet.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKVIONTodoGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKVIONDoneSet.html">Prev</a> - INKVIONDoneSet</div>
+<div class="navnext">INKVIOReaderGet - <a accesskey="n" href="INKVIOReaderGet.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKVIONTodoGet"></a>INKVIONTodoGet</h3></div></div></div>
+<p>Returns the number of bytes remaining for the specified IO
+ operation.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKVIONTodoGet (INKVIO
+ <em class="replaceable"><code>viop</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>Gets the number of bytes left to do on the IO operation
+ described by <code class="code"><em class="replaceable"><code>viop</code></em></code>. The number of bytes left to do = (total # bytes
+ to perform on the IO operation) - (# of bytes that have been
+ done on the operation). </p>
+<p><code class="function">INKVIONTodoGet</code> is a convenience
+ function.</p>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The number of bytes left that are associated with the
+ specified IO operation.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+<dt><span class="term"><b>Example</b></span></dt>
+<dd><pre class="programlisting">INKVIONTodoGet (viop) == INKVIONBytesGet (viop) - INKVIONDoneGet (viop);</pre></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIONTodoGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOReaderGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOReaderGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOReaderGet.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,36 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKVIOReaderGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKVIONTodoGet.html">Prev</a> - INKVIONTodoGet</div>
+<div class="navnext">INKVIOReenable - <a accesskey="n" href="INKVIOReenable.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKVIOReaderGet"></a>INKVIOReaderGet</h3></div></div></div>
+<p>Obtains the buffer reader for the specified IO operation.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKIOBufferReader INKVIOReaderGet (INKVIO
+ <em class="replaceable"><code>viop</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Gets a buffer reader for the IO operation described by
+ <code class="code"><em class="replaceable"><code>viop</code></em></code>.
+ <code class="function">INKVIOReaderGet</code> is used by vconnections
+ performing write operations (since write operations read from their
+ buffers).</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The buffer reader for the specified IO operation.</p>
+<p><code class="code">INK_ERROR_PTR</code> if an error occurs.</p>
+</dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOReaderGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOReenable.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOReenable.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOReenable.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,36 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKVIOReenable</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKVIOReaderGet.html">Prev</a> - INKVIOReaderGet</div>
+<div class="navnext">INKVIOVConnGet - <a accesskey="n" href="INKVIOVConnGet.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKVIOReenable"></a>INKVIOReenable</h3></div></div></div>
+<p>Reenables a VIO.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKVIOReenable (INKVIO
+ <em class="replaceable"><code>viop</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Reenables the vconnection associated with
+ <code class="code"><em class="replaceable"><code>viop</code></em></code>. Reenabling a vconnection means that it will wake up and therefore be able
+ to determine that the buffer being used in its IO operation has
+ changed.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the vconnection successfully
+ reenables.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs.</p>
+</dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOReenable.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOVConnGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOVConnGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOVConnGet.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,34 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKVIOVConnGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKVIOReenable.html">Prev</a> - INKVIOReenable</div>
+<div class="navnext">IO Buffer Interface Functions - <a accesskey="n" href="IOBufferInterfaceFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKVIOVConnGet"></a>INKVIOVConnGet</h3></div></div></div>
+<p>Gets a VIO connection.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKVConn INKVIOVConnGet (INKVIO
+ <em class="replaceable"><code>viop</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd><p>Gets the vconnection associated with the IO operation
+ described by <code class="code"><em class="replaceable"><code>viop</code></em></code>. This
+ is the vconnection passed to <code class="function">INKVConnRead</code>
+ or <code class="function">INKVConnWrite</code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The vconnection for the specified IO operation.</p>
+<p><code class="code">INK_ERROR_PTR</code> if an error occurs.</p>
+</dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKVIOVConnGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfflush.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfflush.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfflush.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,31 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKfflush</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKfopenFamilyFunctions.html">Prev</a> - The INKfopen Family</div>
+<div class="navnext">INKfgets - <a accesskey="n" href="INKfgets.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKfflush"></a>INKfflush</h3></div></div></div>
+<p>Flushes a file.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">void INKfflush (INKFile
+ <em class="replaceable"><code>filep</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+ <p><code class="code"><em class="replaceable"><code>filep </code></em></code> is the file
+ to flush.</p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd><p>Flushes pending data that has been buffered in memory
+ from previous calls to <code class="function">INKfwrite</code>.</p></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfflush.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfgets.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfgets.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfgets.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,44 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKfgets</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKfflush.html">Prev</a> - INKfflush</div>
+<div class="navnext">INKfopen - <a accesskey="n" href="INKfopen.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKfgets"></a>INKfgets</h3></div></div></div>
+<p>Reads a line from a file to a buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">char* INKfgets (INKFile
+ <em class="replaceable"><code>filep</code></em>, char
+ <em class="replaceable"><code>*buf</code></em>, int
+ <em class="replaceable"><code>length</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code"><em class="replaceable"><code>filep </code></em></code> is the file
+ to read from.</p>
+<p><code class="code"><em class="replaceable"><code>buf </code></em></code> is the buffer
+ to read into.</p>
+<p><code class="code"><em class="replaceable"><code>length </code></em></code> is the size
+ of the buffer to read into.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Reads a line from the file pointed to by
+ <code class="code"><em class="replaceable"><code>filep </code></em></code> into the buffer
+ <code class="code"><em class="replaceable"><code>buf</code></em></code>. Lines aare
+ terminated by a line feed character, <code class="code">\n</code>. The line
+ placed in the buffer includes the line feed character; it is
+ terminated with a <code class="code">NULL</code>. If the line is longer than
+ <span class="replaceable"><code><i>length</i></code></span> bytes, then only the first <span class="replaceable"><code><i>length</i></code></span> - 1 bytes are placed in <code class="code"><em class="replaceable"><code>buf</code></em></code>.</p></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfgets.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopen.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopen.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopen.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,96 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKfopen</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKfgets.html">Prev</a> - INKfgets</div>
+<div class="navnext">INKfread - <a accesskey="n" href="INKfread.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKfopen"></a>INKfopen</h3></div></div></div>
+<p>Reads a line from a file to a buffer.</p>
+<div class="variablelist"><dl>
+ <dt><span class="term"><b>Prototype</b></span></dt>
+ <dd><p><code class="code">INKFile INKfopen (const char
+ <em class="replaceable"><code>*filename</code></em>, const char
+ <em class="replaceable"><code>*mode</code></em>)</code></p></dd>
+ <dt><span class="term"><b>Arguments</b></span></dt>
+ <dd>
+ <p><code class="code"><em class="replaceable"><code>filename </code></em></code> is the
+ name of the file to open.</p>
+ <p><code class="code"><em class="replaceable"><code>mode </code></em></code> specifies
+ whether to open the file for reading or writing. If <code><span class="replaceable">mode </span></code> is:</p>
+ <ul>
+ <li><code class="code"><b>r</b></code>, then the file is opened for
+ reading.</li>
+ <li><code class="code"><b>w</b></code>, then the file is opened for
+ writing.</li>
+ <li><code class="code"><b>a</b></code>, then the file is opened for
+ appending.</li>
+ </ul>
+ <blockquote>
+ <p>Currently <code class="code">r</code> ,<code class="code"> w</code>, and <code class="code">a</code> are the only two valid modes for opening a
+ file.</p>
+ </blockquote>
+ </dd>
+
+ <dt><span class="term"><b>Description</b></span></dt>
+ <dd>
+ <p>Opens a file for reading/writing and returns a
+ descriptor for accessing the file. Descriptors of type
+ <code class="code">INKFile</code> can be greater than 256.
+ <code class="code">INKfopen</code> can open a file for reading or for
+ writing, but not both (this is a limitation of the current
+ implementation).</p></dd>
+ <dt><span class="term"><b>Example</b></span></dt>
+ <dd>
+ <p>The following example is taken from the append-transform
+ plugin, which appends text to the end of
+ HTTP response bodies. This subroutine loads the text to be added
+ from a file.</p>
+ <pre class="programlisting">static int
+load (const char *filename)
+{
+ INKFile fp;
+ INKIOBufferBlock blk;
+ INKIOBufferData data;
+ char *p;
+ int avail;
+ int err;
+
+ fp = INKfopen (filename, "r");
+ if (!fp) {
+ return 0;
+ }
+
+ append_buffer = INKIOBufferCreate ();
+ append_buffer_reader = INKIOBufferReaderAlloc (append_buffer);
+
+ for (;;) {
+ blk = INKIOBufferStart (append_buffer);
+ p = INKIOBufferBlockWriteStart (blk, &avail);
+
+ err = INKfread (fp, p, avail);
+ if (err > 0) {
+ INKIOBufferProduce (append_buffer, err);
+ } else {
+ break;
+ }
+ }
+
+ append_buffer_length = INKIOBufferReaderAvail (append_buffer_reader);
+
+ INKfclose (fp);
+ return 1;
+}</pre>
+ </dd>
+</dl>
+ </div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopen.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopenFamily.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopenFamily.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopenFamily.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,44 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>The INKfopen Family</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="MiscellaneousInterfaceGuide.html">Prev</a> - Chapter 9. Miscellaneous Interface Guide</div>
+<div class="navnext">Memory Allocation - <a accesskey="n" href="MemoryAllocation.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="INKfopenFamily"></a>The INKfopen Family</h2></div></div></div>
+<p>The <code class="function">fopen</code> family of functions in C is
+ normally used for reading configuration files, since <code>fgets</code> is an easy
+ way to parse files on a line-by-line basis. The <code class="function">INKfopen</code> family of functions aims at solving
+ the same problem of buffered IO and line at a time IO in a platform-independent manner. The
+ <code class="function">fopen</code> family of C library functions can only open a
+ file if a file descriptor less than 256 is available. Since Traffic Server
+ often has more than 2000 file descriptors open at once, however, the
+ likelihood of an available file descriptor less than 256 very small. To solve this problem, the
+ <code class="function">INKfopen</code> family can open files with descriptors
+ greater than 256.</p>
+<p>The <code class="function">INKfopen</code> family of routines is not
+ intended for high speed IO or flexibility - they are blocking APIs (not asynchronous). For performance reasons, you should not
+ directly use these APIs on a Traffic Server thread (when being called back on an
+ HTTP hook); it is better to use a separate thread for doing the blocking
+ IO. The <code class="function">INKfopen</code> family is intended for reading and
+ writing configuration information when corresponding usage of the <code>fopen</code> family of functions is inappropriate due to file descriptor and
+ portability limitations. The <code class="function">INKfopen</code> family of
+ functions consists of the following:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p><a href="INKfopenFamilyFunctions.html#INKfclose" title="INKfclose">INKfclose</a></p></li>
+<li><p><a href="INKfflush.html" title="INKfflush">INKfflush</a></p></li>
+<li><p><a href="INKfgets.html" title="INKfgets">INKfgets</a></p></li>
+<li><p><a href="INKfopen.html" title="INKfopen">INKfopen</a></p></li>
+<li><p><a href="INKfread.html" title="INKfread">INKfread</a></p></li>
+<li><p><a href="INKfwrite.html" title="INKfwrite">INKfwrite</a></p></li>
+</ul></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopenFamily.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopenFamilyFunctions.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopenFamilyFunctions.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopenFamilyFunctions.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,68 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>The INKfopen Family</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKReleaseAssert.html">Prev</a> - INKReleaseAssert</div>
+<div class="navnext">INKfflush - <a accesskey="n" href="INKfflush.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="INKfopenFamilyFunctions"></a>The INKfopen Family</h2></div></div></div>
+<p>The <code class="function">fopen</code> family of functions in C is
+ normally used for reading configuration files, since <code class="code">fgets</code>
+ is an easy way to parse files on a line-by-line basis. The
+ <code class="function">INKfopen</code> family of functions is intended to solve
+ the same problem of buffered IO and line at a time IO, in a platform-independent manner. The
+ <code class="function">fopen</code> family of C library functions can only open a
+ file if a file descriptor less than 256 is available. Since Traffic Server
+ often has more than 2000 file descriptors open at once, however, the
+ likelihood of an available file descriptor less than 256 very small. The
+ <code class="function">INKfopen</code> family can open files with descriptors
+ greater than 256.</p>
+<p>The <code class="function">INKfopen</code> family of routines is not
+ intended for high speed IO or flexibility. These routines are intended for
+ reading and writing configuration information when corresponding usage
+ of the <code>fopen</code> family of functions is inappropriate because of file
+ descriptor and portability limitations. The <code class="function">INKfopen</code> family of functions consists of the functions below.</p>
+
+<ul>
+<li><span class="section"><a href="INKfopenFamilyFunctions.html#INKfclose"><b>INKfclose</b></a></span></li>
+<li><b><span class="section"><a href="INKfflush.html">INKfflush</a></span></b></li>
+<li><b><span class="section"><a href="INKfgets.html">INKfgets</a></span></b></li>
+<li><b><span class="section"><a href="INKfopen.html">INKfopen</a></span></b></li>
+<li><b><span class="section"><a href="INKfread.html">INKfread</a></span></b></li>
+<li><b><span class="section"><a href="INKfwrite.html">INKfwrite</a></span></b></li>
+</ul>
+
+
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKfclose"></a>INKfclose</h3></div></div></div>
+<p>Closes a file.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">void INKfclose (INKFile
+ <em class="replaceable"><code>filep</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+ <p><code class="code"><em class="replaceable"><code>filep </code></em></code> is the file
+ to close.</p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Closes the file pointed to by
+ <code class="code"><em class="replaceable"><code>filep </code></em></code> and frees the data
+ structures & buffers associated with it. If the file was
+ opened for writing, then any pending data is flushed.</p></dd>
+<dt><span class="term"><b>Example</b></span></dt>
+<dd>
+ <p>See the example for <a href="INKfopen.html" title="INKfopen">INKfopen</a>.</p></dd>
+</dl></div>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfopenFamilyFunctions.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfread.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfread.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfread.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKfread</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKfopen.html">Prev</a> - INKfopen</div>
+<div class="navnext">INKfwrite - <a accesskey="n" href="INKfwrite.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKfread"></a>INKfread</h3></div></div></div>
+<p>Reads a specified number of bytes from a file to a
+ buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKfread (INKFile
+ <em class="replaceable"><code>filep</code></em>, void
+ <em class="replaceable"><code>*buf</code></em>, int
+ <em class="replaceable"><code>length</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code"><em class="replaceable"><code>filep </code></em></code> is the file
+ to read from.</p>
+<p><code class="code"><em class="replaceable"><code>buf </code></em></code> is the buffer
+ to read into.</p>
+<p><code class="code"><em class="replaceable"><code>length </code></em></code> is the
+ amount of data to read.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Attempts to read
+ <code class="code"><em class="replaceable"><code>length </code></em></code> bytes of data
+ from the file pointed to by
+ <code class="code"><em class="replaceable"><code>filep </code></em></code> into the buffer
+ <code class="code"><em class="replaceable"><code>buf</code></em></code>. If the file was not
+ opened for reading, then <code class="code"><code class="function">INKfread</code></code>
+ returns <code>-1</code>. If an error occurs while reading the file, then <code class="code"><code class="function">INKfread</code></code> returns <code>-1</code>. If the
+ end of the file is reached, then <code class="function">INKfread</code>
+ returns <code>0</code>; otherwise, <code class="function">INKfread</code> returns the
+ number of bytes read.</p></dd>
+<dt><span class="term"><b>Example</b></span></dt>
+<dd>
+ <p>See the example for <a href="INKfopen.html" title="INKfopen">INKfopen</a>.</p></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfread.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfwrite.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfwrite.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfwrite.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,47 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKfwrite</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKfread.html">Prev</a> - INKfread</div>
+<div class="navnext">Memory Allocation - <a accesskey="n" href="MemoryAllocationFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKfwrite"></a>INKfwrite</h3></div></div></div>
+<p>Writes a specified number of bytes to a file.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code>int INKfwrite (INKFile <i class="replaceable">filep</i>, void *<i class="replaceable">buf</i>, int
+ <i class="replaceable">length</i>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code"><em class="replaceable"><code>filep </code></em></code> is the file
+ to write to.</p>
+<p><code class="code"><em class="replaceable"><code>buf </code></em></code> is the buffer
+ that contains the data to be written.</p>
+<p><code class="code"><em class="replaceable"><code>length </code></em></code> is the
+ amount of data to write to
+ <code class="code"><em class="replaceable"><code>filep</code></em></code>.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Attempts to write
+ <code class="code"><em class="replaceable"><code>length </code></em></code> bytes of data to
+ the file pointed to by
+ <code class="code"><em class="replaceable"><code>filep </code></em></code> from the buffer
+ <code class="code"><em class="replaceable"><code>buf</code></em></code>. If the file was not
+ opened for writing, then <code class="function">INKfwrite</code> returns <code>-1</code>.
+ Otherwise, <code class="function">INKfwrite</code> returns the number of
+ bytes written. The number of bytes written is equal to
+ <code class="code"><em class="replaceable"><code>length</code></em></code> (unless an error occurs when writing data to the
+ file). One common error, for example,
+ is an insufficient amount of space on disk.</p></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKfwrite.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKmalloc.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKmalloc.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKmalloc.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,39 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKmalloc</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="MemoryAllocationFunctions.html">Prev</a> - Memory Allocation</div>
+<div class="navnext">INKrealloc - <a accesskey="n" href="INKrealloc.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKmalloc"></a>INKmalloc</h3></div></div></div>
+<p>Allocates memory.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">void* INKmalloc (unsigned int
+ <em class="replaceable"><code>size</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+ <p><code class="code"><em class="replaceable"><code>size </code></em></code> is the number
+ of bytes to allocate.</p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Returns a pointer to <i class="replaceable"><code>size </code></i> bytes of memory allocated from
+ the heap. Traffic Server uses <code class="function">INKmalloc</code>
+ internally for memory allocations. Always use
+ <code class="function">INKfree</code> to release memory allocated by
+ <code class="function">INKmalloc</code>; do not use
+ <code class="code">free</code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+ <p>A pointer to the newly-allocated memory.</p></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKmalloc.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKrealloc.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKrealloc.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKrealloc.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,47 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKrealloc</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKmalloc.html">Prev</a> - INKmalloc</div>
+<div class="navnext">INKstrdup - <a accesskey="n" href="INKstrdup.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKrealloc"></a>INKrealloc</h3></div></div></div>
+<p>Changes the size of an allocated block of memory.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">void* INKrealloc (void
+ <em class="replaceable"><code>*ptr</code></em>, unsigned int
+ <em class="replaceable"><code>size</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code"><em class="replaceable"><code>ptr </code></em></code> is a pointer
+ to the memory to reallocate.</p>
+<p><code class="code"><em class="replaceable"><code>size </code></em></code> is the number
+ of bytes to allocate.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Changes the size of the memory block pointed to by
+ <code class="code"><em class="replaceable"><code>ptr </code></em></code> to
+ <code class="code"><em class="replaceable"><code>size </code></em></code> bytes, and returns a
+ pointer to the new block. Because it may not be possible to simply
+ extend <code class="code"><em class="replaceable"><code>ptr </code></em></code> to satisfy a
+ request to increase the allocated block, the returned pointer
+ might point to a new block of memory. If
+ <code class="code"><em class="replaceable"><code>ptr </code></em></code> is
+ <code class="code">NULL</code>, then <code class="function">INKrealloc</code> behaves like
+ <code class="function">INKmalloc</code> and returns a pointer to the
+ newly-allocated memory.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd><p>A pointer to the reallocated memory.</p></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKrealloc.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKstrdup.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKstrdup.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKstrdup.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKstrdup</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKrealloc.html">Prev</a> - INKrealloc</div>
+<div class="navnext">INKstrndup - <a accesskey="n" href="INKstrndup.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKstrdup"></a>INKstrdup</h3></div></div></div>
+<p>Returns a pointer to a duplicate string.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">char* INKstrdup (const char
+ *<em class="replaceable"><code>str</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+ <p><code class="code"><em class="replaceable"><code>str </code></em></code> is a pointer
+ to the null-terminated string to duplicate.</p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Returns a pointer to a new string that's a duplicate of
+ the string pointed to by
+ <code class="code"><em class="replaceable"><code>str</code></em></code>. The memory for the
+ new string is allocated using <code class="function">INKmalloc</code> and
+ should be freed by a call to
+ <code class="function">INKfree</code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p> A pointer to the duplicated string.</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png" /></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>A valid null-terminated string may not be returned if
+ the input <code class="code"><em class="replaceable"><code>str </code></em></code> argument
+ is not a valid pointer (i.e. a <code class="code">NULL</code> argument
+ would simply cause <code class="function">INKstrdup</code> to return
+ <code class="code">NULL</code>).</p></td></tr>
+</table></div>
+</dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKstrdup.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKstrndup.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKstrndup.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKstrndup.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,60 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKstrndup</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKstrdup.html">Prev</a> - INKstrdup</div>
+<div class="navnext">Thread Functions - <a accesskey="n" href="ThreadFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKstrndup"></a>INKstrndup</h3></div></div></div>
+<p>Returns a pointer to a duplicate string of specified
+ length.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">char* INKstrndup (const char
+ *<em class="replaceable"><code>str</code></em>, int
+ <em class="replaceable"><code>length</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code"><em class="replaceable"><code>str </code></em></code> is a pointer
+ to the string to duplicate.</p>
+<p><code class="code"><em class="replaceable"><code>length </code></em></code> is the
+ length of the string to duplicate.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Returns a pointer to a new string that's a duplicate of
+ the string pointed to by
+ <code class="code"><em class="replaceable"><code>str </code></em></code> which is
+ <code class="code"><em class="replaceable"><code>length </code></em></code> 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 <code class="function">INKMimeHdrFieldStringValueGet</code>) into
+ null-terminated string values. The memory for the new string is
+ allocated using <code class="function">INKmalloc</code> and should be
+ freed by a call to <code class="function">INKfree</code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p> A pointer to the duplicated string.</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png" /></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>A valid null-terminated string may not be returned if
+ the input <code class="code"><em class="replaceable"><code>str </code></em></code> argument
+ is not a valid pointer (i.e. a <code class="code">NULL</code> argument
+ would simply cause <code class="function">INKstrndup</code> to return
+ <code class="code">NULL</code>).</p></td></tr>
+</table></div>
+</dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKstrndup.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOBufferInterfaceFunctions.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOBufferInterfaceFunctions.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOBufferInterfaceFunctions.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,62 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>IO Buffer Interface</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKVIOReenable.html">Prev</a> - INKVIOReenable</div>
+<div class="navnext">INKIOBufferBlockReadAvail - <a accesskey="n" href="INKIOBufferBlockReadAvail.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="IOBufferInterfaceFunctions"></a>IO Buffer Interface</h2></div></div></div>
+
+<ul><b>
+<li><a href="IOBufferInterfaceFunctions.html#INKIOBufferBlockNext">INKIOBufferBlockNext</a></li>
+<li><a href="INKIOBufferBlockReadAvail.html">INKIOBufferBlockReadAvail</a></li>
+<li><a href="INKIOBufferBlockReadStart.html">INKIOBufferBlockReadStart</a></li>
+<li><a href="INKIOBufferBlockWriteAvail.html">INKIOBufferBlockWriteAvail</a></li>
+<li><a href="INKIOBufferBlockWriteStart.html">INKIOBufferBlockWriteStart</a></li>
+<li><a href="INKIOBufferCopy.html">INKIOBufferCopy</a></li>
+<li><a href="INKIOBufferCreate.html">INKIOBufferCreate</a> </li>
+<li><a href="INKIOBufferDestroy.html">INKIOBufferDestroy</a></li>
+<li><a href="INKIOBufferProduce.html">INKIOBufferProduce</a></li>
+<li><a href="INKIOBufferReaderAlloc.html">INKIOBufferReaderAlloc</a></li>
+<li><a href="INKIOBufferReaderAvail.html">INKIOBufferReaderAvail</a></li>
+<li><a href="INKIOBufferReaderClone.html">INKIOBufferReaderClone</a></li>
+<li><a href="INKIOBufferReaderConsume.html">INKIOBufferReaderConsume</a></li>
+<li><a href="INKIOBufferReaderFree.html">INKIOBufferReaderFree</a></li>
+<li><a href="INKIOBufferReaderStart.html">INKIOBufferReaderStart</a></li>
+<li><a href="INKIOBufferSizedCreate.html">INKIOBufferSizedCreate</a></li>
+<li><a href="INKIOBufferStart.html">INKIOBufferStart</a></li>
+<li><a href="INKIOBufferWaterMarkGet.html">INKIOBufferWaterMarkGet</a></li>
+<li><a href="INKIOBufferWaterMarkSet.html">INKIOBufferWaterMarkSet</a></li>
+<li><a href="INKIOBufferWrite.html">INKIOBufferWrite</a></li>
+
+</b>
+</ul>
+
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferBlockNext"></a>INKIOBufferBlockNext</h3></div></div></div>
+<p>Gets the next IO buffer block.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKIOBufferBlock INKIOBufferBlockNext
+ (INKIOBufferBlock
+ <em class="replaceable"><code>blockp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd><p>Gets the next block in the buffer block chain.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The next IO buffer block.</p>
+<p><code class="code">INK_ERROR_PTR</code> if an error occurs.</p>
+</dd>
+</dl></div>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOBufferInterfaceFunctions.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOBuffers_IO.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOBuffers_IO.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOBuffers_IO.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,48 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>IO Buffers</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="VIOs_IO.html">Prev</a> - VIOs</div>
+<div class="navnext">Guide to the Cache API - <a accesskey="n" href="CacheAPI.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="IOBuffers_IO"></a>IO Buffers</h2></div></div></div>
+<p>The IO buffer data structure is the building block of the
+ vconnection abstraction. An <b>IO buffer</b> (<code class="function">INKIOBuffer</code>)
+ is composed of a list of buffer blocks that point to buffer
+ data. Both the buffer block (<code class="function">INKIOBufferBlock</code>) and
+ buffer data (<code class="function">INKIOBufferData</code>) data structures are
+ reference-counted, so they can reside in multiple buffers at the
+ same time. This makes it extremely efficient to copy data from one IO
+ buffer to another via <code class="function">INKIOBufferCopy</code>, since
+ Traffic Server must only copy pointers and adjust reference counts
+ appropriately (and doesn't actually copy any data).</p>
+<p>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
+ <code class="function">INKIOBufferReader</code> data structure. Since only a
+ single writer is allowed, there is no corresponding
+ <code class="function">INKIOBufferWriter</code> data structure. The writer simply
+ modifies the IO buffer directly. To see an example that illustrates how
+ to use IOBuffers, refer to the sample code in the description of <a href="INKIOBufferBlockReadStart.html" title="INKIOBufferBlockReadStart"><code>INKIOBufferBlockReadStart</code></a>.</p>
+<p>Additional information about IO buffer functions:</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ <p>The <code class="function">INKIOBufferReader</code> data structure
+ tracks how much data in <code class="function">INKIOBuffer</code>
+ has been read. It has an offset number of bytes that is the current
+ start point of a particular buffer reader (for every read operation
+ on an <code>INKIOBuffer</code>, you must allocate an <code class="function">INKIOBufferReader</code>).</p></li>
+<li>Bytes that have already been read may not
+ necessarily be freed within the <code class="code">INKIOBuffer</code>. To consume bytes that have been read, you must call
+ <code class="function">INKIOBufferConsume</code>.</li>
+</ul></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOBuffers_IO.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOGuide.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOGuide.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOGuide.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,210 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Chapter 15. IO Guide</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="HostsLookupAPI.html">Prev</a> - Hosts Lookup API</div>
+<div class="navnext">Net Vconnections - <a accesskey="n" href="NetVconnections.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="IOGuide"></a>Chapter 15. IO Guide</h2></div></div></div>
+<p>This chapter contains the following sections:</p>
+<div class="itemizedlist"><ul type="disc"><b>
+<li><a href="IOGuide.html#Vconnections" title="Vconnections">Vconnections</a></li>
+<li><a href="NetVconnections.html" title="Net Vconnections">Net Vconnections</a></li>
+<li><a href="Transformations_IO.html" title="Transformations">Transformations</a></li>
+<li><a href="HTTPTransformationPlugins.html#VIOs" title="VIOs">VIOs</a></li>
+<li><a href="HTTPTransformationPlugins.html#IOBuffers" title="IO Buffers">IO Buffers</a></li>
+<li><a href="CacheAPI.html" title="Guide to the Cache API">Guide to the Cache API</a></li>
+<ul>
+<li><span class="section"><a href="CacheAPI.html#DoACacheRead">How to Do a Cache Read</a></span></li>
+<li><span class="section"><a href="DoACacheWrite.html">How to Do a Cache Write</a></span></li>
+<li><span class="section"><a href="DoACacheRemove.html">How to Do a Cache Remove</a></span></li>
+<li><span class="section"><a href="Errors_Cache.html">Errors</a></span></li>
+<li><span class="section"><a href="CacheAPI_Example.html">Example</a></span></li></ul>
+</b></ul></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="Vconnections"></a>Vconnections</h2></div></div></div>
+<p></p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div>
+ <h3 class="title">
+<a name="VconnectionUsersView"></a>Vconnections: a User's Perspective</h3></div></div></div>
+<p>To use a vconnection, a user must first get a handle to one.
+ This is usually accomplished by having it handed to the user; the
+ user may also simply issue a call that creates a vconnection (such as
+ <code class="function">INKNetConnect)</code>. In the case of transform plugins,
+ the plugin creates a transformation vconnection viav
+ <code class="function">INKTransformCreate</code> and then accesses the output
+ vconnection using
+ <code class="function">INKTransformOutputVConnGet</code>.</p>
+<p>After getting a handle to a vconnection, the user can then issue a
+ read or write call. It's important to note that not all vconnections
+ support both reading and writing - as of yet, there has not been a need
+ to query a vconnection about whether it can perform a read or write
+ operation. That ability should be obvious from context.</p>
+<p>To issue a read or write operation, a user calls
+ <code class="function">INKVConnRead</code> or
+ <code class="function">INKVConnWrite</code>. These two operations both return
+ <code>VIO (INKVIO)</code>. The VIO describes the operation being performed and how
+ much progress has been made. Transform plugins initiate output to the downstream vconnection
+ by calling <code class="function">INKVConnWrite</code>.</p>
+<p>A vconnection read or write operation is different from a normal
+ UNIX <code>read(2)</code> or <code>write(2)</code> operation. Specifically, the vconnection operation can specify
+ more data to be read or written than exists in the buffer handed to
+ the operation. For example, it's typical to issue a read for <code class="code">INT64_MAX</code> <a class="indexterm" name="id387878"></a>(9 quintillion) bytes from a network vconnection in order to
+ read all the data from the network connection until the end
+ of stream is reached. This contrasts with the usual UNIX fashion of issuing repeated
+ calls to <code>read(2)</code> until one of the calls finally returns <code>0</code> to indicate the
+ end of stream was reached (indeed, the underlying implementation of
+ vconnections on UNIX still does issue those calls to <code>read(2)</code>, but the
+ interface does not expose that detail).</p>
+<p>At most, a given vconnection can have one read operation and one
+ write operation being performed on it. This is restricted both by
+ design and common sense: if two write operations were performed
+ on a single vconnection, then the user would not be able to specify which
+ should occur first and the output would occur in an intermingled
+ fashion. Note that both a read operation and a write operation can
+ happen on a single vconnection at the same time; the restriction is for
+ more than one operation of the same type.</p>
+<p>One obvious issue is that the buffer passed to
+ <code class="function">INKVConnRead</code> and
+ <code class="function">INKVConnWrite</code> won't be large enough - there is no
+ reasonable way to make a buffer that can hold <code class="code">INT64_MAX</code> (9
+ quintillion) bytes! The secret is that vconnections engage in a protocol
+ whereby they signal to the user (via the continuation passed to
+ <code class="function">INKVConnRead</code> and
+ <code class="function">INKVConnWrite</code>) that they have emptied the
+ buffers passed to them and are ready for more data. When this occurs,
+ it is up to the user to add more data to the buffers (or wait for more
+ data to be added) and then wake up the vconnection by calling
+ <code class="function">INKVIOReenable</code> on the VIO describing the
+ operation. <code class="function">INKVIOReenable</code> specifies that the
+ buffer for the operation has been modified and that the vconnection
+ should reexamine it to see if it can make further progress.</p>
+<p>The null transform plugin provides an example of how this is done.
+ Below is a prototype for
+ <code class="function">INKVConnWrite</code>:</p>
+<pre class="programlisting">INKVIO INKVConnWrite (INKVConn connp, INKCont contp, INKIOBufferReader readerp, int nbytes)</pre>
+<p>The <code class="varname">connp</code> is the vconnection the
+ user is writing to and <code class="varname">contp</code> is the "user" â i.e.,
+ the continuation that <code>connp</code> calls back when it has emptied its
+ buffer and is ready for more data.</p>
+<p>The call made in the null transform plugin is:</p>
+<pre class="programlisting">INKVConnWrite (output_conn, contp, data->output_reader, INKVIONBytesGet (input_vio));</pre>
+<p>In the example above, <code class="code">contp</code> is the transformation
+ vconnection that is writing to the output vconnection. The number of
+ bytes to be written is obtained from <code class="code">input_vio</code> by
+ <code class="function">INKVIONBytesGet</code>.</p>
+<p>When a vconnection calls back its user to indicate that it wants
+ more data (or when some other condition has occurred), it issues a call
+ to <code class="function">INKContCall</code>. It passes the <code class="code">INKVIO</code> describing
+ the operation as the data parameter, and one of the
+ values below as the event parameter.</p>
+<div class="informaltable"><table border="1">
+<colgroup>
+<col />
+<col />
+</colgroup>
+<tbody>
+<tr>
+<td align="center"><span class="bold"><strong>Event Parameter
+ Value</strong></span></td>
+<td align="center"><span class="bold"><strong>Description</strong></span></td>
+</tr>
+<tr>
+<td><code>INK_EVENT_ERROR</code></td>
+<td>Indicates an error has occurred on the
+ vconnection. This will happen for network IO if the underlying
+ <code>read(2)</code> or <code>write(2)</code> call returns an error.</td>
+</tr>
+<tr>
+<td><code>INK_EVENT_VCONN_READ_READY</code></td>
+<td>The vconnection has placed data in the buffer passed to
+ an <code class="function">INKVConnRead</code> operation and it would
+ like to do more IO, but the buffer is now full. When the user
+ consumes the data from the buffer, this should re-enable the VIO
+ so it indicates to the vconnection that the buffer has been
+ modified.</td>
+</tr>
+<tr>
+<td><code>INK_EVENT_VCONN_WRITE_READY</code></td>
+<td>The vconnection has removed data from the buffer passed
+ to an <code class="function">INKVConnWrite</code> operation and it
+ would like to do more IO, but the buffer does not have enough
+ data in it. When placing more data in the buffer, the user
+ should re-enable the VIO so it indicates to the vconnection that
+ the buffer has been modified.</td>
+</tr>
+<tr>
+<td><code>INK_EVENT_VCONN_READ_COMPLETE</code></td>
+<td>The vconnection has read all the bytes specified by an
+ <code class="function">INKVConnRead</code> operation. The vconnection
+ can now be used to initiate a new IO operation.</td>
+</tr>
+<tr>
+<td><code>INK_EVENT_VCONN_WRITE_COMPLETE</code></td>
+<td>The vconnection has written all the bytes specified by
+ an <code class="function">INKVConnWrite</code> operation and can now be used to initiate a new IO
+ operation.</td>
+</tr>
+<tr>
+<td><code>INK_EVENT_VCONN_EOS</code></td>
+<td>An attempt was made to read past the end of the stream
+ of bytes during the handling of an
+ <code class="function">INKVConnRead</code> operation. This event occurs
+ when the number of bytes available for reading from a
+ vconnection is less than the number of bytes the user
+ specifies should be read from the vconnection in a call to
+ <code class="function">INKVConnRead</code>. A common case where this
+ occurs is when the user specifies that <code class="code">INT64_MAX</code>
+ bytes are to be read from a network connection.</td>
+</tr>
+</tbody>
+</table></div>
+<p>For example: the null transform plugin's transformation
+ receives <code class="code">INK_EVENT_VCONN_WRITE_READY</code> and
+ <code class="code">INK_EVENT_VCONN_WRITE_COMPLETE</code> events from the downstream
+ vconnection as a result of the call to
+ <code class="function">INKVConnWrite</code>.</p>
+<p>After using a vconnection, the user must call
+ <code class="function">INKVConnClose</code> or
+ <code class="function">INKVConnAbort</code>. While both calls indicate that the
+ vconnection can destroy itself, <code class="function">INKVConnAbort</code>
+ should be used when the connection is being closed abnormally. After a
+ call to <code class="function">INKVConnClose</code> or
+ <code class="function">INKVConnAbort</code>, the user will not be called back by
+ the vconnection again.</p>
+<p>Sometimes it's desirable to simply close down the write portion
+ of a connection while keeping the read portion open. This can be
+ accomplished via the <code class="function">INKVConnShutdown</code> function,
+ which shuts down either the read or write portion of a vconnection.
+ <i>Shutdown</i> means that the vconnection will no longer call back the user
+ with events for the portion of the connection that was shut down. For example:
+ if the user shuts down the write portion of a connection, then the <code class="code">INK_EVENT_VCONN_WRITE_READY</code> or
+ <code class="code">INK_EVENT_VCONN_WRITE_COMPLETE</code> events will not be produced. In the null transform plugin, the write operation is shut down
+ with a call to <code class="function">INKVConnShutdown</code>. To learn how vconnections are used in transformation
+ plugins, see <a href="HTTPTransformationPlugins.html#WritingContentTransformPlugins" title="Writing Content Transform Plugins">Writing Content Transform Plugins</a>.</p>
+<p>The vconnection functions are listed below:</p>
+<div class="itemizedlist"><ul><b>
+<li><a href="VconnectionFunctions.html#INKVConnAbort">INKVConnAbort</a></li>
+<li><a href="INKVConnClose.html">INKVConnClose</a></li>
+<li><a href="INKVConnClosedGet.html">INKVConnClosedGet</a></li>
+<li><a href="INKVConnRead.html">INKVConnRead</a></li>
+<li><a href="INKVConnReadVIOGet.html">INKVConnReadVIOGet</a></li>
+<li><a href="INKVConnShutdown.html">INKVConnShutdown</a></li>
+<li><a href="INKVConnWrite.html">INKVConnWrite</a> </li>
+<li><a href="INKVConnWriteVIOGet.html">INKVConnWriteVIOGet</a></li>
+</b>
+</ul></div>
+</div>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/IOGuide.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/ImplementHandler_GetTransHandle.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/ImplementHandler_GetTransHandle.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/ImplementHandler_GetTransHandle.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,41 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Implementing the Handler and Getting a Handle to the
+ Transaction</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="BasicAuthorizatonPlugin.html">Prev</a> - The Basic Authorization Plugin</div>
+<div class="navnext">Working With HTTP Headers - <a accesskey="n" href="WorkWithHTTPHeaders.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div>
+ <h3 class="title">
+<a name="ImplementHandler_GetTransHandle"></a>Implementing the Handler and Getting a Handle to the
+ Transaction</h3></div></div></div>
+<p>The handler function for the plugin's parent continuation is
+ implemented as follows:</p>
+<pre class="programlisting">static int
+auth_plugin (INKCont contp, INKEvent event, void *edata)
+{
+
+ INKHttpTxn txnp = (INKHttpTxn) edata;
+ switch (event) {
+ case INK_EVENT_HTTP_OS_DNS:
+ handle_dns (txnp, contp);
+ return 0;
+ case INK_EVENT_HTTP_SEND_RESPONSE_HDR:
+ handle_response (txnp);
+ return 0;
+ default:
+ break;
+ }
+
+ return 0;
+}</pre>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/ImplementHandler_GetTransHandle.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitializationFunctions.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitializationFunctions.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitializationFunctions.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,54 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Initialization Functions</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="FunctionReference.html">Prev</a> - Chapter 18. Function Reference</div>
+<div class="navnext">INKPluginRegister - <a accesskey="n" href="INKPluginRegister.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="InitializationFunctions"></a>Initialization Functions</h2></div></div></div>
+
+<ul>
+<li><span class="section"><a href="InitializationFunctions.html#INKPluginInit"><b>INKPluginInit</b></a></span></li>
+<li><b><span class="section"><a href="INKPluginRegister.html">INKPluginRegister</a></span></b></li>
+<li><b><span class="section"><a href="INKTrafficServerVersionGet.html">INKTrafficServerVersionGet</a></span></b><span class="section"><a href="INKTrafficServerVersionGet.html"></a></span></li>
+</ul>
+
+
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKPluginInit"></a>INKPluginInit</h3></div></div></div>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd>
+ <p><code class="code">void INKPluginInit (int <code class="replaceable">argc</code>,
+ const <span class="replaceable">char</span> <code class="varname"> *<span class="replaceable">argv</span> []</code>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code"><code class="replaceable">argc</code> </code>is a count of the number of
+ arguments in the argument vector, <code class="code"><code class="varname"><span class="replaceable"> argv</span></code></code>. The
+ count has a value of 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.</p>
+<p><code class="code"><code class="varname"><span class="replaceable">argv</span></code> </code>is the vector of arguments. The
+ number of arguments in the vector is <code class="code"><code class="replaceable">argc</code></code>; <code class="varname">argv[0]</code> always contains the name of the
+ plugin shared library.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>This function must be defined by all plugins. Traffic
+ Server calls this initialization routine when it loads the
+ plugin and sets <code class="replaceable">argc </code> and
+ <code class="replaceable">argv </code> based on the values in
+ <code class="filename">plugin.config</code>.</p></dd>
+</dl></div>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitializationFunctions.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitiateConnectionFunctions.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitiateConnectionFunctions.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitiateConnectionFunctions.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,78 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Initiate Connection</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="HTTPTransactionFunctions.html">Prev</a> - HTTP Transaction Functions</div>
+<div class="navnext">Intercepting HTTP Transaction Functions - <a accesskey="n" href="InterceptingHTTPTransactionFuncs.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="InitiateConnectionFunctions"></a>Initiate Connection</h2></div></div></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKHttpConnect"></a>INKHttpConnect</h3></div></div></div>
+<p>Sends an HTTP request through the Traffic Server HTTP SM.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">InkReturnCode INKHttpConnect (unsigned int
+ <em class="replaceable"><code>ip</code></em>, int
+ <em class="replaceable"><code>port</code></em>, INKVConn
+ *<em class="replaceable"><code>vc</code></em>) </code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code">unsigned int
+ </code><code class="code"><em class="replaceable"><code>ip </code></em></code> is the IP
+ address used to set the value of the vconnection remote IP address. This
+ is equivalent to a client IP address, or the IP from which the
+ connection originated. Value is in host byte order.</p>
+<p><code class="code">int
+ </code><code class="code"><em class="replaceable"><code>port </code></em></code> is the port
+ used to set the value of the vconnection remote port. This is equivalent
+ to a client port, or the port from which the connection originated.
+ The value is in host byte order.</p>
+<p><code class="code">INKVConn
+ *</code><code class="code"><em class="replaceable"><code>vc </code></em></code> is the
+ vconnection returned.</p>
+<p>Once the vconnection is established, you can use regular
+ vconnection operations (<code class="function">INKVConnRead</code>,
+ <code class="function">INKVConnWrite</code>, etc).</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>Sends an HTTP request through the Traffic Server HTTP SM.
+ The HTTP request goes through the Traffic Server the same way a
+ request from a client (such as a browser) does. A typical usage scenario is as follows:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Call <code class="function">INKHttpConnect</code>.</p></li>
+<li><p>Use <code class="function">INKVConnWrite</code> to send an HTTP
+ request.</p></li>
+<li><p>Use <code class="function">INKVConnRead</code> to get the HTTP
+ response.</p></li>
+<li>
+ <p>Use <code class="function">INKHttpParser</code> to
+ parse the response (if needed).</p></li>
+</ul></div>
+<p><b>Note:</b> the request and response go through the Traffic
+ Server HTTP SM. The request and the response can be cached and
+ the transaction will be logged in <code class="filename">squid.log</code>.</p>
+<p>Also note that the IP address passed to
+ <code class="function">INKHttpConnect</code> will be used as the client
+ IP address in <code class="filename">squid.log</code></p>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the API is called
+ successfully.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs while calling
+ the API or if an argument is invalid.</p>
+</dd>
+</dl></div>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitiateConnectionFunctions.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitiateHTTPConnection.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitiateHTTPConnection.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitiateHTTPConnection.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,21 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Initiate HTTP Connection</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="InterceptingHTTPTx.html">Prev</a> - Intercepting HTTP Transactions</div>
+<div class="navnext">HTTP Alternate Selection - <a accesskey="n" href="HTTPAlternateSelection.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="InitiateHTTPConnection"></a>Initiate HTTP Connection</h2></div></div></div>
+<p>This function enables plugins to initiate
+ HTTP transactions. The initiate HTTP connection function is:</p>
+<div class="itemizedlist"><ul type="disc"><li><p><a href="InitiateConnectionFunctions.html#INKHttpConnect" title="INKHttpConnect">INKHttpConnect</a></p></li></ul></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InitiateHTTPConnection.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InterceptingHTTPTransactionFuncs.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/InterceptingHTTPTransactionFuncs.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/InterceptingHTTPTransactionFuncs.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,109 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Intercepting HTTP Transaction Functions</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="InitiateConnectionFunctions.html">Prev</a> - Initiate Connection</div>
+<div class="navnext">INKHttpTxnServerIntercept - <a accesskey="n" href="INKHttpTxnServerIntercept.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="InterceptingHTTPTransactionFuncs"></a>Intercepting HTTP Transaction Functions</h2></div></div></div>
+
+<ul><b>
+<li><a href="InterceptingHTATPTAransactionFuncts.html#INKHttpTxnIntercept">INKHttpTxnIntercept</a></li>
+<li><a href="INKHttpTxnServerIntercept.html">INKHttpTxnServerIntercept</a></li>
+</b>
+</ul>
+
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKHttpTxnIntercept"></a>INKHttpTxnIntercept</h3></div></div></div>
+<p>Enables a plugin to intercept an HTTP client's request and
+ serve content in place of the origin server.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpTxnIntercept (INKCont
+ <em class="replaceable"><code>contp</code></em>, INKHttpTxn
+ <em class="replaceable"><code>txnp</code></em>) </code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code">INKCont
+ </code><code class="code"><em class="replaceable"><code>contp </code></em></code> is the
+ continuation called to accept the connection.</p>
+<p><code class="code">INKHttpTxn
+ </code><code class="code"><em class="replaceable"><code>txnp </code></em></code> is the
+ current HTTP transaction the plugin wants to intercept.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>Enables a plugin to intercept an HTTP client's request and
+ serve content in place of the origin server. The request
+ is intercepted immediately after it is read by Traffic Server; the
+ origin server is not contacted. This API should be used in the
+ <code class="code">INK_HTTP_READ_REQUEST_HDR_HOOK</code> hook.</p>
+<p>Once <code class="function">INKHttpTxnIntercept</code> is
+ called, the handler of the continuation
+ <code class="code"><em class="replaceable"><code>contp </code></em></code> receives an event
+ <code class="code">INK_EVENT_NET_ACCEPT</code>. Note that the continuation
+ passed should not have a <code class="code">NULL</code> mutex; if it does, then an error is
+ returned. The <code>void </code><code class="code"><em class="replaceable"><code>*data </code></em></code>
+ passed to the handler of the continuation
+ <code class="code"><em class="replaceable"><code>contp </code></em></code> is a data of type
+ <code>netvconnection</code> that represents the connection. Once a vconnection is established, the user can use regular
+ vconnection operations (<code class="function">INKVConnRead</code>,
+ <code class="function">INKVConnWrite</code>, etc...).</p>
+<p>A typical scenario for using <code>INKHttpTxnIntercept</code> is as follows:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Call <code class="function">INKHttpTxnIntercept</code> from
+ hook <code class="code">INK_HTTP_READ_REQUEST_HDR_HOOK</code>.</p></li>
+<li>
+ <p>Get called back on the continuation's handler that's passed
+ as an argument to
+ <code class="function">INKHttpTxnIntercept</code>.</p></li>
+<li>
+ <p>Get the vconnection from the argument <code>void
+ *</code><code class="code"><em class="replaceable"><code>data</code></em></code> .</p></li>
+<li>
+ <p>Use <code class="function">INKVConnRead</code> to get the HTTP
+ request. Note that you will <u>not</u> receive the event <code class="code">INK_VCONN_READ_COMPLETE</code> - you will only receive the
+ <code class="code">INK_VCONN_READ_READY</code> event because the number of
+ characters to be read is unknown. You should rely on
+ <code class="function">INKTHttpParser</code> to parse the request and
+ return a status <code class="code">INK_PARSE_DONE</code> when the request is
+ fully received (escape sequence <code class="code">\r\n\r\n
+ read</code>).</p></li>
+<li><p>Use <code class="function">INKHttpParser</code> to parse the
+ request.</p></li>
+<li><p>Use <code class="function">INKVConnWrite</code> to write the
+ HTTP response.</p></li>
+</ul></div>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png" /></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>Because the request and response do not go through the Traffic
+ Server HTTP state machine, neither is
+ cached by Traffic Server. The request is logged in
+ <code>squid.log</code>.</p></td></tr>
+</table></div>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the API is called
+ successfully.</p>
+<p><code class="code">INK_ERROR</code> if an error occurs while calling
+ the API or if an argument is invalid. This error is also
+ returned if the continuation passed has a <code class="code">NULL</code>
+ mutex.</p>
+</dd>
+</dl></div>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InterceptingHTTPTransactionFuncs.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InterceptingHTTPTx.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/InterceptingHTTPTx.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/InterceptingHTTPTx.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,25 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Intercepting HTTP Transactions</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="HTTP_Transactions.html">Prev</a> - HTTP Transactions</div>
+<div class="navnext">Initiate HTTP Connection - <a accesskey="n" href="InitiateHTTPConnection.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="InterceptingHTTPTx"></a>Intercepting HTTP Transactions</h2></div></div></div>
+<p>The intercepting HTTP transaction functions enable plugins to intercept transactions either after the request is received
+ or upon contact with the origin server. The plugin then acts as the origin
+ server using the <code class="code">INKVConn</code> interface. The intercepting HTTP transaction function allow for
+ reading <code>POST</code> bodies in plugins as well as using alternative transports
+ to the origin server.The intercepting HTTP transaction functions
+ are:</p>
+<div class="itemizedlist"><ul type="disc"><li><p><a href="InterceptingHTTPTransactionFuncs.html#INKHttpTxnIntercept" title="INKHttpTxnIntercept">INKHttpTxnIntercept</a></p></li></ul></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/InterceptingHTTPTx.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/Interface_ThreadFunctions.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/Interface_ThreadFunctions.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/Interface_ThreadFunctions.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,30 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Thread Functions</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="MemoryAllocation.html">Prev</a> - Memory Allocation</div>
+<div class="navnext">Chapter 10. HTTP Headers - <a accesskey="n" href="HTTPHeaders.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="Interface_ThreadFunctions"></a>Thread Functions</h2></div></div></div>
+<p>The Traffic Server API thread functions enable you to create,
+ destroy, and identify threads within Traffic Server. Multithreading
+ enables a single program to have more than one stream of execution and
+ to process more than one transaction at a time. Threads serialize their access to shared resources and data using
+ the <code class="function">INKMutex</code> type, as described in <a href="MutexGuide.html#Mutexes" title="Mutexes">Mutexes</a>.</p>
+<p>The thread functions are listed below:</p>
+<div class="itemizedlist"><ul type="disc"><b>
+<li><a href="ThreadFunctions.html#INKThreadCreate" title="INKThreadCreate">INKThreadCreate</a></li>
+<li><a href="INKThreadDestroy.html" title="INKThreadDestroy">INKThreadDestroy</a></li>
+<li><a href="INKThreadInit.html" title="INKThreadInit">INKThreadInit</a></li>
+<li><a href="INKThreadSelf.html" title="INKThreadSelf">INKThreadSelf</a></li></b>
+</ul></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/Interface_ThreadFunctions.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/LicensingPlugin.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/LicensingPlugin.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/LicensingPlugin.html Tue Dec 24 18:32:14 2013
@@ -0,0 +1,48 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Licensing Your Plugin</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="AccessPluginFiles.html">Prev</a> - Accessing Installed Plugin Files</div>
+<div class="navnext">Setting Up Licensing - <a accesskey="n" href="SetUpLicensing.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="LicensingPlugin"></a>Licensing Your Plugin</h2></div></div></div>
+<p>When installing a plugin that requires a license, <code>plugin.db</code> must be updated. This file contains the license keys for the plugins. At
+ load time, Traffic Server reads the keys in the <code class="filename">plugin.db</code> file and checks the validity of each. If a key
+ is not valid, then the plugin is not executed.</p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="Format_plugin.db"></a>Format of plugin.db</h3></div></div></div>
+<p># comments start with a <code>#</code> character</p>
+<pre class="programlisting">[plugin_name]
+Object=plugin.so
+License=Key</pre>
+<p>Be careful with the syntax:</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+<p>Object is with an uppercase 'O'</p>
+<p>Example: <code class="code">object=plugin.so is bad</code></p>
+</li>
+<li>
+<p>License is with an uppercase 'L'</p>
+<p>Example: <code class="code">license=key is bad</code></p>
+</li>
+<li>
+<p>No blank between '=' and value.</p>
+<p>Example: <code class="code">Object = plugin.so is bad</code></p>
+</li>
+<li>
+<p>No blank after the value, either.</p>
+<p>Example: <code>License=Key is bad</code></p>
+</li>
+</ul></div>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/LicensingPlugin.html
------------------------------------------------------------------------------
svn:executable = *