Author: igalic
Date: Tue Apr 17 10:12:47 2012
New Revision: 1327024
URL: http://svn.apache.org/viewvc?rev=1327024&view=rev
Log:
Fix formatting issues
Modified:
trafficserver/site/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext
trafficserver/site/trunk/content/docs/trunk/sdk/http-transformation-plugin/append-transform-plugin.en.mdtext
trafficserver/site/trunk/content/docs/trunk/sdk/new-protocol-plugins/index.en.mdtext
Modified:
trafficserver/site/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext
URL:
http://svn.apache.org/viewvc/trafficserver/site/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext?rev=1327024&r1=1327023&r2=1327024&view=diff
==============================================================================
---
trafficserver/site/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext
(original)
+++
trafficserver/site/trunk/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext
Tue Apr 17 10:12:47 2012
@@ -1,4 +1,4 @@
-Title: Setting a Global Hook ### {#SettingaGlobalHook}
+Title: Setting a Global Hook
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
Modified:
trafficserver/site/trunk/content/docs/trunk/sdk/http-transformation-plugin/append-transform-plugin.en.mdtext
URL:
http://svn.apache.org/viewvc/trafficserver/site/trunk/content/docs/trunk/sdk/http-transformation-plugin/append-transform-plugin.en.mdtext?rev=1327024&r1=1327023&r2=1327024&view=diff
==============================================================================
---
trafficserver/site/trunk/content/docs/trunk/sdk/http-transformation-plugin/append-transform-plugin.en.mdtext
(original)
+++
trafficserver/site/trunk/content/docs/trunk/sdk/http-transformation-plugin/append-transform-plugin.en.mdtext
Tue Apr 17 10:12:47 2012
@@ -33,7 +33,7 @@ Below is a list of the functions in `app
appear in the source code. Below each entry is a description of what the
function
does:
-* **`my\_data\_alloc`**
+* **`my_data_alloc`**
Allocates and initializes a `MyData` structure. The plugin defines a
struct,
`MyData`, as follows:
@@ -49,18 +49,18 @@ does:
needs. The transformation's data pointer is set to a `MyData` pointer using
`TSContDataSet` in the `handle_transform` routine.
-* **`my\_data\_destroy`**
+* **`my_data_destroy`**
Destroys objects of type `MyData`. To deallocate the transform's data, the
`append_transform` routine (see below) calls `my_data_destroy` when the
transformation
is complete.
-* **`handle\_transform`**
+* **`handle_transform`**
This function does the actual data transformation. The transformation is
created
in `transform_add` (see below). `handle_transform` is called by
`append_transform`.
-* **`append\_transform`**
+* **`append_transform`**
This is the handler function for the transformation vconnection created in
`transform_add`. It is the implementation of the vconnection.
@@ -85,12 +85,12 @@ This function examines the `Content-Type
header. If the value of the MIME field is `text/html`, then the function
returns
1; otherwise, it returns zero.
-* **`transform\_add`**
+* **`transform_add`**
Creates the transformation for the current transaction and sets up a
transformation
hook. The handler function for the transformation is `append_transform`.
-* **`transform\_plugin`**
+* **`transform_plugin`**
This is the handler function for the main continuation for the plugin.
Traffic
Server calls this function whenever it reads an HTTP response header.
`transform_plugin`
Modified:
trafficserver/site/trunk/content/docs/trunk/sdk/new-protocol-plugins/index.en.mdtext
URL:
http://svn.apache.org/viewvc/trafficserver/site/trunk/content/docs/trunk/sdk/new-protocol-plugins/index.en.mdtext?rev=1327024&r1=1327023&r2=1327024&view=diff
==============================================================================
---
trafficserver/site/trunk/content/docs/trunk/sdk/new-protocol-plugins/index.en.mdtext
(original)
+++
trafficserver/site/trunk/content/docs/trunk/sdk/new-protocol-plugins/index.en.mdtext
Tue Apr 17 10:12:47 2012
@@ -192,28 +192,28 @@ functions to handle each state.
The steps below describe the flow of execution illustrated in
["How Transaction State Machines are Implemented in the Protocol
Plugin"](#ImplementTransStMachine).
-1. The handler for the TSM, (called **`main\_handler`** in the Protocol plugin)
+1. The handler for the TSM, (called **`main_handler`** in the Protocol plugin)
receives events from the TSM.
-2. **`main\_handler`** examines the state of the transaction-in particular, it
+2. **`main_handler`** examines the state of the transaction-in particular, it
examines the current handler.
-3. **`main\_handler`** calls the **`current\_handler`** (which is one of the
-state handler functions), and then passes the current event to
**`current\_handler`**.
+3. **`main_handler`** calls the **`current_handler`** (which is one of the
+state handler functions), and then passes the current event to
**`current_handler`**.
In [the image below](#ImplementTransStMachine) below, the current handler is
-called **`state2\_handler`**.
+called **`state2_handler`**.
-4. The **`current\_handler`** handles the event and updates the data.
+4. The **`current_handler`** handles the event and updates the data.
In [the image below](#ImplementTransStMachine) below, the state is changed from
**`state2`** to **`state3`** (and the current handler is changed from
-**`state2\_handler`** to **`state3\_handler`**).
-The next time **`main\_handler`** receives an event, it will be processed
-by **`state3\_handler`**.
+**`state2_handler`** to **`state3_handler`**).
+The next time **`main_handler`** receives an event, it will be processed
+by **`state3_handler`**.
-5. **`state2\_handler`** arranges the next callback of the TSM. Typically, it
+5. **`state2_handler`** arranges the next callback of the TSM. Typically, it
gives Traffic Server additional work to do (such as writing a file to cache) so
that it can progress to the next state.
-The TSM (**`main\_handler`**) then waits for the next event to arrive
+The TSM (**`main_handler`**) then waits for the next event to arrive
from Traffic Server.
**How Transaction State Machines are Implemented in the Protocol Plugin**
{#ImplementTransStMachine}
@@ -251,66 +251,66 @@ the new accept state machine via **`TSCo
5. The **`init`** function arranges the callback of the accept state machine
when
there is a network connection by using **`TSNetAccept`**.
-6. The handler for the accept state machine is **`accept\_event`** in the
+6. The handler for the accept state machine is **`accept_event`** in the
`Accept.c` file. When Traffic Server's Net Processor sends
-**`TS\_EVENT\_NET\_ACCEPT`** to the accept state machine, **`accept\_event`**
creates
-a transaction state machine (**`txn\_sm`**) by calling **`TxnSMCreate`**.
-Notice that **`accept\_event`** creates a mutex for the transaction state
machine,
+**`TS_EVENT_NET_ACCEPT`** to the accept state machine, **`accept_event`**
creates
+a transaction state machine (**`txn_sm`**) by calling **`TxnSMCreate`**.
+Notice that **`accept_event`** creates a mutex for the transaction state
machine,
since each transaction state machine has its own mutex.
7. The **`TxnSMCreate`** function is in the `TxnSM.c` file. The first thing it
does is initialize the transaction's data, which is of type `TxnSM` (as
defined in `TxnSM.h`).
-Notice that the current handler (**`q\_current\_handler`**) is set to
**`state\_start`**.
+Notice that the current handler (**`q_current_handler`**) is set to
**`state_start`**.
8. **`TxnSMCreate`** then creates a transaction state machine using
**`TSContCreate`**.
-The handler for the transaction state machine is **`main\_handler`**, which
+The handler for the transaction state machine is **`main_handler`**, which
is in the `TxnSM.c` file.
-9. When **`accept\_event`** receives **`TS\_EVENT\_NET\_ACCEPT`**, it calls the
-transaction state machine ( **`TSContCall (txn\_sm, 0, NULL);`** ).
-The event passed to **`main\_handler`** is `0` (**`TS\_EVENT\_NONE`**).
+9. When **`accept_event`** receives **`TS_EVENT_NET_ACCEPT`**, it calls the
+transaction state machine ( **`TSContCall (txn_sm, 0, NULL);`** ).
+The event passed to **`main_handler`** is `0` (**`TS_EVENT_NONE`**).
-10. The first thing **`main\_handler`** does is examine the current
**`txn\_sm`**
-state by calling **`TSContDataGet`**. The state is **`state\_start`**.
+10. The first thing **`main_handler`** does is examine the current **`txn_sm`**
+state by calling **`TSContDataGet`**. The state is **`state_start`**.
-11. **`main\_handler`** then invokes the handler for **`state\_start`** by
using
+11. **`main_handler`** then invokes the handler for **`state_start`** by using
the function pointer **`TxnSMHandler`** (as defined in `TxnSM.h`).
-12. The **`state\_start`** handler function (in the `TxnSM.c` file) is handed
an
-event (at this stage, the event is **`TS\_EVENT\_NET\_ACCEPT`**) and a client
-vconnection. **`state\_start`** checks to see if this client vconnection is
closed;
-if it is not, then **`state\_start`** attempts to read data from the client
-vconnection into an **`TSIOBuffer`** (**`state\_start`** is handling the event
it receives).
+12. The **`state_start`** handler function (in the `TxnSM.c` file) is handed an
+event (at this stage, the event is **`TS_EVENT_NET_ACCEPT`**) and a client
+vconnection. **`state_start`** checks to see if this client vconnection is
closed;
+if it is not, then **`state_start`** attempts to read data from the client
+vconnection into an **`TSIOBuffer`** (**`state_start`** is handling the event
it receives).
-13. **`state\_start`** changes the current handler to
**`state\_interface\_with\_client`**
+13. **`state_start`** changes the current handler to
**`state_interface_with_client`**
(that is, it updates the state of the transaction to the next state).
-14. **`state\_start`** initiates a read of the client vconnection (arranges for
-Traffic Server to send **`TS\_EVENT\_VCONN\_READ\_READY`** events to the TSM)
+14. **`state_start`** initiates a read of the client vconnection (arranges for
+Traffic Server to send **`TS_EVENT_VCONN_READ_READY`** events to the TSM)
by calling **`TSVConnRead`**.
-15. **`state\_interface\_with\_client`** is activated by the next event from
Traffic
+15. **`state_interface_with_client`** is activated by the next event from
Traffic
Server. It checks for errors and examines the read VIO for the read operation
initiated by **`TSVConnRead`**.
-16. If the read VIO is the **`client\_read\_VIO`** (which we are expecting at
this
-stage in the transaction), then **`state\_interface\_with\_client`** updates
the
-state to **`state\_read\_request\_from\_client`** .
+16. If the read VIO is the **`client_read_VIO`** (which we are expecting at
this
+stage in the transaction), then **`state_interface_with_client`** updates the
+state to **`state_read_request_from_client`** .
-17. **`state\_read\_request\_from\_client`** handles actual
**`TS\_EVENT\_READ\_READY`**
+17. **`state_read_request_from_client`** handles actual
**`TS_EVENT_READ_READY`**
events and reads the client request.
-18. **`state\_read\_request\_from\_client`** parses the client request.
+18. **`state_read_request_from_client`** parses the client request.
-19. **`state\_read\_request\_from\_client`** updates the current state to the
next
-state, **`state\_handle\_cache\_lookup`** .
+19. **`state_read_request_from_client`** updates the current state to the next
+state, **`state_handle_cache_lookup`** .
-20. **`state\_read\_request\_from\_client`** arranges for Traffic Server to
call back
+20. **`state_read_request_from_client`** arranges for Traffic Server to call
back
the TSM with the next set of events (initiating the cache lookup) by calling
**`TSCacheRead`**.
-21. When the **`TSCacheRead`** sends the TSM either **`TS\_EVENT\_OPEN\_READ`**
-(a cache hit) or **`TS\_EVENT\_OPEN\_READ\_FAILED`** (a cache miss),
**`main\_handler`**
-calls **`state\_handle\_cache\_lookup`**.
+21. When the **`TSCacheRead`** sends the TSM either **`TS_EVENT_OPEN_READ`**
+(a cache hit) or **`TS_EVENT_OPEN_READ_FAILED`** (a cache miss),
**`main_handler`**
+calls **`state_handle_cache_lookup`**.