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 2011/12/19 23:58:08 UTC
svn commit: r800542 [14/23] - in
/websites/staging/trafficserver/trunk/content/docs/v2: ./ admin/
admin/images/ sdk/ sdk/css/ sdk/images/ sdk/images/docbook/ sdk/js/
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContDestroy.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContDestroy.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContDestroy.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,39 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKContDestroy</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKContDataSet.html">Prev</a> - INKContDataSet</div>
+<div class="navnext">INKContMutexGet - <a accesskey="n" href="INKContMutexGet.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKContDestroy"></a>INKContDestroy</h3></div></div></div>
+<p>Destroys a continuation.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKContDestroy (INKCont
+ <em class="replaceable"><code>contp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Destroys the continuation
+ <code class="code"><em class="replaceable"><code> contp</code></em></code>.
+ <code class="function">INKContDestroy</code> is used to destroy both
+ continuations and <a href="IOGuide.html#Vconnections" title="Vconnections">vconnections</a>. Although the internal continuation data
+ structures are destroyed, it cannot be guaranteed
+ that there are no outstanding references to the destroyed
+ continuation.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the continuation is
+ successfully destroyed.</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/INKContDestroy.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContMutexGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContMutexGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContMutexGet.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,34 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKContMutexGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKContDestroy.html">Prev</a> - INKContDestroy</div>
+<div class="navnext">INKContSchedule - <a accesskey="n" href="INKContSchedule.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKContMutexGet"></a>INKContMutexGet</h3></div></div></div>
+<p>Gets the mutex for a specified continuation.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKMutex INKContMutexGet (INKCont
+ <em class="replaceable"><code>contp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Gets the mutex for the continuation
+ <code class="code"><em class="replaceable"><code> contp</code></em></code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>A handle to the mutex for the specified
+ continuation.</p>
+<p><code class="code">INK_ERROR_PTR</code> if there is an error.</p>
+</dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContMutexGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContSchedule.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContSchedule.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContSchedule.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,43 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKContSchedule</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKContMutexGet.html">Prev</a> - INKContMutexGet</div>
+<div class="navnext">Plugin Configuration Functions - <a accesskey="n" href="PluginConfigurationFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKContSchedule"></a>INKContSchedule</h3></div></div></div>
+<p>Schedules a continuation to receive an event.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKAction INKContSchedule (INKCont
+ <em class="replaceable"><code>contp</code></em>, unsigned int
+ <em class="replaceable"><code>timeout</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Schedules the continuation represented by
+ <code class="code"><em class="replaceable"><code>contp </code></em></code> to receive an
+ event. The <code class="code"><em class="replaceable"><code>timeout </code></em></code>
+ refers to a time (in milliseconds) from the present to
+ send the event. When
+ <code class="code"><em class="replaceable"><code>contp </code></em></code> is called back and
+ if <code class="code"><em class="replaceable"><code>timeout </code></em></code> is 0, then
+ the event sent will be <code class="code">INK_EVENT_IMMEDIATE</code>. If
+ <code class="code"><em class="replaceable"><code>timeout </code></em></code> is greater than
+ 0, then the event sent will be
+ <code class="code">INK_EVENT_TIMEOUT</code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>An <code class="function">INKAction</code> object.</p>
+<p><code class="code">INK_ERROR_PTR</code> if there is an error.</p>
+</dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKContSchedule.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKError.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKError.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKError.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,46 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKError</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIsDebugTagSet.html">Prev</a> - INKIsDebugTagSet</div>
+<div class="navnext">INKAssert - <a accesskey="n" href="INKAssert.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKError"></a>INKError</h3></div></div></div>
+<p>Writes an error to the Traffic Server error log.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">void INKError (const char
+ *<em class="replaceable"><code>fmt</code></em>, <span class="replaceable">...</span>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code"><em class="replaceable"><code>fmt </code></em></code> is the <code>printf</code> format description.</p>
+<p><code class="replaceable">... </code>is the argument for the format
+ description.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span> </dt>
+<dd>
+ <p>It is sometimes useful to log messages when errors occur.
+ Traffic Server has a global error log file to which it writes
+ such messages, and the function <code>INKError</code> is the API interface to
+ this error log. <code class="function">INKError</code> is similar to
+ <code>printf</code> except that instead of writing the output to the C
+ standard output, <code class="function">INKError</code> writes output to
+ the Traffic Server error log. One advantage of
+ <code class="function">INKError</code> over <code>printf</code> is that each call is
+ atomically placed into the error log and not garbled with
+ other error entries (this is not an issue in single-threaded
+ programs, but is certainly a nuisance in multi-threaded
+ programs).</p></dd>
+<dt><span class="term"><b>Example</b></span></dt>
+<dd><pre class="programlisting">INKError ("couldn't retrieve client request header\n");</pre></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKError.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKHostLookupResultIPGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKHostLookupResultIPGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKHostLookupResultIPGet.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,47 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKHostLookupResultIPGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="HostLookupFunctions.html">Prev</a> - Host Lookup Functions: INKHostLookup</div>
+<div class="navnext">Vconnection Functions - <a accesskey="n" href="VconnectionFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKHostLookupResultIPGet"></a>INKHostLookupResultIPGet</h3></div></div></div>
+<p>Gets the IP address of a hostname that Traffic Server has
+ looked up.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">InkReturnCode INKHostLookupResultIPGet
+ (INKHostLookupResult <em class="replaceable"><code>lookup_result</code></em>,
+ unsigned int *<em class="replaceable"><code>ip</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="function">INKHostLookupResult</code>
+ <code class="code"><em class="replaceable"><code>lookup_result </code></em></code> is
+ the information returned by
+ <code class="function">INKHostLookupResult</code>.</p>
+<p><code class="code">unsigned int
+ *</code><code class="code"><em class="replaceable"><code>ip </code></em></code> is set to the
+ value of the IP address, in network byte order.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd><p>Converts the information retrieved by
+ <code class="function">INKHostLookupResult</code> to an <code>unsigned</code> <code>int</code> representing the IP address.</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>
+<dt><span class="term"> </span></dt>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKHostLookupResultIPGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKHttpTxnServerIntercept.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKHttpTxnServerIntercept.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKHttpTxnServerIntercept.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,97 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKHttpTxnServerIntercept</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="InterceptingHTTPTransactionFuncs.html">Prev</a> - Intercepting HTTP Transaction Functions</div>
+<div class="navnext">Alternate Selection Functions - <a accesskey="n" href="AlternateSelectionFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKHttpTxnServerIntercept"></a>INKHttpTxnServerIntercept</h3></div></div></div>
+<p>Enables a plugin to intercept an HTTP request sent to an origin
+ server and to serve the content in lieu of the origin server.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKHttpTxnServerIntercept (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 that is 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 request sent to an
+ origin server, and then serve the content in place of the origin
+ server. The origin server is not contacted.</p>
+<p>This API should be used in the
+ <code class="code">INK_HTTP_READ_REQUEST_HDR_HOOK</code> hook.</p>
+<p>Once <code class="function">INKHttpTxnServerIntercept</code> has
+ been 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.</p>
+<p>The void <code>*</code><code class="code"><em class="replaceable"><code>data </code></em></code><em><code> </code></em>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> representing the connection.</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>
+<p>A typical scenario when using
+ <code class="function">INKHttpTxnServerIntercept</code> is:</p>
+<div class="itemizedlist"><ul type="disc">
+<li><p>Call <code class="function">INKHttpTxnServerIntercept</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 passed
+ as argument to
+ <code class="function">INKHttpTxnServerIntercept</code>.</p></li>
+<li><p>Get the VC from argument void
+ <code>*</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
+ header. Note that you will not receive an event
+ <code class="code">INK_VCONN_READ_COMPLETE</code> - you will only receive the event
+ <code class="code">INK_VCONN_READ_READY</code> because the number of
+ characters to 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>The request and response go through the Traffic Server
+ HTTP state machine. The request and response can be cached; the request
+ is logged in <code class="filename">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>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKHttpTxnServerIntercept.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockReadAvail.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockReadAvail.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockReadAvail.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,39 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferBlockReadAvail</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="IOBufferInterfaceFunctions.html">Prev</a> - IO Buffer Interface Functions: INKIOBufferBlockNext</div>
+<div class="navnext">INKIOBufferBlockReadStart - <a accesskey="n" href="INKIOBufferBlockReadStart.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferBlockReadAvail"></a>INKIOBufferBlockReadAvail</h3></div></div></div>
+<p>Indicates the number of IO buffer bytes available for
+ reading.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKIOBufferBlockReadAvail (INKIOBufferBlock
+ <em class="replaceable"><code>blockp</code></em>, INKIOBufferReader
+ <em class="replaceable"><code>readerp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Obtains the number of bytes available for reading in the
+ IO buffer block <code class="code"><em class="replaceable"><code>blockp</code></em></code>.
+ The <code class="code"><em class="replaceable"><code>readerp </code></em></code> parameter is
+ needed because each IO buffer reader maintains its own current
+ offset.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The number of bytes available for reading in the IO buffer
+ block.</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/INKIOBufferBlockReadAvail.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockReadStart.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockReadStart.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockReadStart.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,121 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferBlockReadStart</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferBlockReadAvail.html">Prev</a> - INKIOBufferBlockReadAvail</div>
+<div class="navnext">INKIOBufferBlockWriteAvail - <a accesskey="n" href="INKIOBufferBlockWriteAvail.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferBlockReadStart"></a>INKIOBufferBlockReadStart</h3></div></div></div>
+<p>Starts reading an IO buffer block.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">const char* INKIOBufferBlockReadStart
+ (INKIOBufferBlock <em class="replaceable"><code>blockp</code></em>,
+ INKIOBufferReader <em class="replaceable"><code>readerp</code></em>, int
+ *<em class="replaceable"><code>avail</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>Gets the start point for reading from the IO buffer block
+ <code class="code"><em class="replaceable"><code>blockp</code></em></code>. The
+ <code class="code"><em class="replaceable"><code>readerp </code></em></code> parameter is
+ needed because each IO buffer reader maintains its own current
+ offset. <code class="function">INKIOBufferBlockReadStart</code> stores
+ the amount of data available for reading in the parameter
+ <code class="code"><em class="replaceable"><code>avail</code></em></code>. This is the same
+ value that <code class="function">INKIOBufferBlockReadAvail</code>
+ returns. If <code class="code"><em class="replaceable"><code>avail </code></em></code> is
+ <code class="code">NULL</code>, then no attempt is made to dereference
+ it.</p>
+<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/docbook/note.png" /></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>The <code class="code"><em class="replaceable"><code>avail </code></em></code>
+ parameter stores the amount of data available for reading on
+ the specified <code>INKIOBufferBlock</code>. If you need to read all
+ available data in an <code class="function">INKIOBuffer</code>, then make
+ sure that your code keeps checking
+ <code class="function">INKIOBufferBlocks</code> until all the available
+ data is read.</p></td></tr>
+</table></div>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>A pointer to the starting point for reading from the
+ specified IO buffer block.</p>
+<p><code class="code">INK_ERROR_PTR</code> if there is an error.</p>
+</dd>
+<dt><span class="term"><b>Example</b></span></dt>
+<dd>
+<p>Below is a sample routine,
+ <code class="code">transform_read_status_event</code> (modified from
+ <code class="filename">server-transform.c</code>), that attempts to read a
+ certain number of bytes. It calls
+ <code class="function">INKIOBufferBlockReadStart</code> to determine the
+ number of bytes available to read (and get the start point
+ within the <code class="function">INKIOBufferBlock</code> to start
+ reading). However,
+ <code class="function">INKIOBufferBlockReadStart</code> returns the
+ available bytes within the current block only. Because the
+ <code class="function">INKIOBuffer</code> data structure contains a
+ linked list of <code class="function">INKIOBufferBlocks</code>,
+ the available data within the <code class="function">INKIOBuffer</code>
+ could span more than one <code class="function">INKIOBufferBlock</code>.
+ The correct way to code this subroutine is to keep checking
+ <code class="function">INKIOBufferBlocks</code> for available data until
+ all of the available <code class="function">INKIOBuffer</code> data is
+ read.</p>
+<pre class="programlisting">
+static int
+transform_read_status_event (INKCont contp, TransformData *data,
+ INKEvent event, void *edata)
+{
+ switch (event) {
+ case INK_EVENT_ERROR:
+ case INK_EVENT_VCONN_EOS:
+ return transform_bypass (contp, data);
+ case INK_EVENT_VCONN_READ_COMPLETE:
+ if (INKIOBufferReaderAvail (data->output_reader) ==
+ sizeof (int)) {
+ INKIOBufferBlock blk;
+ char *buf;
+ void *buf_ptr;
+ int avail;
+ int read_nbytes = sizeof (int);
+ int read_ndone = 0;
+
+ buf_ptr = &data->content_length;
+ while (read_nbytes > 0) {
+ blk = INKIOBufferReaderStart (data->output_reader);
+ buf = (char *)INKIOBufferBlockReadStart (blk,
+ data->output_reader,
+ &avail);
+ read_ndone = (avail >= read_nbytes)? read_nbytes : avail;
+ memcpy (buf_ptr, buf, read_ndone);
+ if (read_ndone > 0) {
+ INKIOBufferReaderConsume (data->output_reader,
+ read_ndone);
+ read_nbytes -= read_ndone;
+ /* move ptr frwd by read_ndone bytes */
+ buf_ptr = (char*)buf_ptr + read_ndone;
+ }
+ }
+ data->content_length = ntohl (data->content_length);
+ return transform_read (contp, data);
+ }
+ return transform_bypass (contp, data);
+ default:
+ break;</pre>
+</dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockReadStart.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockWriteAvail.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockWriteAvail.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockWriteAvail.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,34 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferBlockWriteAvail</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferBlockReadStart.html">Prev</a> - INKIOBufferBlockReadStart</div>
+<div class="navnext">INKIOBufferBlockWriteStart - <a accesskey="n" href="INKIOBufferBlockWriteStart.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferBlockWriteAvail"></a>INKIOBufferBlockWriteAvail</h3></div></div></div>
+<p>Indicates the number of IO buffer bytes available for
+ writing.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKIOBufferBlockWriteAvail (INKIOBufferBlock
+ <em class="replaceable"><code>blockp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd><p>Returns the number of bytes available for writing in the
+ IO buffer block
+ <code class="code"><em class="replaceable"><code>blockp</code></em></code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The number of bytes available for writing (in the specified buffer block).</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/INKIOBufferBlockWriteAvail.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockWriteStart.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockWriteStart.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferBlockWriteStart.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,40 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferBlockWriteStart</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferBlockWriteAvail.html">Prev</a> - INKIOBufferBlockWriteAvail</div>
+<div class="navnext">INKIOBufferCopy - <a accesskey="n" href="INKIOBufferCopy.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferBlockWriteStart"></a>INKIOBufferBlockWriteStart</h3></div></div></div>
+<p>Starts a write to the specified IO buffer block.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">char* INKIOBufferBlockWriteStart (INKIOBufferBlock
+ <em class="replaceable"><code>blockp</code></em>, int
+ *<em class="replaceable"><code>avail</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Gets the start point for writing into the IO buffer block
+ <code class="code"><em class="replaceable"><code>blockp</code></em></code>. The amount of
+ data available for writing is stored in the parameter
+ <code class="code"><em class="replaceable"><code>avail</code></em></code>. If
+ <code class="code"><em class="replaceable"><code>avail </code></em></code> is
+ <code class="code">NULL</code>, then no attempt is made to dereference
+ it.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>A pointer to the starting point for writing to the
+ specified IO buffer block.</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/INKIOBufferBlockWriteStart.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferCopy.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferCopy.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferCopy.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,42 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferCopy</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferBlockWriteStart.html">Prev</a> - INKIOBufferBlockWriteStart</div>
+<div class="navnext">INKIOBufferCreate - <a accesskey="n" href="INKIOBufferCreate.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferCopy"></a>INKIOBufferCopy</h3></div></div></div>
+<p>Copies an IO buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKIOBufferCopy (INKIOBuffer
+ <em class="replaceable"><code>bufp</code></em>, INKIOBufferReader
+ <em class="replaceable"><code>readerp</code></em>, int
+ <em class="replaceable"><code>length</code></em>, int
+ <em class="replaceable"><code>offset</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Copies <code class="code"><em class="replaceable"><code>length </code></em></code>
+ bytes of data from the IO buffer reader
+ <code class="code"><em class="replaceable"><code>readerp </code></em></code> to the IO buffer
+ <code class="code"><em class="replaceable"><code>bufp</code></em></code>. As previously described, <code>INKIOBufferCopy</code> does not actually copy the data - it
+ simply copies pointers and adjusts reference counts
+ appropriately. The parameter <code class="code"><em class="replaceable"><code>offset </code></em></code> specifies the
+ offset from <code class="code"><em class="replaceable"><code>readerp</code></em></code>'s
+ current position to start copying from.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The number of bytes actually copied.</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/INKIOBufferCopy.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferCreate.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferCreate.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferCreate.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,32 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferCreate</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferCopy.html">Prev</a> - INKIOBufferCopy</div>
+<div class="navnext">INKIOBufferDestroy - <a accesskey="n" href="INKIOBufferDestroy.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferCreate"></a>INKIOBufferCreate</h3></div></div></div>
+<p>Creates an IO buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKIOBuffer INKIOBufferCreate (void)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Creates a new IO Buffer. The IO buffer that's created is initially
+ empty.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>A handle to the newly-created IO buffer.</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/INKIOBufferCreate.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferDestroy.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferDestroy.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferDestroy.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,37 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferDestroy</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferCreate.html">Prev</a> - INKIOBufferCreate</div>
+<div class="navnext">INKIOBufferProduce - <a accesskey="n" href="INKIOBufferProduce.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferDestroy"></a>INKIOBufferDestroy</h3></div></div></div>
+<p>Destroys an IO buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKIOBufferDestroy (INKIOBuffer
+ <em class="replaceable"><code>bufp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Destroys the IO buffer
+ <code class="code"><em class="replaceable"><code>bufp</code></em></code>. Since two IO
+ buffers can share data, this does not necessarily free all of the
+ data associated with the IO buffer - it simply decrements the
+ appropriate reference counts.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the IO buffer is successfully
+ destroyed.</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/INKIOBufferDestroy.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferProduce.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferProduce.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferProduce.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,40 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferProduce</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferDestroy.html">Prev</a> - INKIOBufferDestroy</div>
+<div class="navnext">INKIOBufferReaderAlloc - <a accesskey="n" href="INKIOBufferReaderAlloc.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferProduce"></a>INKIOBufferProduce</h3></div></div></div>
+<p>Makes a specified number of bytes of data available for
+ reading.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKIOBufferProduce (INKIObuffer
+ <em class="replaceable"><code>bufp</code></em>, int
+ <em class="replaceable"><code>nbytes</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Makes <code class="code"><em class="replaceable"><code>nbytes </code></em></code> of
+ data available for reading in the buffer
+ <code class="code"><em class="replaceable"><code>bufp</code></em></code>. A common paradigm
+ for writing to a buffer is to copy data into a buffer block and
+ then call <code class="function">INKIOBufferProduce</code> to make the
+ new data visible to readers.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the operation completes
+ successfully.</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/INKIOBufferProduce.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderAlloc.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderAlloc.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderAlloc.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,32 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferReaderAlloc</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferProduce.html">Prev</a> - INKIOBufferProduce</div>
+<div class="navnext">INKIOBufferReaderAvail - <a accesskey="n" href="INKIOBufferReaderAvail.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferReaderAlloc"></a>INKIOBufferReaderAlloc</h3></div></div></div>
+<p>Allocates an IO buffer reader.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKIOBufferReader INKIOBufferReaderAlloc
+ (INKIOBuffer <em class="replaceable"><code>bufp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd><p>Allocates an IO buffer reader for the IO buffer
+ <code class="code"><em class="replaceable"><code>bufp</code></em></code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>A handle to the newly-allocated IO buffer.</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/INKIOBufferReaderAlloc.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderAvail.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderAvail.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderAvail.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,34 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferReaderAvail</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferReaderAlloc.html">Prev</a> - INKIOBufferReaderAlloc</div>
+<div class="navnext">INKIOBufferReaderClone - <a accesskey="n" href="INKIOBufferReaderClone.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferReaderAvail"></a>INKIOBufferReaderAvail</h3></div></div></div>
+<p>Gets the number of bytes available for reading.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKIOBufferReaderAvail (INKIOBufferReader
+ <em class="replaceable"><code>readerp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Gets the total number of bytes available for reading by
+ the IO buffer reader,
+ <code class="code"><em class="replaceable"><code>readerp</code></em></code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The number of bytes available for reading.</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/INKIOBufferReaderAvail.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderClone.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderClone.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderClone.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,37 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferReaderClone</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferReaderAvail.html">Prev</a> - INKIOBufferReaderAvail</div>
+<div class="navnext">INKIOBufferReaderConsume - <a accesskey="n" href="INKIOBufferReaderConsume.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferReaderClone"></a>INKIOBufferReaderClone</h3></div></div></div>
+<p>Clones an IO buffer reader.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKIOBufferReader INKIOBufferReaderClone
+ (INKIOBufferReader
+ <em class="replaceable"><code>readerp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Makes a clone of the IO buffer reader
+ <code class="code"><em class="replaceable"><code>readerp</code></em></code>. The cloned
+ reader points to the same IO buffer and initially has the
+ same read offset as
+ <code class="code"><em class="replaceable"><code>readerp</code></em></code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>A handle to the cloned IO buffer.</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/INKIOBufferReaderClone.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderConsume.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderConsume.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderConsume.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,46 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferReaderConsume</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferReaderClone.html">Prev</a> - INKIOBufferReaderClone</div>
+<div class="navnext">INKIOBufferReaderFree - <a accesskey="n" href="INKIOBufferReaderFree.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferReaderConsume"></a>INKIOBufferReaderConsume</h3></div></div></div>
+<p>Consumes an IO buffer reader.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKIOBufferReaderConsume
+ (INKIOBufferReader <em class="replaceable"><code>readerp</code></em>, int
+ <em class="replaceable"><code>nbytes</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>Moves the read offset for the IO buffer reader
+ <code class="code"><em class="replaceable"><code>readerp </code></em></code> ahead by the amount
+ <code class="code"><em class="replaceable"><code> nbytes</code></em></code>.</p>
+<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Caution">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Caution]" src="images/docbook/caution.png" /></td>
+<th align="left">Caution</th>
+</tr>
+<tr><td align="left" valign="top"><p>Once a reader moves its offset ahead, it can never move
+ it back. When a reader moves its offset, the data it has moved
+ is potentially freed at that moment.</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 operation completes
+ successfully.</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/INKIOBufferReaderConsume.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderFree.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderFree.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderFree.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,40 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferReaderFree</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferReaderConsume.html">Prev</a> - INKIOBufferReaderConsume</div>
+<div class="navnext">INKIOBufferReaderStart - <a accesskey="n" href="INKIOBufferReaderStart.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferReaderFree"></a>INKIOBufferReaderFree</h3></div></div></div>
+<p>Frees an IO buffer reader.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKIOBufferReaderFree
+ (INKIOBufferReader
+ <em class="replaceable"><code>readerp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Frees an IO buffer reader. The IO buffer maintains a
+ reference to each reader that accesses it and then frees those
+ references when the buffer gets destroyed (which makes it unnecessary
+ to call <code class="function">INKIOBufferReaderFree</code>). It is
+ sometimes useful to free an IO buffer reader if the reader is no
+ longer being used to allow the buffer data to automatically be
+ deallocated when other readers have consumed it.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the IO buffer is successfully
+ freed.</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/INKIOBufferReaderFree.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderStart.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderStart.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferReaderStart.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,37 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferReaderStart</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferReaderFree.html">Prev</a> - INKIOBufferReaderFree</div>
+<div class="navnext">INKIOBufferSizedCreate - <a accesskey="n" href="INKIOBufferSizedCreate.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferReaderStart"></a>INKIOBufferReaderStart</h3></div></div></div>
+<p>Starts an IO buffer reader.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKIOBufferBlock INKIOBufferReaderStart
+ (INKIOBufferReader
+ <em class="replaceable"><code>readerp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Gets the read start block for the IO buffer reader.
+ <code class="function">INKIOBufferReaderStart</code> may return
+ <code class="code">NULL</code> if there is no data available for reading; it
+ may also return an IO buffer block with no data available for
+ reading. You should check for both conditions.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The read start block for the IO buffer reader.</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/INKIOBufferReaderStart.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferSizedCreate.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferSizedCreate.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferSizedCreate.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferSizedCreate</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferReaderStart.html">Prev</a> - INKIOBufferReaderStart</div>
+<div class="navnext">INKIOBufferStart - <a accesskey="n" href="INKIOBufferStart.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferSizedCreate"></a>INKIOBufferSizedCreate</h3></div></div></div>
+<p>Creates an <code>INKIOBuffer</code> with the specified size index.</p>
+<div class="variablelist"><dl>
+ <dt><span class="term"><b>Prototype</b></span></dt>
+ <dd><p><code class="code">INKIOBuffer INKIOBufferSizedCreate
+ (INKIOBufferSizeIndex
+ <em class="replaceable"><code>index</code></em>)</code></p></dd>
+ <dt><span class="term"><b>Arguments</b></span></dt>
+ <dd><code class="function">INKIOBufferSizeIndex</code><code class="code"><em class="replaceable"><code> index </code></em></code> is the
+ size of the new <code class="code">IOBuffer</code> to create. It should be
+ one of the following values:
+ <ul>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_128</code></li>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_256</code></li>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_512</code></li>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_1K</code></li>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_2K</code></li>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_4K</code></li>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_8K</code></li>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_16K</code></li>
+ <li><code class="code">INK_IOBUFFER_SIZE_INDEX_32K</code></li></ul></dd>
+</dl>
+ <dl>
+ <dt><span class="term"><b>Description</b></span></dt>
+ <dd><p>Creates an <code class="function">INKIOBuffer</code> of the
+ specifed size.</p></dd>
+ <dt><span class="term"><b>Returns</b></span></dt>
+ <dd>
+ <p>An <code>IOBuffer</code> object if the API call is successful.</p>
+ <p><code class="code">INK_ERROR_PTR</code> if an error occurs while
+ calling the API or if an argument is invalid.</p>
+ </dd>
+ </dl>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferSizedCreate.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferStart.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferStart.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferStart.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,36 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferStart</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferSizedCreate.html">Prev</a> - INKIOBufferSizedCreate</div>
+<div class="navnext">INKIOBufferWaterMarkGet - <a accesskey="n" href="INKIOBufferWaterMarkGet.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferStart"></a>INKIOBufferStart</h3></div></div></div>
+<p>Starts an IO buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKIOBufferBlock INKIOBufferStart (INKIOBuffer
+ <em class="replaceable"><code>bufp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Gets the write start block for the IO buffer
+ <code class="code"><em class="replaceable"><code>bufp</code></em></code>.
+ <code class="function">INKIOBufferStart</code> always returns a block
+ with a non-zero amount of space available for writing. If necessary, a new
+ block is added to accomplish this.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>The write start block for the IO buffer writer.</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/INKIOBufferStart.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWaterMarkGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWaterMarkGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWaterMarkGet.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferWaterMarkGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferStart.html">Prev</a> - INKIOBufferStart</div>
+<div class="navnext">INKIOBufferWaterMarkSet - <a accesskey="n" href="INKIOBufferWaterMarkSet.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferWaterMarkGet"></a>INKIOBufferWaterMarkGet</h3></div></div></div>
+<p>Gets the current watermark for the specified buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">InkReturnCode INKIOBufferWaterMarkGet (INKIOBuffer
+ <em class="replaceable"><code>bufp</code></em>, int
+ *<em class="replaceable"><code>watermark</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code>INKIOBuffer</code> <code class="code"><em class="replaceable"><code>bufp </code></em></code>
+ is the <b><code>IOBuffer</code></b> whose <code class="code">water_mark</code> is to be
+ obtained.</p>
+<p><code class="code">int *<em class="replaceable"><code>watermark </code></em></code> is
+ set to the watermark value.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>Gets the current watermark for the specified buffer. A
+ water mark applies only to a <code><b>NetVConnection</b></code> and should therefore
+ only be used when reading data from one.</p>
+<p>When the watermark is set to <code>N</code> and after <code class="function">INKVConnRead</code> is called, the net processor calls back
+ the reader (with an event <code class="code">INK_VCONN_READ_READY</code>)
+ only when at least <code>N</code> bytes of data are available for
+ reading.</p>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the API call is successful.</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>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWaterMarkGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWaterMarkSet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWaterMarkSet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWaterMarkSet.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferWaterMarkSet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferWaterMarkGet.html">Prev</a> - INKIOBufferWaterMarkGet</div>
+<div class="navnext">INKIOBufferWrite - <a accesskey="n" href="INKIOBufferWrite.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferWaterMarkSet"></a>INKIOBufferWaterMarkSet</h3></div></div></div>
+<p>Sets the current watermark for the specified buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKIOBufferWaterMarkSet (INKIOBuffer
+ <em class="replaceable"><code>bufp</code></em>,int
+ <em class="replaceable"><code>water_mark</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="function">INKIOBuffer</code>
+ <code class="code"><em class="replaceable"><code>bufp </code></em></code> is the <b><code>IOBuffer</code></b> whose watermark is to be set.</p>
+<p><code class="code">int <em class="replaceable"><code>water_mark </code></em></code> is
+ the watermark value to set for
+ <code class="code"><em class="replaceable"><code>bufp</code></em></code>.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>Sets the current watermark of the specified buffer.</p>
+<p>A water mark applies only to a <code><b>NetVConnection</b></code> and should
+ therefore be used only when reading data from one. When the watermark is
+ set to N and after <code class="function">INKVConnRead</code> is called, the net processor calls back
+ the reader (with an event <code class="code">INK_VCONN_READ_READY</code>)
+ only when at least N bytes of data are available for
+ reading.</p>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the operation completes
+ 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>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWaterMarkSet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWrite.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWrite.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWrite.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,85 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIOBufferWrite</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKIOBufferWaterMarkSet.html">Prev</a> - INKIOBufferWaterMarkSet</div>
+<div class="navnext">Management Interface Functions - <a accesskey="n" href="ManagementInterfaceFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIOBufferWrite"></a>INKIOBufferWrite</h3></div></div></div>
+<p>Appends the specified number of bytes from a particular buffer to the IO
+ buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKIOBufferWrite (INKIOBuffer
+ <em class="replaceable"><code>bufp</code></em>, const char
+ <em class="replaceable"><code>*buf</code></em>, int
+ <em class="replaceable"><code>len</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="function">INKIOBuffer </code>
+ <code class="code"><em class="replaceable"><code>bufp </code></em></code> is the target
+ IOBuffer that receives the data.</p>
+<p><code class="code">const char <em class="replaceable"><code>*buf </code></em></code> is
+ the buffer that contains the data.</p>
+<p><code class="code">int <em class="replaceable"><code>len </code></em></code> is the
+ length of the data to write.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>This function appends data from
+ <code class="code"><em class="replaceable"><code>*buf</code></em> </code>to IOBuffer
+ <code class="code"><em class="replaceable"><code>bufp</code></em></code>; the length of data
+ being appended is specified in
+ <code class="code"><em class="replaceable"><code>len</code></em></code>. The returned value
+ is the actual length of data being appended.</p></dd>
+<dt><span class="term"><b>Example</b></span></dt>
+<dd>
+<p><code class="function">INKIOBufferWrite</code> offers the same
+ functionality as the deprecated functions
+ <code class="function">INKIOBufferAppend</code>,
+ <code class="function">INKIOBufferDataCreate</code>, and
+ <code class="function">INKIOBufferBlockCreate</code>. To append the
+ content of a buffer <code class="code"><em class="replaceable"><code>buf </code></em></code>
+ of size <code class="code"><em class="replaceable"><code>len </code></em></code> into an
+ <code class="code">IOBuffer</code>, we recommend using
+ <code class="code">INKIOBufferWrite</code>. It has the following
+ prototype:</p>
+<pre class="programlisting">int INKIOBufferWrite (INKIOBuffer bufp, const char *buf, int len);
+
+The equivalent of this API in SDK2.0 is the following snippet of code:
+ INKIOBufferBlock block;
+ int avail, ndone, ntodo, towrite;
+ char *ptr_block;
+
+ ndone = 0;
+ ntodo = len;
+ while (ntodo > 0) {
+ /* INKIOBufferStart allocates more blocks if required */
+ block = INKIOBufferStart(bufp);
+ ptr_block = INKIOBufferBlockWriteStart (block, &avail);
+ towrite = min(ntodo, avail);
+ memcpy (ptr_block, buf+ndone, towrite);
+ INKIOBufferProduce(bufp, towrite);
+ ntodo -= towrite;
+ ndone += towrite;
+} </pre>
+</dd>
+<dt> </dt>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+ <p>The length of data copied if the API call is
+ successful.</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>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIOBufferWrite.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIsDebugTagSet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIsDebugTagSet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIsDebugTagSet.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,41 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKIsDebugTagSet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="DebuggingFunctions.html">Prev</a> - Debugging Functions</div>
+<div class="navnext">INKError - <a accesskey="n" href="INKError.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKIsDebugTagSet"></a>INKIsDebugTagSet</h3></div></div></div>
+<p>Indicates if a particular debug tag is set.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">void INKError (const char <em class="replaceable"><code>*fmt,
+ ...</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="code"><em class="replaceable"><code>fmt </code></em></code> is the <code>printf</code> format description.</p>
+<p><code class="replaceable">... </code> is the argument for the format
+ description.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Since it is sometimes useful to log messages when errors occur,
+ Traffic Server provides a global error log file for this purpose. The function <code>INKError</code> is the API interface to
+ this error log. <code>INKError</code> is similar to <code>printf</code>, except that
+ <code>INKError</code> writes output to the Traffic Server error log instead of writing the output to the C standard output. One advantage of <code>INKError</code> over <code>printf</code> is that each call is atomically placed into
+ the error log and not garbled with other error entries (this
+ is not an issue in single-threaded programs, but is a definite
+ nuisance in multi-threaded programs).</p></dd>
+<dt><span class="term"><b>Example</b></span></dt>
+<dd><pre class="programlisting">INKError ("couldn't retrieve client request header\n");</pre></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKIsDebugTagSet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMBufferDestroy.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMBufferDestroy.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMBufferDestroy.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,34 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKMBufferDestroy</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="MarshallBuffersFunctions.html">Prev</a> - Marshal Buffers: INKMBufferCreate</div>
+<div class="navnext">HTTP Header Functions - <a accesskey="n" href="HTTPHeaderFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKMBufferDestroy"></a>INKMBufferDestroy</h3></div></div></div>
+<p>Destroys a marshal buffer.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">void INKMBufferDestroy (INKMBuffer
+ <em class="replaceable"><code>bufp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+ <p><code class="code"><em class="replaceable"><code>bufp </code></em></code> is the
+ marshal buffer to be destroyed.</p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Ignores the reference count and destroys the marshal
+ buffer <code class="code"><em class="replaceable"><code>bufp</code></em></code>. The
+ internal data buffer associated with the marshal buffer is also
+ destroyed (if the marshal buffer allocated it).</p></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMBufferDestroy.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtFloatGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtFloatGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtFloatGet.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,48 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKMgmtFloatGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="TEConfigReadFunctions.html">Prev</a> - Configuration Read Functions: INKMgmtCounterGet</div>
+<div class="navnext">INKMgmtIntGet - <a accesskey="n" href="INKMgmtIntGet.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKMgmtFloatGet"></a>INKMgmtFloatGet</h3></div></div></div>
+<p>Gets a <code class="filename">records.config</code> variable of type
+ <code class="code">float</code>.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKMgmtFloatGet (const char *<i class="replaceable">var_name</i>,
+ INKMgmtFloat *<i class="replaceable">result</i>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="replaceable"><i>var_name </i></code> is the name of the variable you want
+ from the <code class="filename">records.config</code> file.</p>
+<p><code class="replaceable"><i>result </i></code> is a pointer to the value of the
+ variable, which is of type
+ <code class="function">INKMgmtFloat</code>.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p><code class="function">INKMgmtFloatGet</code> obtains the value of
+ the specified <code class="filename">records.config</code> variable of
+ type <code class="code">float</code>, and then stores the value in
+ <code class="replaceable">result</code>.</p></dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+ <p>If <code class="function">INKMgmtFloatGet</code> cannot get the
+ variable, then it returns zero. </p></dd>
+<dd>
+ <p>If it is successful, then a nonzero value
+ is returned.</p>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtFloatGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtIntGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtIntGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtIntGet.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,59 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKMgmtIntGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKMgmtFloatGet.html">Prev</a> - INKMgmtFloatGet</div>
+<div class="navnext">INKMgmtStringGet - <a accesskey="n" href="INKMgmtStringGet.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKMgmtIntGet"></a>INKMgmtIntGet</h3></div></div></div>
+<p>Get a <code class="filename">records.config</code> variable of type
+ <code class="code">int</code>.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKMgmtIntGet (const char *<i class="replaceable">var_name</i>, INKMgmtInt
+ *<i class="replaceable">result</i>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="replaceable"><i>var_name </i></code> is the name of the variable you want
+ from the <code class="filename">records.config</code> file.</p>
+<p><code class="replaceable"><i>result </i></code> is a pointer to the variable's value, which is of type <code class="code">INKMgmtInt</code>.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p><code class="function">INKMgmtIntGet</code> obtains the value of
+ the specified <code class="filename">records.config</code> variable of
+ type <code class="code">int</code>, and then stores the value in
+ <code class="replaceable">result</code>.</p></dd>
+
+ <dt><span class="term"><b>Example</b></span></dt>
+<dd>
+<p>The following code fragment does something if keepalive is
+ enabled on Traffic Server:</p>
+<pre class="programlisting">INKMgmtInt result;
+ if (INKMgmtIntGet("proxy.config.http.keep_alive_enabled", &result)) {
+ if (result){
+ // keepalive is enabled, do something
+ }
+}
+else INKError ("could not retrieve value\n");</pre>
+</dd>
+
+<dt> </dt>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p>If <code class="function">INKMgmtIntGet</code> cannot get the
+ variable, then zero is returned. </p>
+</dd>
+<dd>
+ <p>If it is successful, then it returns a nonzero value.</p>
+</dd>
+</dl>
+</div></div></body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtIntGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtStringGet.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtStringGet.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtStringGet.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,51 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKMgmtStringGet</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKMgmtIntGet.html">Prev</a> - INKMgmtIntGet</div>
+<div class="navnext">Customer Installation and Licensing Functions - <a accesskey="n" href="CustInstallLicenseFunctions.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKMgmtStringGet"></a>INKMgmtStringGet</h3></div></div></div>
+<p>Get a <code class="filename">records.config</code> variable of type <code class="code">String</code>.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">int INKMgmtStringGet (const char *<i>var_name</i>,
+ INKMgmtString *<i>result</i>)</code></p></dd>
+<dt><span class="term"><b>Arguments</b></span></dt>
+<dd>
+<p><code class="replaceable"><i>var_name </i></code> is the name of the variable you want
+ from the <code class="filename">records.config</code> file.</p>
+<p><code class="replaceable"><i>result </i></code> is a pointer to the value of the
+ variable. This value is of type
+ <code class="code">INKMgmtString</code>.</p>
+</dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p><code class="function">INKMgmtStringGet</code> obtains the value of
+ the specified <code class="filename">records.config</code> variable of
+ type <code class="code">String</code>, and then stores the value in
+ <code class="replaceable">result</code>.</p>
+<p>When it's finished with the result, your plugin must deallocate the
+ result string with a call to
+ <code class="function">INKfree</code>.</p>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+ <p>If <code class="function">INKMgmtStringGet</code> cannot get the
+ variable, then it returns zero. </p></dd>
+<dd>
+ <p>If it is successful, then a nonzero value
+ is returned.</p>
+</dd>
+</dl>
+</div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMgmtStringGet.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMutexLock.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMutexLock.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMutexLock.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,49 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKMutexLock</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="MutexFunctions.html">Prev</a> - Mutex Functions</div>
+<div class="navnext">INKMutexLockTry - <a accesskey="n" href="INKMutexLockTry.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKMutexLock"></a>INKMutexLock</h3></div></div></div>
+<p>Locks an <code class="code">INKMutex</code>.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode INKMutexLock (INKMutex
+ <em class="replaceable"><code>mutexp</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+ <p>Locks the <code class="function">INKMutex </code>
+ <code class="code"><em class="replaceable"><code>mutexp</code></em></code>. If
+ <code class="code"><em class="replaceable"><code>mutexp </code></em></code> is already locked,
+ then <code class="function">INKMutexLock</code> blocks until the
+ mutex is unlocked. </p></dd>
+<dd>
+ <p>An <code class="function">INKMutex</code> will be
+ recursively locked if <code class="function">INKMutexLock</code> is
+ called on the same mutex twice from the same thread. Thus,
+ the following example will succeed and not block on the second
+ call to <code class="function">INKMutexLock</code>.</p>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code class="code">INK_SUCCESS</code> if the mutex is successfully
+ locked.</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">INKMutexLock (some_mutex);
+INKMutexLock (some_mutex);
+INKMutexUnlock (some_mutex);
+INKMutexUnlock (some_mutex);</pre></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMutexLock.html
------------------------------------------------------------------------------
svn:executable = *
Added: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMutexLockTry.html
==============================================================================
--- websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMutexLockTry.html (added)
+++ websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMutexLockTry.html Mon Dec 19 22:58:01 2011
@@ -0,0 +1,60 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>INKMutexLockTry</title>
+<!--#include file="top.html" -->
+<div class="navheader">
+<div class="navprev">
+<a accesskey="p" href="INKMutexLock.html">Prev</a> - INKMutexLock</div>
+<div class="navnext">INKMutexUnlock - <a accesskey="n" href="INKMutexUnlock.html">Next</a>
+</div>
+</div>
+<div id="toc"></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="INKMutexLockTry"></a>INKMutexLockTry</h3></div></div></div>
+<p>Tries to lock an <code class="code">INKMutex</code>.</p>
+<div class="variablelist"><dl>
+<dt><span class="term"><b>Prototype</b></span></dt>
+<dd><p><code class="code">INKReturnCode InkMutexLockTry (INKMutex
+ <em class="replaceable"><code>mutex</code></em>, int
+ *<em class="replaceable"><code>lock</code></em>)</code></p></dd>
+<dt><span class="term"><b>Description</b></span></dt>
+<dd>
+<p>Tries to lock the <code class="function">INKMutex </code>
+ <code class="code"><em class="replaceable"><code>mutex</code></em></code>. Information about
+ whether the lock was grabbed is set in <code class="code">int
+ *</code><code class="code"><em class="replaceable"><code>lock</code></em></code>.
+ <code class="function">INKReturnCode</code> tells you if the call was
+ successful or not, but does not indicate if the lock
+ was grabbed.</p>
+<p>In general, use <code class="function">InkMutexLockTry</code> to
+ obtain a mutex (see the example below).</p>
+</dd>
+<dt><span class="term"><b>Returns</b></span></dt>
+<dd>
+<p><code>1</code> if the mutex is successfully locked.</p>
+<p><code>0</code> if the mutex is already locked.</p>
+</dd>
+<dt><span class="term"><a name="INKEvent_2"></a><b>Example</b></span></dt>
+<dd>
+ <pre class="programlisting">int handler (INKCont contp, INKEvent event, void *edata)
+{
+ //This continuation tries to grab a mutex
+ int retval, lock = 0;
+retvak = InkMutexLockTry (mutex, &lock);
+ if (!lock)
+ {
+ /* Schedule a retry; RETRY_TIME should be 10 ms or longer. */
+ INKContSchedule (contp, RETRY_TIME);
+ return INK_EVENT_IMMEDIATE;
+ }
+
+ // Now the mutex has been grabbed
+ do_some_job ...
+ INKMutexUnlock (mutexp);
+}</pre></dd>
+</dl></div>
+</div>
+</body>
+</html>
Propchange: websites/staging/trafficserver/trunk/content/docs/v2/sdk/INKMutexLockTry.html
------------------------------------------------------------------------------
svn:executable = *