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/12/14 04:42:13 UTC

svn commit: r1048924 - in /trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples: ./ blacklist-plugin/

Author: igalic
Date: Tue Dec 14 03:42:13 2010
New Revision: 1048924

URL: http://svn.apache.org/viewvc?rev=1048924&view=rev
Log:
Migrate Blacklist Plugin documentation. Remove the UI callbacks from documenation

Removed:
    trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-ui-update-callbacks.en.mdtext
Modified:
    trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.mdtext
    trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/index.en.mdtext
    trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext
    trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.mdtext
    trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.mdtext
    trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/index.en.mdtext

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.mdtext?rev=1048924&r1=1048923&r2=1048924&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/accessing-the-transaction-being-processed.en.mdtext Tue Dec 14 03:42:13 2010
@@ -0,0 +1,64 @@
+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](setting-a-global-hook) - Setting a Global Hook
+
+Setting Up a Transaction Hook - [Next](setting-up-a-transaction-hook)
+
+### Accessing the Transaction Being Processed ### {#AccessingTransactionBeingProcessed}
+
+A continuation's handler function is of type `TSEventFunc`; the prototype
+is as follows:
+
+`static int function_name (TSCont contp, TSEvent event, void *edata)`
+
+In general, the return value of the handler function is not used. The continuation
+argument is the continuation being called back, the event is the event being
+sent to the continuation, and the data pointed to by `void *edata` depends
+on the type of event. The data types for each event type are listed in
+[Writing Handler Functions](../../continuations/writing-handler-functions)
+
+The key here is that if the event is an HTTP transaction event, then the data
+passed to the continuation's handler is of type `TSHttpTxn` (a data type that
+represents HTTP transactions). Your plugin can then do things with the transaction.
+Here's how it looks in the code for the Blacklist plugin's handler:
+
+	:::c
+	static int
+	blacklist_plugin (TSCont contp, TSEvent event, void *edata)
+	{
+	     TSHttpTxn txnp = (TSHttpTxn) edata;
+	     switch (event) {
+	          case TS_EVENT_HTTP_OS_DNS:
+	               handle_dns (txnp, contp);
+	               return 0;
+	          case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
+	               handle_response (txnp);
+	               return 0;
+	          case TS_EVENT_MGMT_UPDATE:
+	               read_blacklist ();
+	               return 0;
+	          default:
+	               break;
+	     }
+	     return 0;
+	}
+
+For example: when the origin server DNS lookup event is sent, `blacklist_plugin`
+can call `handle_dns `and pass `txnp` as an argument.
+

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/index.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/index.en.mdtext?rev=1048924&r1=1048923&r2=1048924&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/index.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/index.en.mdtext Tue Dec 14 03:42:13 2010
@@ -0,0 +1,94 @@
+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](../) - Header-Based Plugin Examples
+
+Setting a Global Hook - [Next](setting-a-global-hook)
+
+## The Blacklist Plugin ## {#BlacklistPlugin}
+
+The sample blacklisting plugin included in the Traffic Server SDK is `blacklist-1.c`.
+This plugin checks every incoming HTTP client request against a list of blacklisted
+web sites. If the client requests a blacklisted site, then the plugin returns
+an `Access forbidden` message to the client.
+
+The flow of HTTP processing with the blacklist plugin is illustrated in the
+figure titled ["Blacklist Plugin"](../../how-to-create-trafficserver-plugins#BlacklistPlugin).
+This example also contains a simple configuration management interface. It
+can read a list of blacklisted sites from a file (`blacklist.txt`) that can
+be updated by a Traffic Server administrator. When the configuration file is
+updated, Traffic Server sends an event to the plugin that wakes it up to do
+some work.
+
+### Creating the Parent Continuation ### {#CreatingParentContinuation}
+
+You create the static parent continuation in the mandatory `TSPluginInit`
+function. This parent continuation effectively **is** the plugin: the plugin
+executes only when this continuation receives an event from Traffic Server. Traffic
+Server passes the event as an argument to the continuation's handler function.
+When you create continuations, you must create and specify their handler functions.
+
+You can specify an optional mutex lock when you create continuations. The mutex
+lock protects data shared by asynchronous processes. Because Traffic Server
+has a multi-threaded design, race conditions can occur if several threads try
+to access the same continuation's data.
+
+Here is how the static parent continuation is created in `blacklist-1.c`:
+
+	:::c
+	void
+	TSPluginInit (int argc, const char *argv[])
+	{ ...
+	       TSCont contp;
+	       	
+	       contp = TSContCreate (blacklist_plugin, NULL);
+	...
+	}
+
+The handler function for the plugin is `blacklist_plugin`, and the mutex is
+null. The continuation handler function's job is to handle the events that
+are sent to it; accordingly, the `blacklist_plugin` routine consists of a switch
+statement that covers each of the events that might be sent to it:
+
+	:::c
+	static int
+	blacklist_plugin (TSCont contp, TSEvent event, void *edata)
+	{
+		TSHttpTxn txnp = (TSHttpTxn) edata;
+		switch (event) {
+			case TS_EVENT_HTTP_OS_DNS:
+				handle_dns (txnp, contp);
+				return 0;
+			case TS_EVENT_HTTP_SEND_RESPONSE_HDR:
+				handle_response (txnp);
+				return 0;
+			default:
+				TSDebug ("blacklist_plugin", "This event was unexpected: %d\n", );
+				break;
+		}
+		return 0;
+	}
+
+When you write handler functions, you have to anticipate any events that might
+be sent to the handler by hooks or by other functions. In the Blacklist plugin,
+`TS_EVENT_OS_DNS` is sent because of the global hook established in `TSPluginInit`,
+`TS_EVENT_HTTP_SEND_RESPONSE_HDR` is sent because the plugin contains a transaction
+hook (see [Setting Up a Transaction Hook](setting-a-transaction-hook)). 
+It is good practice to have a default case in your switch statements.
+
+

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext?rev=1048924&r1=1048923&r2=1048924&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-a-global-hook.en.mdtext Tue Dec 14 03:42:13 2010
@@ -0,0 +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](../blacklist-plugin) - The Blacklist Plugin
+
+Setting Up UI Update Callbacks - [Next](accessing-the-transaction-being-processed)
+
+### Setting a Global Hook ### {#SettingaGlobalHook}
+
+Global hooks are always added in `TSPluginInit` using `TSHttpHookAdd`. The
+two arguments of `TSHttpHookAdd` are the hook ID and the continuation to call
+when processing the event corresponding to the hook. In `blacklist-1.c`, the
+global hook is added as follows:
+
+`TSHttpHookAdd (TS_HTTP_OS_DNS_HOOK, contp);`
+
+Above, `TS_HTTP_OS_DNS_HOOK` is the ID for the origin server DNS lookup hook
+and `contp` is the parent continuation created earlier.
+
+This means that the Blacklist plugin is called at every origin server DNS lookup.
+When it is called, the handler functio `blacklist_plugin` receives `TS_EVENT_HTTP_OS_DNS`
+and calls `handle_dns` to see if the request is forbidden.
+

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.mdtext?rev=1048924&r1=1048923&r2=1048924&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/setting-up-a-transaction-hook.en.mdtext Tue Dec 14 03:42:13 2010
@@ -0,0 +1,77 @@
+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](accessing-the-transaction-being-processed) - Accessing the Transaction Being Processed
+
+Working with HTTP Header Functions - [Next](working-with-http-header-functions)
+
+### Setting Up a Transaction Hook ### {#SettingUpaTransactionHook}
+
+The Blacklist plugin sends "access forbidden" messages to clients if their
+requests are directed to blacklisted hosts. Therefore, the plugin needs a transaction
+hook so it will be called back when Traffic Server's HTTP state machine reaches
+the "send response header" event. In the Blacklist plugin's `handle_dns` routine,
+the transaction hook is added as follows:
+
+	:::c
+	TSMutexLock (sites_mutex);
+	for (i = 0; i < nsites; i++) {
+		if (strncmp (host, sites[i], host_length) == 0) {
+			printf ("blacklisting site: %s\n", sites[i]);
+			TSHttpTxnHookAdd (txnp,
+					TS_HTTP_SEND_RESPONSE_HDR_HOOK,
+					contp);
+			TSHandleMLocRelease (bufp, hdr_loc, url_loc);
+			TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
+			TSHttpTxnReenable (txnp, TS_EVENT_HTTP_ERROR);
+			TSMutexUnlock (sites_mutex);
+			return;
+		}
+	}
+	TSMutexUnlock (sites_mutex);
+	done:
+		TSHttpTxnReenable (txnp, TS_EVENT_HTTP_CONTINUE);
+
+This code fragment shows some interesting features. The plugin is comparing
+the requested site to the list of blacklisted sites. While the plugin is using
+the blacklist, it must acquire the mutex lock for the blacklist to prevent
+configuration changes in the middle of a blacklisting operation. If the requested
+site is blacklisted, then the following things happen:
+
+1. A transaction hook is added with `TSHttpTxnHookAdd`; the plugin is called
+back at the "send response header" event (i.e., the plugin sends an Access
+forbidden message to the client). You can see that in order to add a
+transaction hook, you need a handle to the transaction being processed.
+
+2. The transaction is reenabled using `TSHttpTxnReenable` with `TS_EVENT_HTTP_ERROR`
+as its event argument. Reenabling with an error event tells the HTTP state
+machine to stop the transaction and jump to the "send response header" state.
+Notice that if the requested site is not blacklisted, then the transaction
+is reenabled with the `TS_EVENT_HTTP_CONTINUE` event.
+
+3. The string and `TSMLoc` data stored in the marshal buffer `bufp` is released
+by `TSHandleMLocRelease` (see [Release Marshal Buffer Handles](RlsMarshalBufHandles.html)).
+Release these handles before reenabling the transaction.
+
+In general, whenever the plugin is doing something to a transaction, it must
+reenable the transaction when it is finished. In other words: every time your
+handler function handles a transaction event, it must call `TSHttpTxnReenable`
+when it is finished. Similarly, after your plugin handles session events (`TS_EVENT_HTTP_SSN_START`
+and `TS_EVENT_HTTP_SSN_CLOSE`), it must reenable the session with `TSHttpSsnReenable`.
+Reenabling the transaction twice in the same plugin routine is a bad error.
+

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.mdtext?rev=1048924&r1=1048923&r2=1048924&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.mdtext Tue Dec 14 03:42:13 2010
@@ -0,0 +1,67 @@
+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](setting-up-a-transaction-hook) - Setting Up a Transaction Hook
+
+The Basic Authorization Plugin - [Next](../basic-authorization-plugin)
+
+### Working with HTTP Header Functions ### {#WorkingwithHTTPHeaderFunctions}
+
+The Blacklist plugin examines the host header in every client transaction.
+This is done in the `handle_dns` routine, using `TSHttpTxnClientIPGet`, `TSHttpHdrUrlGet`,
+and `TSUrlHostGet`.
+
+	:::c
+	TSUrlHostGet.
+		static void
+	handle_dns (TSHttpTxn txnp, TSCont contp)
+	{
+		TSMBuffer bufp;
+		TSMLoc hdr_loc;
+		TSMLoc url_loc;
+		const char *host;
+		int i;
+
+		if (!TSHttpTxnClientIPGet (txnp, &bufp, &hdr_loc)) {
+			TSError ("couldn't retrieve client request header\n");
+			goto done;
+		}
+
+		url_loc = TSHttpHdrUrlGet (bufp, hdr_loc);
+
+		if (!url_loc) {
+			TSError ("couldn't retrieve request url\n");
+			TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
+			goto done;
+		}
+
+		host = TSUrlHostGet (bufp, url_loc, NULL);
+		if (!host) {
+			TSError ("couldn't retrieve request hostname\n");
+			TSHandleMLocRelease (bufp, hdr_loc, url_loc);
+			TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
+			goto done;
+		}
+
+To access the host header, the plugin must first get the client request, retrieve
+the URL portion, and then obtain the host header. See [HTTP Headers](../../http-headers)
+for more information about these calls. See [Release Marshal Buffer Handles](../../http-headers/guide-to-trafficserver-http-header-system/release-marshal-buffer-handles)
+for guidelines on using `TSHandleMLocRelease`.
+
+

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/index.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/index.en.mdtext?rev=1048924&r1=1048923&r2=1048924&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/index.en.mdtext (original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/sdk/header-based-plugin-examples/index.en.mdtext Tue Dec 14 03:42:13 2010
@@ -0,0 +1,80 @@
+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](../remap-plugin/example-query-remap) - Example: Query Remap
+
+The Blacklist Plugin - [Next](blacklist-plugin)
+
+##  Header-Based Plugin Examples ## {#Header-BasedPluginExamples}
+
+**Table of Contents**
+
+* [The Blacklist Plugin](blacklist-plugin)
+* [Creating the Parent Continuation](blacklist-plugin#CreatingParentContinuation)
+	* [Setting a Global Hook](blacklist-plugin/setting-a-global-hook)
+	* [Setting Up UI Update Callbacks](blacklist-plugin/setting-up-ui-update-callbacks)
+	* [Accessing the Transaction Being Processed](blacklist-plugin/accessing-the-transaction-being-processed)
+	* [Setting Up a Transaction Hook](blacklist-plugin/setting-up-a-transaction-hook)
+	* [Working with HTTP Header Functions](blacklist-plugin/working-with-http-header-functions)
+* [The Basic Authorization Plugin](basic-authorization-plugin/)
+	* [Creating the Plugin's Parent Continuation and Global Hook](basic-authorization-plugin/#CreatingPluginsParentContinuationGlobalHook)
+	* [Implementing the Handler and Getting a Handle to the Transaction](basic-authorization-plugin/implementing-the-handler-and-getting-a-handle-to-the-transaction)
+	* [Working With HTTP Headers](basic-authorization-plugin/working-with-http-headers)
+	* [Setting a Transaction Hook](setting-a-transaction-hook)
+
+Header-based plugins read or modify the headers of HTTP messages that Traffic
+Server sends and receives. Reading this chapter will help you to understand
+the following topics:
+
+* Creating continuations for your plugins
+
+* Adding global hooks
+
+* Adding transaction hooks
+
+* Working with HTTP header functions
+
+The two sample plugins discussed in this chapter are `blacklist-1.c` and `basic-auth.c`.
+
+## Overview ## {#Overview}
+
+Header-based plugins take actions based on the contents of HTTP request or
+response headers. Examples include filtering (on the basis of requested URL,
+source IP address, or other request header), user authentication, or user redirection.
+Header-based plugins have the following common elements:
+
+
+
+* The plugin has a static parent continuation that scans all Traffic Server headers
+(either request headers, response headers, or both).
+
+* The plugin has a global hook. This enables the plugin to check all transactions
+to determine if the plugin needs to do something.
+
+* The plugin gets a handle to the transaction being processed through the global
+hook.
+
+* If the plugin needs to do something to transactions in specific cases, then
+it sets up a transaction hook for a particular event.
+
+* The plugin obtains client header information and does something based on that
+information.
+
+This chapter demonstrates how these components are implemented in SDK sample
+code.
+