You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2010/11/06 07:30:02 UTC
svn commit: r1031963 [6/13] - in /trafficserver/site/branches/ats-cms:
content/docs/trunk/sdk/ templates/
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKCacheWrite.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKCacheWrite.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKCacheWrite.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKCacheWrite.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,97 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKCacheReady) - INKCacheReady
+INKCacheRemove - [Next](INKCacheRemove)
+### INKCacheWrite
+
+Initiates writing an object to the Traffic Server cache.
+
+**Prototype**
+ ~ `INKAction INKCacheWrite (INKCont <em class="replaceable"><code>contp`,
+ INKCacheKey *`key`*)
+
+**Arguments**
+ ~ `INKCont` `<em class="replaceable"><code>contp` is the
+ continuation the cache calls back (telling it whether the write
+ operation can proceed).
+
+ `INKCacheKey` `<em class="replaceable"><code>key` is the cache key
+ that corresponds to the object to be cached.
+
+**Description**
+ ~ Asks the Traffic Server cache if
+ `<em class="replaceable"><code>contp` can start writing the object
+ (corresponding to key) to the cache.
+
+ If the object can be written, then the cache calls
+ `<em class="replaceable"><code>contp` back with the event
+ `INK_EVENT_CACHE_OPEN_WRITE`. In this case, the cache also passes
+ `<em class="replaceable"><code>contp` a cache vconnection in the
+ `void *edata` argument; `<em class="replaceable"><code>contp` can
+ then initiate a write operation on that vconnection using
+ `INKVConnWrite`. The object is not committed to cache until the
+ vconnection is closed.
+
+ If the object cannot be written, then the cache calls
+ `<em class="replaceable"><code>contp` back with the event
+ `INK_EVENT_CACHE_OPEN_WRITE_FAILED`. This can happen, for example,
+ if there is another object with the same key being written to the
+ cache. An error code is passed in the `void *edata` argument of
+ `<em class="replaceable"><code>contp`. The error code can be:
+
+ - `INK_CACHE_ERROR_NOT_READY`: trying to access to the cache
+ before it's initialized.
+
+ - `INK_CACHE_ERROR_DOC_BUSY`: trying to write a document while
+ another continuation is writing or reading it.
+
+ - Any other value: unknown write failure.
+
+
+ The user (`<em class="replaceable"><code>contp`) has the option to
+ cancel the action returned by `INKCacheWrite`.
+
+ The actual data is written/read to the cache through the cache
+ vconnection. When the cache calls the user back with `OPEN_READ` or
+ `OPEN_WRITE`, it passes a `INKVConn` to the user. The user uses
+ this vconnection for any data transfer. When all data has been
+ transferred, the user must do a `INKVConnClose`. In case of any
+ errors, the user must do an
+ `INKVConnAbort(contp, 0).`
+
+ ![[Note]](images/docbook/note.png)
+ Note
+ Reentrant calls are possible; in other words, the cache can call
+ back the user (`<em class="replaceable"><code>contp`) in the same
+ call.
+
+ `INKCacheWrite` does not overwrite content already stored in the
+ cache under the same cache key. If you try to do so, then the cache
+ returns `INK_EVENT_CACHE_OPEN_WRITE_FAILED`. To overwrite content,
+ first call `INKCacheRemove` to remove the content and then call
+ `INKCacheWrite`.
+
+**Returns**
+ ~ An `INKAction` object if successful.
+
+ `INK_ERROR_PTR` if an argument is incorrect or the API fails.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigGet.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,50 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](PluginConfigurationFunctions) - Plugin Configuration
+Functions: INKConfigDataGet
+INKConfigRelease - [Next](INKConfigRelease)
+### INKConfigGet
+
+Returns a pointer to the Traffic Server configuration.
+
+**Prototype**
+ ~ `INKConfig INKConfigGet (unsigned int <em class="replaceable"><code>id`)
+
+**Description**
+ ~ Retrieves the current configuration pointer associated with the
+ configuration identifier `<em class="replaceable"><code>id`. The
+ function `INKConfigDataGet` can then be used to retrieve the data
+ pointer from within the configuration.
+
+ ~ `INKConfigGet` increments the reference count inside the
+ configuration. It is important to call `INKConfigRelease` to
+ decrement the reference count when the user is done with the
+ configuration pointer.
+
+ Before you call `INKConfigGet`, you must set the identifier
+ `<em class="replaceable"><code>id` to some plugin configuration
+ data using `INKConfigSet` (see the code snippet in the previous
+ section).
+
+**Returns**
+ ~ A pointer to the current Traffic Server configuration.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigRelease.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigRelease.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigRelease.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigRelease.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,40 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKConfigGet) - INKConfigGet
+INKConfigSet - [Next](INKConfigSet)
+### INKConfigRelease
+
+Releases a configuration pointer.
+
+**Prototype**
+ ~ `void INKConfigRelease (unsigned int <em class="replaceable"><code>id`,
+ INKConfig *`configp`*)
+
+**Description**
+ ~ Releases the configuration pointer
+ `<em class="replaceable"><code>configp` on the configuration
+ associated with the identifier `<em class="replaceable"><code>id`.
+
+ ~ If `<em class="replaceable"><code>configp` is no longer the
+ current configuration, then `INKConfigRelease` may call the
+ configuration's destroy function.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigSet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigSet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigSet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKConfigSet.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,99 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKConfigRelease) - INKConfigRelease
+Action Functions - [Next](ActionFunctions)
+### INKConfigSet
+
+Assigns an identifier to plugin configuration data.
+
+**Prototype**
+ ~ `unsigned int INKConfigSet (unsigned int <em class="replaceable"><code>id`,
+ void \**`data`*, INKConfigDestroyFunc *`funcp`*)
+
+**Arguments**
+ ~ `unsigned int``<em class="replaceable"><code>id` is the
+ identifier assigned to configuration
+ `<em class="replaceable"><code>data`. Do not use `1` or`2` for
+ `<em class="replaceable"><code>id` because Traffic Server
+ internally assigns these IDs to parent and HTTP configurations. You
+ can enter `0` as `<em class="replaceable"><code>id`, however, and
+ `INKConfigSet` will allocate an identifier for you (with a value of
+ `3` or greater). There is an internal upper limit of `100` for
+ `<em class="replaceable"><code>id`.
+
+ `void *``<em class="replaceable"><code>data` points
+ to the data you're associating with
+ `<em class="replaceable"><code>id`.
+
+ `INKConfigDestroyFunc` `<em class="replaceable"><code>funcp` is a
+ pointer to a destroy function that's called when Traffic Server
+ determines there are no more references to data. The only argument
+ for `<em class="replaceable"><code>funcp` is
+ `<em class="replaceable"><code> data`.
+
+**Description**
+ ~ Sets the opaque data pointer
+ `<em class="replaceable"><code>data` to be associated with the
+ configuration identifier `<em class="replaceable"><code>id`. If
+ `<em class="replaceable"><code>id` is `0`, then Traffic Server
+ allocates a new configuration identifier, and `INKConfigSet`
+ returns this value. If `<em class="replaceable"><code>id` is
+ non-zero, then `INKConfigSet` returns
+ `<em class="replaceable"><code>id`. To make sure that the
+ configuration identifier stays within the recommended range of `3`
+ to `100`, follow the code example in the previous section.
+
+ ![[Caution]](images/docbook/caution.png)
+ Caution
+ Never pick a configuration identifier yourself. When you need a new
+ config ID, you **must** always pass `0` as
+ `<em class="replaceable"><code>id` to the `INKConfigSet` API (which
+ will return a new valid `<em class="replaceable"><code> id`). It is
+ not safe to pick up a randomly-selected
+ `<em class="replaceable"><code>id` because there might be a
+ conflict with ones already in use by Traffic Server. This can cause
+ severe memory corruption, since the `INKConfig` mechanism is also
+ used internally by Traffic Server.
+
+ The `<em class="replaceable"><code>funcp` parameter is a pointer to
+ a destroy function that's called with
+ `<em class="replaceable"><code>data` as its only parameter when
+ Traffic Server determines there are no more references to
+ `<em class="replaceable"><code>data`.
+
+ ![[Note]](images/docbook/note.png)
+ Note
+ Since the current data always has a reference count of at least
+ `1`, `<em class="replaceable"><code> data` is not destroyed while
+ it is the current piece of configuration data.
+
+ See the code snippet in the previous section for usage.
+
+**Returns**
+ ~ The `unsigned int` that was assigned to the data. If the input
+ `<em class="replaceable"><code>id` is `0`, then a new configuration
+ identifier is allocated (with value `3` or larger). If the input
+ `<em class="replaceable"><code>id` is `0`, then the return value is
+ the available identifier allocated by Traffic Server. If
+ `<em class="replaceable"><code>id` is non-zero, then the return
+ value is `<em class="replaceable"><code>id`.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContCreate.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContCreate.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContCreate.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContCreate.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,51 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](ContinuationFunctions) - Continuation Functions:
+INKContCall
+INKContDataGet - [Next](INKContDataGet)
+### INKContCreate
+
+Creates a continuation.
+
+**Prototype**
+ ~ `INKCont INKContCreate (INKEventFunc <em class="replaceable"><code>funcp`,
+ INKMutex *`mutexp`*)
+
+**Description**
+ ~ Creates a new `INKCont`object. The continuation's handler
+ function is `<em class="replaceable"><code>funcp` and its mutex is
+ `<em class="replaceable"><code>mutexp`. As mentioned previously, a
+ continuation's mutex can be `NULL` - this is accomplished by
+ specifying `NULL` for `<em class="replaceable"><code>mutexp`.
+
+ ![[Note]](images/docbook/note.png)
+ Note
+ If you specify a `NULL` mutex, then a mutex is created for the
+ continuation and this mutex is held when the continuation is called
+ back.
+
+**Returns**
+ ~ A handle to the newly-created continuation.
+
+ `INK_ERROR_PTR` if the `INKCont` object is not successfully
+ created.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDataGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDataGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDataGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDataGet.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,42 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKContCreate) - INKContCreate
+INKContDataSet - [Next](INKContDataSet)
+### INKContDataGet
+
+Gets a data pointer from a continuation.
+
+**Prototype**
+ ~ `void* INKContDataGet (INKCont <em class="replaceable"><code>contp`)
+
+**Description**
+ ~ Retrieves the data pointer from
+ `<em class="replaceable"><code>contp`. The data pointer can be set
+ with a call to `INKContDataSet`; it is up to the plugin to
+ allocate/deallocate the pointer.
+
+**Returns**
+ ~ The pointer on the data for continuation
+ `<em class="replaceable"><code> contp`.
+
+ `INK_ERROR_PTR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDataSet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDataSet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDataSet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDataSet.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,41 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKContDataGet) - INKContDataGet
+INKContDestroy - [Next](INKContDestroy)
+### INKContDataSet
+
+Sets a data pointer for the specified continuation.
+
+**Prototype**
+ ~ `INKReturnCode INKContDataSet (INKCont <em class="replaceable"><code>contp`,
+ void \**`data`*)
+
+**Description**
+ ~ Sets the data pointer of `<em class="replaceable"><code> contp`
+ to `<em class="replaceable"><code> data`. The data can later be
+ retrieved by a call to `INKContDataGet`.
+
+**Returns**
+ ~ `INK_SUCCESS` if the pointer is successfully set.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDestroy.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDestroy.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDestroy.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContDestroy.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,44 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKContDataSet) - INKContDataSet
+INKContMutexGet - [Next](INKContMutexGet)
+### INKContDestroy
+
+Destroys a continuation.
+
+**Prototype**
+ ~ `INKReturnCode INKContDestroy (INKCont <em class="replaceable"><code>contp`)
+
+**Description**
+ ~ Destroys the continuation
+ `<em class="replaceable"><code> contp`. `INKContDestroy` is used to
+ destroy both continuations and
+ [vconnections](IOGuide#Vconnections "Vconnections"). Although
+ the internal continuation data structures are destroyed, it cannot
+ be guaranteed that there are no outstanding references to the
+ destroyed continuation.
+
+**Returns**
+ ~ `INK_SUCCESS` if the continuation is successfully destroyed.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContMutexGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContMutexGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContMutexGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContMutexGet.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,39 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKContDestroy) - INKContDestroy
+INKContSchedule - [Next](INKContSchedule)
+### INKContMutexGet
+
+Gets the mutex for a specified continuation.
+
+**Prototype**
+ ~ `INKMutex INKContMutexGet (INKCont <em class="replaceable"><code>contp`)
+
+**Description**
+ ~ Gets the mutex for the continuation
+ `<em class="replaceable"><code> contp`.
+
+**Returns**
+ ~ A handle to the mutex for the specified continuation.
+
+ `INK_ERROR_PTR` if there is an error.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContSchedule.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContSchedule.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContSchedule.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKContSchedule.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,48 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKContMutexGet) - INKContMutexGet
+Plugin Configuration Functions -
+[Next](PluginConfigurationFunctions)
+### INKContSchedule
+
+Schedules a continuation to receive an event.
+
+**Prototype**
+ ~ `INKAction INKContSchedule (INKCont <em class="replaceable"><code>contp`,
+ unsigned int *`timeout`*)
+
+**Description**
+ ~ Schedules the continuation represented by
+ `<em class="replaceable"><code>contp` to receive an event. The
+ `<em class="replaceable"><code>timeout` refers to a time (in
+ milliseconds) from the present to send the event. When
+ `<em class="replaceable"><code>contp` is called back and if
+ `<em class="replaceable"><code>timeout` is 0, then the event sent
+ will be `INK_EVENT_IMMEDIATE`. If
+ `<em class="replaceable"><code>timeout` is greater than 0, then the
+ event sent will be `INK_EVENT_TIMEOUT`.
+
+**Returns**
+ ~ An `INKAction` object.
+
+ `INK_ERROR_PTR` if there is an error.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKError.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKError.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKError.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKError.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,52 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIsDebugTagSet) - INKIsDebugTagSet
+INKAssert - [Next](INKAssert)
+### INKError
+
+Writes an error to the Traffic Server error log.
+
+**Prototype**
+ ~ `void INKError (const char *<em class="replaceable"><code>fmt`,
+ ...)
+
+**Arguments**
+ ~ `<em class="replaceable"><code>fmt` is the `printf` format
+ description.
+
+ `...`is the argument for the format description.
+
+**Description**
+ ~ 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 `INKError` is the API interface to this
+ error log. `INKError` is similar to `printf` except that instead of
+ writing the output to the C standard output, `INKError` writes
+ output to the Traffic Server error log. One advantage of `INKError`
+ over `printf` 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).
+
+**Example**
+ ~ INKError ("couldn't retrieve client request header\n");
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKHostLookupResultIPGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKHostLookupResultIPGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKHostLookupResultIPGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKHostLookupResultIPGet.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,49 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](HostLookupFunctions) - Host Lookup Functions:
+INKHostLookup
+Vconnection Functions - [Next](VconnectionFunctions)
+### INKHostLookupResultIPGet
+
+Gets the IP address of a hostname that Traffic Server has looked
+up.
+
+**Prototype**
+`InkReturnCode INKHostLookupResultIPGet (INKHostLookupResult <em class="replaceable"><code>lookup_result`,
+unsigned int \**`ip`*)
+
+**Arguments**
+`INKHostLookupResult` `<em class="replaceable"><code>lookup_result`
+is the information returned by `INKHostLookupResult`.
+
+`unsigned int *``<em class="replaceable"><code>ip` is
+set to the value of the IP address, in network byte order.
+
+**Description**
+Converts the information retrieved by `INKHostLookupResult` to an
+`unsigned` `int` representing the IP address.
+
+**Returns**
+`INK_SUCCESS` if the API is called successfully.
+
+`INK_ERROR` if an error occurs while calling the API or if an
+argument is invalid.
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKHttpTxnServerIntercept.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKHttpTxnServerIntercept.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKHttpTxnServerIntercept.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKHttpTxnServerIntercept.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,98 @@
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](InterceptingHTTPTransactionFuncs) - Intercepting HTTP
+Transaction Functions
+Alternate Selection Functions -
+[Next](AlternateSelectionFunctions)
+### INKHttpTxnServerIntercept
+
+Enables a plugin to intercept an HTTP request sent to an origin
+server and to serve the content in lieu of the origin server.
+
+**Prototype**
+ ~ `INKReturnCode INKHttpTxnServerIntercept (INKCont <em class="replaceable"><code>contp`,
+ INKHttpTxn *`txnp`*)
+
+**Arguments**
+ ~ `INKCont``<em class="replaceable"><code>contp` is the
+ continuation that is called to accept the connection.
+
+ `INKHttpTxn``<em class="replaceable"><code>txnp` is the current
+ HTTP transaction the plugin wants to intercept.
+
+**Description**
+ ~ 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.
+
+ This API should be used in the `INK_HTTP_READ_REQUEST_HDR_HOOK`
+ hook.
+
+ Once `INKHttpTxnServerIntercept` has been called, the handler of
+ the continuation `<em class="replaceable"><code>contp` receives an
+ event `INK_EVENT_NET_ACCEPT`. Note that the continuation passed
+ should not have a `NULL` mutex; if it does, then an error is
+ returned.
+
+ The void `*``<em class="replaceable"><code>data`*``*passed to the
+ handler of the continuation `<em class="replaceable"><code>contp`
+ is a data of type `netvconnection` representing the connection.
+
+ Once the vconnection is established, you can use regular
+ vconnection operations (`INKVConnRead`, `INKVConnWrite`, etc...).
+
+ A typical scenario when using `INKHttpTxnServerIntercept` is:
+
+ - Call `INKHttpTxnServerIntercept` from hook
+ `INK_HTTP_READ_REQUEST_HDR_HOOK` .
+
+ - Get called back on the continuation's handler passed as
+ argument to `INKHttpTxnServerIntercept`.
+
+ - Get the VC from argument void
+ `*``<em class="replaceable"><code>data`.
+
+ - Use `INKVConnRead` to get the HTTP header. Note that you will
+ not receive an event `INK_VCONN_READ_COMPLETE` - you will only
+ receive the event `INK_VCONN_READ_READY` because the number of
+ characters to read is unknown. You should rely on `INKTHttpParser`
+ to parse the request and return a status `INK_PARSE_DONE` when the
+ request is fully received (escape sequence `\r\n\r\n read`).
+
+ - Use `INKHttpParser` to parse the request.
+
+ - Use `INKVConnWrite` to write the HTTP response.
+
+
+ ![[Note]](images/docbook/note.png)
+ Note
+ The request and response go through the Traffic Server HTTP state
+ machine. The request and response can be cached; the request is
+ logged in `squid.log`.
+
+**Returns**
+ ~ `INK_SUCCESS` if the API is called successfully.
+
+ `INK_ERROR` 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 `NULL` mutex.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockReadAvail.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockReadAvail.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockReadAvail.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockReadAvail.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,45 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](IOBufferInterfaceFunctions) - IO Buffer Interface
+Functions: INKIOBufferBlockNext
+INKIOBufferBlockReadStart - [Next](INKIOBufferBlockReadStart)
+### INKIOBufferBlockReadAvail
+
+Indicates the number of IO buffer bytes available for reading.
+
+**Prototype**
+ ~ `int INKIOBufferBlockReadAvail (INKIOBufferBlock <em class="replaceable"><code>blockp`,
+ INKIOBufferReader *`readerp`*)
+
+**Description**
+ ~ Obtains the number of bytes available for reading in the IO
+ buffer block `<em class="replaceable"><code>blockp`. The
+ `<em class="replaceable"><code>readerp` parameter is needed because
+ each IO buffer reader maintains its own current offset.
+
+**Returns**
+ ~ The number of bytes available for reading in the IO buffer
+ block.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockReadStart.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockReadStart.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockReadStart.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockReadStart.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,113 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferBlockReadAvail) - INKIOBufferBlockReadAvail
+INKIOBufferBlockWriteAvail -
+[Next](INKIOBufferBlockWriteAvail)
+### INKIOBufferBlockReadStart
+
+Starts reading an IO buffer block.
+
+**Prototype**
+ ~ `const char* INKIOBufferBlockReadStart (INKIOBufferBlock <em class="replaceable"><code>blockp`,
+ INKIOBufferReader *`readerp`*, int \**`avail`*)
+
+**Description**
+ ~ Gets the start point for reading from the IO buffer block
+ `<em class="replaceable"><code>blockp`. The
+ `<em class="replaceable"><code>readerp` parameter is needed because
+ each IO buffer reader maintains its own current offset.
+ `INKIOBufferBlockReadStart` stores the amount of data available for
+ reading in the parameter `<em class="replaceable"><code>avail`.
+ This is the same value that `INKIOBufferBlockReadAvail` returns. If
+ `<em class="replaceable"><code>avail` is `NULL`, then no attempt is
+ made to dereference it.
+
+ ![[Note]](images/docbook/note.png)
+ Note
+ The `<em class="replaceable"><code>avail` parameter stores the
+ amount of data available for reading on the specified
+ `INKIOBufferBlock`. If you need to read all available data in an
+ `INKIOBuffer`, then make sure that your code keeps checking
+ `INKIOBufferBlocks` until all the available data is read.
+
+**Returns**
+ ~ A pointer to the starting point for reading from the specified
+ IO buffer block.
+
+ `INK_ERROR_PTR` if there is an error.
+
+**Example**
+ ~ Below is a sample routine, `transform_read_status_event`
+ (modified from `server-transform.c`), that attempts to read a
+ certain number of bytes. It calls `INKIOBufferBlockReadStart` to
+ determine the number of bytes available to read (and get the start
+ point within the `INKIOBufferBlock` to start reading). However,
+ `INKIOBufferBlockReadStart` returns the available bytes within the
+ current block only. Because the `INKIOBuffer` data structure
+ contains a linked list of `INKIOBufferBlocks`, the available data
+ within the `INKIOBuffer` could span more than one
+ `INKIOBufferBlock`. The correct way to code this subroutine is to
+ keep checking `INKIOBufferBlocks` for available data until all of
+ the available `INKIOBuffer` data is read.
+
+ 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;
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockWriteAvail.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockWriteAvail.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockWriteAvail.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockWriteAvail.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,42 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferBlockReadStart) - INKIOBufferBlockReadStart
+INKIOBufferBlockWriteStart -
+[Next](INKIOBufferBlockWriteStart)
+### INKIOBufferBlockWriteAvail
+
+Indicates the number of IO buffer bytes available for writing.
+
+**Prototype**
+ ~ `int INKIOBufferBlockWriteAvail (INKIOBufferBlock <em class="replaceable"><code>blockp`)
+
+**Description**
+ ~ Returns the number of bytes available for writing in the IO
+ buffer block `<em class="replaceable"><code>blockp`.
+
+**Returns**
+ ~ The number of bytes available for writing (in the specified
+ buffer block).
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockWriteStart.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockWriteStart.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockWriteStart.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferBlockWriteStart.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,47 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferBlockWriteAvail) -
+INKIOBufferBlockWriteAvail
+INKIOBufferCopy - [Next](INKIOBufferCopy)
+### INKIOBufferBlockWriteStart
+
+Starts a write to the specified IO buffer block.
+
+**Prototype**
+ ~ `char* INKIOBufferBlockWriteStart (INKIOBufferBlock <em class="replaceable"><code>blockp`,
+ int \**`avail`*)
+
+**Description**
+ ~ Gets the start point for writing into the IO buffer block
+ `<em class="replaceable"><code>blockp`. The amount of data
+ available for writing is stored in the parameter
+ `<em class="replaceable"><code>avail`. If
+ `<em class="replaceable"><code>avail` is `NULL`, then no attempt is
+ made to dereference it.
+
+**Returns**
+ ~ A pointer to the starting point for writing to the specified IO
+ buffer block.
+
+ `INK_ERROR_PTR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferCopy.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferCopy.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferCopy.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferCopy.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,48 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferBlockWriteStart) -
+INKIOBufferBlockWriteStart
+INKIOBufferCreate - [Next](INKIOBufferCreate)
+### INKIOBufferCopy
+
+Copies an IO buffer.
+
+**Prototype**
+ ~ `int INKIOBufferCopy (INKIOBuffer <em class="replaceable"><code>bufp`,
+ INKIOBufferReader *`readerp`*, int *`length`*, int *`offset`*)
+
+**Description**
+ ~ Copies `<em class="replaceable"><code>length` bytes of data
+ from the IO buffer reader `<em class="replaceable"><code>readerp`
+ to the IO buffer `<em class="replaceable"><code>bufp`. As
+ previously described, `INKIOBufferCopy` does not actually copy the
+ data - it simply copies pointers and adjusts reference counts
+ appropriately. The parameter `<em class="replaceable"><code>offset`
+ specifies the offset from `<em class="replaceable"><code>readerp`'s
+ current position to start copying from.
+
+**Returns**
+ ~ The number of bytes actually copied.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferCreate.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferCreate.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferCreate.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferCreate.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,40 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferCopy) - INKIOBufferCopy
+INKIOBufferDestroy - [Next](INKIOBufferDestroy)
+### INKIOBufferCreate
+
+Creates an IO buffer.
+
+**Prototype**
+ ~ `INKIOBuffer INKIOBufferCreate (void)`
+
+**Description**
+ ~ Creates a new IO Buffer. The IO buffer that's created is
+ initially empty.
+
+**Returns**
+ ~ A handle to the newly-created IO buffer.
+
+ `INK_ERROR_PTR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferDestroy.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferDestroy.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferDestroy.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferDestroy.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,42 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferCreate) - INKIOBufferCreate
+INKIOBufferProduce - [Next](INKIOBufferProduce)
+### INKIOBufferDestroy
+
+Destroys an IO buffer.
+
+**Prototype**
+ ~ `INKReturnCode INKIOBufferDestroy (INKIOBuffer <em class="replaceable"><code>bufp`)
+
+**Description**
+ ~ Destroys the IO buffer `<em class="replaceable"><code>bufp`.
+ 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.
+
+**Returns**
+ ~ `INK_SUCCESS` if the IO buffer is successfully destroyed.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferProduce.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferProduce.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferProduce.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferProduce.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,44 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferDestroy) - INKIOBufferDestroy
+INKIOBufferReaderAlloc - [Next](INKIOBufferReaderAlloc)
+### INKIOBufferProduce
+
+Makes a specified number of bytes of data available for reading.
+
+**Prototype**
+ ~ `INKReturnCode INKIOBufferProduce (INKIObuffer <em class="replaceable"><code>bufp`,
+ int *`nbytes`*)
+
+**Description**
+ ~ Makes `<em class="replaceable"><code>nbytes` of data available
+ for reading in the buffer `<em class="replaceable"><code>bufp`. A
+ common paradigm for writing to a buffer is to copy data into a
+ buffer block and then call `INKIOBufferProduce` to make the new
+ data visible to readers.
+
+**Returns**
+ ~ `INK_SUCCESS` if the operation completes successfully.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderAlloc.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderAlloc.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderAlloc.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderAlloc.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,40 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferProduce) - INKIOBufferProduce
+INKIOBufferReaderAvail - [Next](INKIOBufferReaderAvail)
+### INKIOBufferReaderAlloc
+
+Allocates an IO buffer reader.
+
+**Prototype**
+ ~ `INKIOBufferReader INKIOBufferReaderAlloc (INKIOBuffer <em class="replaceable"><code>bufp`)
+
+**Description**
+ ~ Allocates an IO buffer reader for the IO buffer
+ `<em class="replaceable"><code>bufp`.
+
+**Returns**
+ ~ A handle to the newly-allocated IO buffer.
+
+ `INK_ERROR_PTR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderAvail.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderAvail.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderAvail.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderAvail.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,40 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferReaderAlloc) - INKIOBufferReaderAlloc
+INKIOBufferReaderClone - [Next](INKIOBufferReaderClone)
+### INKIOBufferReaderAvail
+
+Gets the number of bytes available for reading.
+
+**Prototype**
+ ~ `int INKIOBufferReaderAvail (INKIOBufferReader <em class="replaceable"><code>readerp`)
+
+**Description**
+ ~ Gets the total number of bytes available for reading by the IO
+ buffer reader, `<em class="replaceable"><code>readerp`.
+
+**Returns**
+ ~ The number of bytes available for reading.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderClone.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderClone.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderClone.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderClone.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,42 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferReaderAvail) - INKIOBufferReaderAvail
+INKIOBufferReaderConsume - [Next](INKIOBufferReaderConsume)
+### INKIOBufferReaderClone
+
+Clones an IO buffer reader.
+
+**Prototype**
+ ~ `INKIOBufferReader INKIOBufferReaderClone (INKIOBufferReader <em class="replaceable"><code>readerp`)
+
+**Description**
+ ~ Makes a clone of the IO buffer reader
+ `<em class="replaceable"><code>readerp`. The cloned reader points
+ to the same IO buffer and initially has the same read offset as
+ `<em class="replaceable"><code>readerp`.
+
+**Returns**
+ ~ A handle to the cloned IO buffer.
+
+ `INK_ERROR_PTR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderConsume.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderConsume.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderConsume.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderConsume.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,48 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferReaderClone) - INKIOBufferReaderClone
+INKIOBufferReaderFree - [Next](INKIOBufferReaderFree)
+### INKIOBufferReaderConsume
+
+Consumes an IO buffer reader.
+
+**Prototype**
+ ~ `INKReturnCode INKIOBufferReaderConsume (INKIOBufferReader <em class="replaceable"><code>readerp`,
+ int *`nbytes`*)
+
+**Description**
+ ~ Moves the read offset for the IO buffer reader
+ `<em class="replaceable"><code>readerp` ahead by the amount
+ `<em class="replaceable"><code> nbytes`.
+
+ ![[Caution]](images/docbook/caution.png)
+ Caution
+ 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.
+
+**Returns**
+ ~ `INK_SUCCESS` if the operation completes successfully.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderFree.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderFree.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderFree.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderFree.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,45 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferReaderConsume) - INKIOBufferReaderConsume
+INKIOBufferReaderStart - [Next](INKIOBufferReaderStart)
+### INKIOBufferReaderFree
+
+Frees an IO buffer reader.
+
+**Prototype**
+ ~ `INKReturnCode INKIOBufferReaderFree (INKIOBufferReader <em class="replaceable"><code>readerp`)
+
+**Description**
+ ~ 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
+ `INKIOBufferReaderFree`). 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.
+
+**Returns**
+ ~ `INK_SUCCESS` if the IO buffer is successfully freed.
+
+ `INK_ERROR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderStart.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderStart.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderStart.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferReaderStart.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,43 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferReaderFree) - INKIOBufferReaderFree
+INKIOBufferSizedCreate - [Next](INKIOBufferSizedCreate)
+### INKIOBufferReaderStart
+
+Starts an IO buffer reader.
+
+**Prototype**
+ ~ `INKIOBufferBlock INKIOBufferReaderStart (INKIOBufferReader <em class="replaceable"><code>readerp`)
+
+**Description**
+ ~ Gets the read start block for the IO buffer reader.
+ `INKIOBufferReaderStart` may return `NULL` 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.
+
+**Returns**
+ ~ The read start block for the IO buffer reader.
+
+ `INK_ERROR_PTR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferSizedCreate.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferSizedCreate.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferSizedCreate.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferSizedCreate.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,55 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferReaderStart) - INKIOBufferReaderStart
+INKIOBufferStart - [Next](INKIOBufferStart)
+### INKIOBufferSizedCreate
+
+Creates an `INKIOBuffer` with the specified size index.
+
+**Prototype**
+ ~ `INKIOBuffer INKIOBufferSizedCreate (INKIOBufferSizeIndex <em class="replaceable"><code>index`)
+
+**Arguments**
+ ~ `INKIOBufferSizeIndex``<em class="replaceable"><code> index` is
+ the size of the new `IOBuffer` to create. It should be one of the
+ following values:
+ - `INK_IOBUFFER_SIZE_INDEX_128`
+ - `INK_IOBUFFER_SIZE_INDEX_256`
+ - `INK_IOBUFFER_SIZE_INDEX_512`
+ - `INK_IOBUFFER_SIZE_INDEX_1K`
+ - `INK_IOBUFFER_SIZE_INDEX_2K`
+ - `INK_IOBUFFER_SIZE_INDEX_4K`
+ - `INK_IOBUFFER_SIZE_INDEX_8K`
+ - `INK_IOBUFFER_SIZE_INDEX_16K`
+ - `INK_IOBUFFER_SIZE_INDEX_32K`
+
+
+**Description**
+ ~ Creates an `INKIOBuffer` of the specifed size.
+
+**Returns**
+ ~ An `IOBuffer` object if the API call is successful.
+
+ `INK_ERROR_PTR` if an error occurs while calling the API or if an
+ argument is invalid.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferStart.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferStart.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferStart.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferStart.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,42 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferSizedCreate) - INKIOBufferSizedCreate
+INKIOBufferWaterMarkGet - [Next](INKIOBufferWaterMarkGet)
+### INKIOBufferStart
+
+Starts an IO buffer.
+
+**Prototype**
+ ~ `INKIOBufferBlock INKIOBufferStart (INKIOBuffer <em class="replaceable"><code>bufp`)
+
+**Description**
+ ~ Gets the write start block for the IO buffer
+ `<em class="replaceable"><code>bufp`. `INKIOBufferStart` always
+ returns a block with a non-zero amount of space available for
+ writing. If necessary, a new block is added to accomplish this.
+
+**Returns**
+ ~ The write start block for the IO buffer writer.
+
+ `INK_ERROR_PTR` if an error occurs.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferWaterMarkGet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferWaterMarkGet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferWaterMarkGet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferWaterMarkGet.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,55 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferStart) - INKIOBufferStart
+INKIOBufferWaterMarkSet - [Next](INKIOBufferWaterMarkSet)
+### INKIOBufferWaterMarkGet
+
+Gets the current watermark for the specified buffer.
+
+**Prototype**
+ ~ `InkReturnCode INKIOBufferWaterMarkGet (INKIOBuffer <em class="replaceable"><code>bufp`,
+ int \**`watermark`*)
+
+**Arguments**
+ ~ `INKIOBuffer` `<em class="replaceable"><code>bufp` is the
+ **`IOBuffer`** whose `water_mark` is to be obtained.
+
+ `int *<em class="replaceable"><code>watermark` is set to the
+ watermark value.
+
+**Description**
+ ~ Gets the current watermark for the specified buffer. A water
+ mark applies only to a `<b>NetVConnection</b>` and should therefore
+ only be used when reading data from one.
+
+ When the watermark is set to `N` and after `INKVConnRead` is
+ called, the net processor calls back the reader (with an event
+ `INK_VCONN_READ_READY`) only when at least `N` bytes of data are
+ available for reading.
+
+**Returns**
+ ~ `INK_SUCCESS` if the API call is successful.
+
+ `INK_ERROR` if an error occurs while calling the API or if an
+ argument is invalid.
+
+
Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferWaterMarkSet.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferWaterMarkSet.en.mdtext?rev=1031963&r1=1031962&r2=1031963&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferWaterMarkSet.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/INKIOBufferWaterMarkSet.en.mdtext Sat Nov 6 06:29:56 2010
@@ -1,2 +1,55 @@
+[![image](images/docbook/ts75.png)](/index)â¢
+Title: Apache Traffic Server⢠Software Developers Kit
+Notice: Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+[Prev](INKIOBufferWaterMarkGet) - INKIOBufferWaterMarkGet
+INKIOBufferWrite - [Next](INKIOBufferWrite)
+### INKIOBufferWaterMarkSet
+
+Sets the current watermark for the specified buffer.
+
+**Prototype**
+ ~ `INKReturnCode INKIOBufferWaterMarkSet (INKIOBuffer <em class="replaceable"><code>bufp`,int
+ *`water_mark`*)
+
+**Arguments**
+ ~ `INKIOBuffer` `<em class="replaceable"><code>bufp` is the
+ **`IOBuffer`** whose watermark is to be set.
+
+ `int <em class="replaceable"><code>water_mark` is the watermark
+ value to set for `<em class="replaceable"><code>bufp`.
+
+**Description**
+ ~ Sets the current watermark of the specified buffer.
+
+ A water mark applies only to a `<b>NetVConnection</b>` and should
+ therefore be used only when reading data from one. When the
+ watermark is set to N and after `INKVConnRead` is called, the net
+ processor calls back the reader (with an event
+ `INK_VCONN_READ_READY`) only when at least N bytes of data are
+ available for reading.
+
+**Returns**
+ ~ `INK_SUCCESS` if the operation completes successfully.
+
+ `INK_ERROR` if an error occurs while calling the API or if an
+ argument is invalid.
+
+