You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2013/06/02 07:01:59 UTC
[02/26] Separate the Admin and SDK guides.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/new-protocol-plugins.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/new-protocol-plugins.en.rst b/doc/source/sdk/new-protocol-plugins.en.rst
deleted file mode 100644
index c8aa318..0000000
--- a/doc/source/sdk/new-protocol-plugins.en.rst
+++ /dev/null
@@ -1,359 +0,0 @@
-New Protocol Plugins
-********************
-
-.. 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.
-
-.. toctree::
- :maxdepth: 1
-
-The new protocol APIs enable you to extend Traffic Server to be a web
-proxy for any protocol. This chapter describes new protocol APIs and the
-plugins that support new protocols. It also provides a detailed review
-of code for a sample Protocol plugin that supports a very simple
-artificial HTTP-like protocol.
-
-About the Sample Protocol
--------------------------
-
-The sample protocol enables a client to ask a server for a file. Clients
-send requests to a specific Traffic Server port (specified in
-``plugin.config``); each request has the following structure:
-
-::
-
- server_name file_name
-
-Using the Protocol plugin, Traffic Server can accept these requests,
-parse them, and act as a proxy cache (i.e., request the file from the
-origin server on the client's behalf and store copies of response
-messages in cache). The Protocol plugin is a state machine that flows
-through the states illustrated in the `Sample Protocol State
-Diagram <#SampleProtocolStDiag>`__. This figure illustrates the steps
-that Traffic Server and the Protocol plugin go through in order to
-support the sample protocol.
-
-In more specific terms, Traffic Server and the Protocol plugin must:
-
-- Listen for and accept client connections (on the accept port
- specified in ``plugin.config``)
-
-- Read incoming client requests
-
-- Look up the requested content in the Traffic Server cache
-
-- Serve content from cache if the request is a cache hit (this simple
- example does not do freshness checking)
-
-- Open a connection to the origin server if the request is a cache miss
- (on the server port specified in ``plugin.config``)
-
-- Forward the request to the origin server
-
-- Receive the origin server response
-
-- Cache the response and send it on to the client
-
-**Sample Protocol State Diagram** {#SampleProtocolStDiag}
-
-.. figure:: /images/sdk/Protocol_state_diagram.jpg
- :alt: Sample Protocol State Diagram
-
- Sample Protocol State Diagram
-Protocol Plugin Structure
-~~~~~~~~~~~~~~~~~~~~~~~~~
-
-To see how the Protocol plugin works, you need to understand some
-broader concepts. This section assumes you're familiar with the concepts
-of **continuation**, Traffic Server's **asynchronous event model**, and
-basic Traffic Server **plugin structure**. If you are not familiar with
-these concepts, then reference `Getting
-Started <../getting-started#GettingStarted>`__ and `How to Create
-Traffic Server Plugins <../how-to-create-trafficserver-plugins>`__
-
-Continuations in the Protocol Plugin
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The Protocol plugin creates a static continuation that is an **"accept"
-state machine** - that is, a state machine whose job is to accept client
-connections on the appropriate port. When Traffic Server accepts a net
-connection from a client on that port, the accept state machine is
-activated. It then creates a new continuation: a transaction state
-machine. The accept state machine creates one transaction state machine
-for each transaction (where a **transaction** consists of a client
-request and Traffic Server's response). Each transaction state machine
-lives until the transaction completes; then it is destroyed. If the
-client's request for content is a cache miss, then a transaction state
-machine might need to open a connection to the origin server. This is
-illustrated in the `Protocol Plugin
-Overview <#ProtocolPluginOverview>`__ diagram below.
-
-**Protocol Plugin Overview** {#ProtocolPluginOverview}
-
-.. figure:: /images/sdk/protocol_sm_big.jpg
- :alt: Protocol Plugin Overview
-
- Protocol Plugin Overview
-The first steps for writing the Protocol plugin are now clear: in
-``TSPluginInit``, you must create a continuation that listens for net
-connections on the client port specified in ``plugin.config`` (this
-continuation is the accept state machine).
-
-Below is a summary of the continuations implemented for the Protocol
-plugin:
-
-- An **accept state machine** that listens for client connections, and
- then creates transaction state machines whenever Traffic Server
- accepts a new client connection. The accept state machine lives as
- long as Traffic Server is running.
-
-- **Transaction state machines** that read client requests, process
- them, and are then destroyed when the transaction is finished.
-
-Event Flow
-~~~~~~~~~~
-
-Implementing the rest of the Protocol plugin requires that you
-understand the flow of events during the course of a transaction. Unlike
-HTTP transaction plugins, this plugin must read data from network
-connections and then read/write data to the Traffic Server cache. This
-means that its continuations do not receive HTTP state machine events;
-they receive events from Traffic Server's processor subsystems. For
-example: the accept state machine is activated by an
-``TS_EVENT_NET_ACCEPT`` event from Traffic Server's Net Processor; the
-handler function for the accept state machine must therefore be able to
-handle that event.
-
-The transaction state machines are activated when the client connection
-receives incoming request data. The **Net Processor** notifies the
-transaction state machine of incoming data. The transaction state
-machine reads the data; when finished, it initiates a cache lookup of
-the requested file. When the cache lookup completes, the transaction
-state machine is activated by the Traffic Server **Cache Processor**.
-
-If the transaction state machine needs to open a connection to the
-origin server to fetch content (in the case of a cache miss), then the
-transaction state machine initiates a DNS lookup of the server name. The
-transaction state machine is activated by a DNS lookup event from the
-Traffic Server **Host Database Processor**. If the transaction must
-connect to the origin server, then the transaction state machine
-initiates a net connection and waits for an event from the Net
-Processor.
-
-**Protocol Plugin Flow of Events** {#ProtocolPluginFlow}
-
-.. figure:: /images/sdk/protocol_evt.jpg
- :alt: Protocol Plugin Flow of Events
-
- Protocol Plugin Flow of Events
-The flow of events is illustrated in the `Protocol Plugin Flow of
-Events <#ProtocolPluginFlow>`__ diagram above. The thin straight lines
-show Net Processor event flow, the thin dashed lines represent Host
-Database event flow, and the thick dashed lines show Cache event flow.
-
-Notice that this flow of events is independent of the Protocol plugin's
-design (i.e., whether you build **accept** or **transaction** state
-machines). Any plugin that supports network connections uses the net
-vconnection interfaces (``TSNetAccept``, ``TSNetConnect``) and thus
-receives events from the Net Processor. Any plugin that performs cache
-lookups or cache writes uses ``TSCacheRead``, ``TSCacheWrite``,
-``TSVConnRead``, and ``TSVConnWrite`` and thus receives events from the
-Cache Processor and Traffic Server event system. Similarly, any plugin
-that does DNS lookups receives events from the Host Database Processor.
-
-One Way to Implement a Transaction State Machine
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-**Transaction state machines** (**TSMs**) in the Protocol plugin must do
-the following:
-
-- Keep track of the state of the transaction
-
-- Handle events received (based on the state of the transaction and the
- event received)
-
-- Update the state of the transaction as it changes
-
-Below is one way you can implement TSMs. Details about how the Protocol
-plugin does this are provided in the next section.
-
-- Create a data structure for transactions that contains all of the
- state data you need to keep track of. In the Protocol plugin this is
- a struct, ``Txn_SM``.
-
-- When you create the TSM's continuation, initialize data of type
- ``Txn_SM``. Initialize the data to the initial state of a transaction
- (in this case, a net connection has just been accepted). Associate
- this data to the TSM continuation using ``TSContDataSet``.
-
-- Write state handler functions that handle the expected events for
- each state.
-
-- Write the handler for the TSM. Its job is to receive events, examine
- the current state, and execute the appropriate state handler
- function. In the Protocol plugin, the handler is ``main_handler``.
- ``main_handler`` calls the state handler 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) receives events from the TSM.
-
-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``**. In `the image
- below <#ImplementTransStMachine>`__ below, the current handler is
- called **``state2_handler``**.
-
-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``**.
-
-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 from Traffic Server.
-
-**How Transaction State Machines are Implemented in the Protocol
-Plugin** {#ImplementTransStMachine}
-
-.. figure:: /images/sdk/txn_sm.jpg
- :alt: How Transaction State Machines are Implemented in the Protocol
- Plugin
-
- How Transaction State Machines are Implemented in the Protocol Plugin
-Processing a Typical Transaction
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The code is contained in the following files:
-
-- ``Protocol.c`` and ``Protocol.h``
-
-- ``Accept.c`` and ``Accept.h``
-
-- ``TxnSM.c`` and ``TxnSM.h``
-
-Below is a step-by-step walk-through of the code that processes a
-typical transaction.
-
-1. The ``TSPluginInit`` function is in the ``Protocol.c`` file. It
- checks the validity of the ``plugin.config`` entries (there must be
- two: a client accept port and a server port) and runs an
- initialization routine, ``init``.
-
-2. The **``init``** function (in ``Protocol.c``) creates the plugin's
- log file using **``TSTextLogObjectCreate``**.
-
-3. The **``init``** function creates the accept state machine using
- **``AcceptCreate``**. The code for **``AcceptCreate``** is in the
- ``Accept.c`` file.
-
-4. The accept state machine, like the transaction state machine, keeps
- track of its state with a data structure. This data structure,
- **``Accept``**, is defined in the ``Accept.h`` file. State data in
- **``AcceptCreate``** is associated with the new accept state machine
- via **``TSContDataSet``**.
-
-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 ``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, 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``**.
-
-8. **``TxnSMCreate``** then creates a transaction state machine using
- **``TSContCreate``**. 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``**).
-
-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 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).
-
-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) by calling
- **``TSVConnRead``**.
-
-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``** .
-
-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.
-
-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 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``**.
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/plugin-configurations.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/plugin-configurations.en.rst b/doc/source/sdk/plugin-configurations.en.rst
deleted file mode 100644
index b9dc89b..0000000
--- a/doc/source/sdk/plugin-configurations.en.rst
+++ /dev/null
@@ -1,116 +0,0 @@
-Plugin Configurations
-*********************
-
-.. 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.
-
-This chapter contains the following section:
-
-.. toctree::
- :maxdepth: 1
-
-Plugin Configurations
----------------------
-
-The ``TSConfig`` family of functions provides a mechanism for accessing
-and changing global configuration information within a plugin.
-
-The functions discussed in this section do not examine or modify Traffic
-Server configuration variables. To examine Traffic Server configuration
-and statistics variables, see `"Reading Traffic Server Settings and
-Statistics" <../plugin-management/reading-trafficserver-settings-and-statistics>`__
-
-The ``TSConfig`` family of functions is designed to provide a fast and
-efficient mechanism for accessing and changing global configuration
-information within a plugin. Such a mechanism is simple enough to
-provide in a single-threaded program, but the translation to a
-multi-threaded program such as Traffic Server is difficult. A common
-technique is to have a single mutex protect the global configuration
-information; however, the problem with this solution is that a single
-mutex becomes a performance bottleneck very quickly.
-
-The ``TSConfig`` family of functions define an interface to storing and
-retrieving an opaque data pointer. Internally, Traffic Server maintains
-reference count information about the data pointer so that a call to
-``TSConfigSet`` will not disturb another thread using the current data
-pointer. The philosophy is that once a user has a hold of the
-configuration pointer, it is okay for it to be used even if the
-configuration changes; all that a user typically wants is a non-changing
-snapshot of the configuration. You should use ``TSConfigSet`` for all
-global data updates.
-
-Here's how the interface works:
-
-::
-
- ::::c
- /* Assume that you have previously defined a plugin configuration
- * data structure named ConfigData, along with its constructor
- * plugin_config_allocator () and its destructor
- * plugin_config_destructor (ConfigData *data)
- */
- ConfigData *plugin_config;
-
- /* You will need to assign plugin_config a unique identifier of type
- * unsigned int. It is important to initialize this identifier to zero
- * (see the documentation of the function).
- */
- static unsigned int my_id = 0;
-
- /* You will need an TSConfig pointer to access a snapshot of the
- * current plugin_config.
- */
- TSConfig config_ptr;
-
- /* Initialize plugin_config. */
- plugin_config = plugin_config_allocator();
-
- /* Assign plugin_config an identifier using TSConfigSet. */
- my_id = TSConfigSet (my_id, plugin_config, plugin_config_destructor);
-
- /* Get a snapshot of the current configuration using TSConfigGet. */
- config_ptr = TSConfigGet (my_id);
-
- /* With an TSConfig pointer to the current configuration, you can
- * retrieve the configuration's current data using TSConfigDataGet.
- */
- plugin_config = (ConfigData*) TSConfigDataGet (config_ptr);
-
- /* Do something with plugin_config here. */
-
- /* When you are done with retrieving or modifying the plugin data, you
- * release the pointers to the data with a call to TSConfigRelease.
- */
- TSConfigRelease (my_id, config_ptr);
-
- /* Any time you want to modify plugin_config, you must repeat these
- * steps, starting with
- * my_id = TSConfigSet (my_id,plugin_config, plugin_config_destructor);
- * and continuing up to TSConfigRelease.
- */
-
-The configuration functions are:
-
-- ```TSConfigDataGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#aed2a6f9d350935ac890f75fdd80605db>`__
-
-- ```TSConfigGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a478189d6ad87c6b873d8676cb51508c5>`__
-
-- ```TSConfigRelease`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a06711d4a0e70f1ff27f9b5ca34bb649c>`__
-
-- ```TSConfigSet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a8bba9468fdca478e68035a9776f6e9ca>`__
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/plugin-management.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/plugin-management.en.rst b/doc/source/sdk/plugin-management.en.rst
deleted file mode 100644
index 84d587e..0000000
--- a/doc/source/sdk/plugin-management.en.rst
+++ /dev/null
@@ -1,28 +0,0 @@
-Plugin Management
-*****************
-
-.. 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.
-
-This chapter covers the following topics:
-
-.. toctree::
- :maxdepth: 2
-
- plugin-management/reading-trafficserver-settings-and-statistics.en
- plugin-management/guide-to-the-logging-api.en
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/plugin-management/guide-to-the-logging-api.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/plugin-management/guide-to-the-logging-api.en.rst b/doc/source/sdk/plugin-management/guide-to-the-logging-api.en.rst
deleted file mode 100644
index 4c3aec2..0000000
--- a/doc/source/sdk/plugin-management/guide-to-the-logging-api.en.rst
+++ /dev/null
@@ -1,103 +0,0 @@
-Guide to the Logging API
-************************
-
-.. 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.
-
-The logging API enables your plugin to log entries in a custom text log
-file that you create with the call ``TSTextLogObjectCreate``. This log
-file is part of Traffic Server's logging system; by default, it is
-stored in the logging directory. Once you have created the log object,
-you can set log properties.
-
-The logging API enables you to:
-
-- Establish a custom text log for your plugin: see
- ```TSTextLogObjectCreate`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#ae75e85e476efeaa16ded185da7a3081b>`__
-
-- Set the log header for your custom text log: see
- ```TSTextLogObjectHeaderSet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a7c10f89fe8bcb6b733f4a83b5a73b71c>`__
-
-- Enable or disable rolling your custom text log: see
- ```TSTextLogObjectRollingEnabledSet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#aec1e883f0735ee40c8b56d90cf27acd1>`__
-
-- Set the rolling interval (in seconds) for your custom text log: see
- ```TSTextLogObjectRollingIntervalSecSet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#aac0be2e81694db0363c5321e8a2019ce>`__
-
-- Set the rolling offset for your custom text log: see
- ```TSTextLogObjectRollingOffsetHrSet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a9d90885b975947c241f74c33550180b4>`__
-
-- Write text entries to the custom text log: see
- ```TSTextLogObjectWrite`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a34de01e5603ea639d7ce6c7bf9613254>`__
-
-- Flush the contents of the custom text log's write buffer to disk: see
- ```TSTextLogObjectFlush`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#ad746b22f992c2adb5f0271e5136a6ca1>`__
-
-- Destroy custom text logs when you are done with them: see
- ```TSTextLogObjectDestroy`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#af6521931ada7bbc38194e79e60081d54>`__
-
-The steps below show how the logging API is used in the
-``blacklist-1.c`` sample plugin. For the complete source code, see the
-`*Sample Source Code* <App_SampleSourceCode.html>`__ appendix.
-
-1. A new log file is defined as a global variable.
-
- ::
-
- ::::c
- static TSTextLogObject log;
-
-2. In ``TSPluginInit``, a new log object is allocated:
-
- ::
-
- ::::c
- log = TSTextLogObjectCreate("blacklist", TS_LOG_MODE_ADD_TIMESTAMP, NULL, &error);
-
- The new log is named ``blacklist.log``. Each entry written to the log
- will have a timestamp. The ``NULL`` argument specifies that the new
- log does not have a log header. The error argument stores the result
- of the log creation; if the log is created successfully, then an
- error will be equal to ``TS_LOG_ERROR_NO_ERROR``.
-
-3. After creating the log, the plugin makes sure that the log was
- created successfully:
-
- ::
-
- ::::c
- if (!log) {
- printf("Blacklist plugin: error %d while creating log\n", error);
- }
-
-4. The ``blacklist-1`` plugin matches the host portion of the URL (in
- each client request) with a list of blacklisted sites (stored in the
- array ``sites[``]):
-
- ::::c for (i = 0; i < nsites; i++) { if (strncmp (host, sites[i],
- host\_length) == 0) { If the host matches one of the blacklisted
- sites (such as ``sites[i]``), then the plugin writes a blacklist
- entry to ``blacklist.log``:
-
- ::::c if (log) { TSTextLogObjectWrite(log, "blacklisting site: %s",
- sites[i]); The format of the log entry is as follows:
-
- :::text blacklisting site: sites[i] The log is not flushed or
- destroyed in the ``blacklist-1`` plugin - it lives for the life of
- the plugin.
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst b/doc/source/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst
deleted file mode 100644
index eaec39c..0000000
--- a/doc/source/sdk/plugin-management/reading-trafficserver-settings-and-statistics.en.rst
+++ /dev/null
@@ -1,59 +0,0 @@
-Reading Traffic Server Settings and Statistics
-**********************************************
-
-.. 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.
-
-Your plugin might need to know information about Traffic Server's
-current configuration and performance. The functions described in this
-section read this information from the Traffic Server ``records.config``
-file. Configuration settings are stored in ``CONFIG`` variables and
-statistics are stored in ``PROCESS`` variables.
-
-.. figure:: /images/docbook/caution.png
- :alt: [Caution]
-
- [Caution]
-**Caution**
-
-Not all ``CONFIG`` and ``PROCESS`` variables in ``records.config`` are
-relevant to Traffic Server's configuration and statistics. Therefore,
-retrieve only the ``records.config`` variables that are documented in
-the `Traffic Server Administrator's Guide <../../admin/>`__.
-
-To retrieve a variable, you need to know its type (``int``, ``counter``,
-``float``, or ``string``). Plugins store the ``records.config`` values
-as an ``TSMgmtInt``, ``TSMgmtCounter``, ``TSMgmtFloat``, or
-``TSMgmtString``. You can look up ``records.config`` variable types in
-the `Traffic Server Administrator's Guide <../../admin/>`__.
-
-Depending on the result type, you'll use ``TSMgmtIntGet``,
-``TSMgmtCounterGet``, ``TSMgmtFloatGet``, or ``TSMgmtStringGet`` to
-obtain the variable value (see the example for
-```TSMgmtIntGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a097aaecda41d04b522796ae25eea9a3d>`__.
-
-The ``TSMgmt*Get`` functions are:
-
-- ```TSMgmtCounterGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a583e21e614b70256f68658fc6c455ea6>`__
-
-- ```TSMgmtFloatGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a2ace94b52c71656304b53824d3fa7080>`__
-
-- ```TSMgmtIntGet`` <http://people.apache.org/~amc/ats/doc/html/ts_8h.html#a097aaecda41d04b522796ae25eea9a3d>`__
-
-- ```TSMgmtStringGet`` <http://people.apache.org/~amc/ats/doc/html/InkAPI_8cc.html#a14167888ed89d5b30df5bdcdcfdf1c30>`__
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/preface.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/preface.en.rst b/doc/source/sdk/preface.en.rst
deleted file mode 100644
index b7f6e93..0000000
--- a/doc/source/sdk/preface.en.rst
+++ /dev/null
@@ -1,49 +0,0 @@
-Preface
-********
-
-.. 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.
-
-.. toctree::
- :maxdepth: 2
-
- preface/how-to-use-this-book.en
- preface/typographical-conventions.en
-
-The *Traffic Server Software Developer's Kit* is a reference for
-creating plugins. **Plugins** are programs that add services (such as
-filtering or content transformation) or entire features (such as new
-protocol support) to Traffic Server. If you are new to writing Traffic
-Server plugins, then read the first two chapters, `Getting
-Started <../getting-started>`__ and `Creating Traffic Server
-Plugins <../how-to-create-trafficserver-plugins>`__, and use the
-remaining chapters as needed. `Header-Based Plugin
-Examples <../header-based-plugin-examples>`__ provides details about
-plugins that work on HTTP headers, while `HTTP Transformation
-Plugins <../http-transformation-plugin>`__ explains how to write a
-plugin that transforms or scans the body of an HTTP response. If you
-want to support your own protocol on Traffic Server, then reference `New
-Protocol Plugins <../new-protocol-plugins>`__.
-
-Audience
---------
-
-This manual is intended for programmers who want to write plugin
-programs that add services or features to Traffic Server. It assumes a
-cursory knowledge of the C programming language, Hyper-Text Transfer
-Protocol (HTTP), and Multipurpose Internet Mail Extensions (MIME).
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/preface/how-to-use-this-book.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/preface/how-to-use-this-book.en.rst b/doc/source/sdk/preface/how-to-use-this-book.en.rst
deleted file mode 100644
index 7d78d63..0000000
--- a/doc/source/sdk/preface/how-to-use-this-book.en.rst
+++ /dev/null
@@ -1,132 +0,0 @@
-How to Use This Book
-********************
-
-.. 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.
-
-This book has the following basic components:
-
-- Introduction and overview
-
-- Tutorials about writing specific kinds of plugins: HTTP header-based
- plugins, content transformation plugins, and protocol plugins
-
-- Guides about specific interfaces
-
-- Reference material
-
-If you're new to writing Traffic Server plugins, then read `Getting
-Started <../getting-started>`__ and `Creating Traffic Server
-Plugins <../how-to-create-trafficserver-plugins>`__, and use the
-remaining chapters as needed. `Header-Based Plugin
-Examples <../header-based-plugin-examples>`__ provides details about
-plugins that work on HTTP headers, while `HTTP Transformation
-Plugins <../http-transformation-plugin>`__ explains how to write a
-plugin that transforms or scans the body of an HTTP response. `New
-Protocol Plugins <../new-protocol-plugins>`__ provides essential
-information if you want to support your own protocol on Traffic Server.
-
-You can look up information in the following reference sections:
-
-- `Index <concept-index>`__: lists information by subject
-- `Function
- Index <http://ci.apache.org/projects/trafficserver/trunk/doxygen/>`__:
- Doxygen reference
-- `Type
- Index <http://ci.apache.org/projects/trafficserver/trunk/doxygen/classes.html>`__
-- `Sample Source Code <../sample-source-code>`__
-- `Deprecated
- Functions <http://ci.apache.org/projects/trafficserver/trunk/doxygen/deprecated.html>`__
-
-Below is a section-by-section breakdown of this guide:
-
-- | `Getting Started <../getting-started>`__
- | How to compile and load plugins. Walks through a simple "hello
- world" example; explains how to initialize and register plugins.
-
-- | `How to Create Traffic Server
- Plugins <../how-to-create-trafficserver-plugins>`__
- | Basic structures that all plugins use: events, continuations, and
- how to hook on to Traffic Server processes. Detailed explication of a
- sample blacklisting plugin.
-
-- | `Remap Plugin <../remap-plugin>`__
- | This chapter demonstrates on a practical example how you can
- exploit the Traffic Server remap API for your plugins.
-
-- | `Header-Based Plugin Examples <../header-based-plugin-examples>`__
- | Detailed explanation about writing plugins that work on HTTP
- headers; discusses sample blacklisting and basic authorization
- plugins.
-
-- | `HTTP Transformation Plugins <../http-transformation-plugin>`__
- | Detailed explanation of the null-transform example; also discusses
- ``VConnections``, ``VIOs``, and IO buffers.
-
-- | `New Protocol Plugins <../new-protocol-plugins>`__
- | Detailed explanation of a sample protocol plugin that supports a
- synthetic protocol. Discusses ``VConnections`` and mutexes, as well
- as the new ``NetConnection``, DNS lookup, logging, and cache APIs.
-
-The remaining sections comprise the API function reference and are
-organized by function type:
-
-- | `Miscellaneous Interface Guide <../misc-interface-guide>`__
- | Details error-writing and tracing functions, thread functions, and
- Traffic Server API versions of the ``malloc`` and ``fopen`` families.
- The Traffic Server API versions overcome various C library
- limitations.
-
-- | `HTTP Hooks and Transactions <../http-hoooks-and-transactions>`__
- | Functions in this chapter hook your plugin to Traffic Server HTTP
- processes.
-
-- | `HTTP Headers <../http-headers>`__
- | Contains instructions for implementing performance enhancements for
- all plugins that manipulate HTTP headers. These functions examine and
- modify HTTP headers, MIME headers, URLs, and the marshal buffers that
- contain header information. If you are working with headers, then be
- sure to read this chapter.
-
-- `Mutex Guide <../mutex-guide>`__
-
-- | `Continuations <../continuations>`__
- | Continuations provide the basic callback mechanism and data
- abstractions used in Traffic Server.
-
-- `Plugin Configurations <../plugin-configurations>`__
-
-- | `Actions Guide <../actions-guide>`__
- | Describes how to use ``TSActions`` and the ``TSDNSLookup`` API.
-
-- | `IO Guide <../io-guide>`__
- | Describes how to use the Traffic Server IO interfaces:
- ``TSVConnection``, ``TSVIO``, ``TSIOBuffer``, ``TSNetVConnection``,
- the Cache API.
-
-- | `Plugin Management <../plugin-management>`__
- | These functions enable you to set up a configuration interface for
- plugins, access installed plugin files, and set up plugin licensing.
-
-- | `Adding Statistics <../adding-statistics>`__
- | These functions add statistics to your plugin.
-
-- `Function
- Index <http://ci.apache.org/projects/trafficserver/trunk/doxygen/>`__
- Doxygen generated Traffic Server API Documentation
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/preface/typographical-conventions.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/preface/typographical-conventions.en.rst b/doc/source/sdk/preface/typographical-conventions.en.rst
deleted file mode 100644
index 3b75c04..0000000
--- a/doc/source/sdk/preface/typographical-conventions.en.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-Typographical Conventions
-*************************
-
-.. 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.
-
-This document uses the following typographic conventions:
-
-\_italics \_ or *\* bold*\ \*
- Used to introduce terms.
-
-``monospaced face``
- Represents C language statements, commands, file content, and
- computer output.
-
-*``monospaced italic``*
- Represents variables for which you should substitute a value.
-
-``...`` (ellipsis)
- Indicates the omission of irrelevant or unimportant information.
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/remap-plugin.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/remap-plugin.en.rst b/doc/source/sdk/remap-plugin.en.rst
deleted file mode 100644
index 6506653..0000000
--- a/doc/source/sdk/remap-plugin.en.rst
+++ /dev/null
@@ -1,75 +0,0 @@
-Remap Plugin
-************
-
-.. 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.
-
-.. toctree::
- :maxdepth: 2
-
- remap-plugin/example-query-remap.en
-
-
-The Remap plugin provides a more flexible, dynamic way of specifying
-remap rules. It is not built on top of the Traffic Server APIs and
-exists solely for the purpose of URL remapping. The remap plugin is not
-global --it is configured on a per-remap rule basis, which enables you
-to customize how URLs are redirected based on individual rules in the
-``remap.config`` file.
-
-The Traffic Server Remap API enables a plugin to dynamically map a
-client request to a target URL. Each plugin is associated with one or
-more remap rules in ``remap.config`` (an "instance"). If a request URL
-matches a remap rule's "fromURL", then Traffic Server calls the
-plugin-defined remap function for that request.
-
-((Editor's note: additional text TBD; text in this chapter is still
-under development))
-
-Getting Started
----------------
-
-Remap Header File
-~~~~~~~~~~~~~~~~~
-
-The ``remap.h`` header file contains the Traffic Server remap API. By
-default, the header file location is: ``/usr/local/include/ts/remap.h``
-
-Required Functions
-~~~~~~~~~~~~~~~~~~
-
-A remap plugin is required to implement the following functions:
-
-- ```TSRemapInit`` <http://people.apache.org/~amc/ats/doc/html/remap_8h.html#af7e9b1eee1c38c6f8dcc67a65ba02c24>`__:
- the remap initialization function, called once when the plugin is
- loaded
-
-- ```TSRemapNewInstance`` <http://people.apache.org/~amc/ats/doc/html/remap_8h.html#a963de3eeed2ed7a2da483acf77dc42ca>`__:
- a new instance is created for each rule associated with the plugin.
- Called each time the plugin used in a remap rule (this function is
- what processes the pparam values)
-
-- ```TSRemapDoRemap`` <http://people.apache.org/~amc/ats/doc/html/remap_8h.html#acf73f0355c591e145398211b3c0596fe>`__:
- the entry point used by Traffic Server to find the new URL to which
- it remaps; called every time a request comes in
-
-Configuration
-~~~~~~~~~~~~~
-
-To associate a remap plugin with a remap rule, use the ``@plugin``
-parameter. See the Admin Guide section (?TBD?) for details on
-configuring remap plugins
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/remap-plugin/example-query-remap.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/remap-plugin/example-query-remap.en.rst b/doc/source/sdk/remap-plugin/example-query-remap.en.rst
deleted file mode 100644
index 757b76e..0000000
--- a/doc/source/sdk/remap-plugin/example-query-remap.en.rst
+++ /dev/null
@@ -1,152 +0,0 @@
-Example: Query Remap Plugin
-***************************
-
-.. 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.
-
-The sample remap plugin, ``query_remap.c``, maps client requests to a
-number of servers based on a hash of the request's URL query parameter.
-This can be useful for spreading load for a given type of request among
-backend servers, while still maintaining "stickiness" to a single server
-for similar requests. For example, a search engine may want to send
-repeated queries for the same keywords to a server that has likely
-cached the result from a prior query.
-
-Configuration of query\_remap
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The query remap plugin will allow the query parameter name to be
-specified, along with the hostnames of the servers to hash across.
-Sample ``remap.config`` rules using ``query_remap`` will look like:
-
-::
-
- map http://www.example.com/search http://srch1.example.com/search @plugin=query_remap.so @pparam=q @pparam=srch1.example.com @pparam=srch2.example.com @pparam=srch3.example.com
- map http://www.example.com/profiles http://prof1.example.com/profiles @plugin=query_remap.so @pparam=user_id @pparam=prof1.example.com @pparam=prof2.example.com
-
-The first ``@pparam`` specifies the query param key for which the value
-will be hashed. The remaining parameters list the hostnames of the
-servers. A request for ``http://www.example.com/search?q=apache`` will
-match the first rule. The plugin will look for the *``q``* parameter and
-hash the value '``apache``\ ' to pick from among
-``srch_[1-3]_.example.com`` to send the request.
-
-If the request does not include a *``q``* query parameter and the plugin
-decides not to modify the request, the default toURL
-'``http://srch1.example.com/search``\ ' will be used by TS.
-
-The parameters are passed to the plugin's ``tsremap_new_instance``
-function. In ``query_remap``, ``tsremap_new_instance`` creates a
-plugin-defined ``query_remap_info`` struct to store its configuration
-parameters. The ihandle, an opaque pointer that can be used to pass
-per-instance data, is set to this struct pointer and will be passed to
-the ``tsremap_remap`` function when it is triggered for a request.
-
-::
-
- :::c
- typedef struct _query_remap_info {
- char *param_name;
- size_t param_len;
- char **hosts;
- int num_hosts;
- } query_remap_info;
-
-
- int tsremap_new_instance(int argc,char *argv[],ihandle *ih,char *errbuf,int errbuf_size)
- {
- int i;
-
- if (argc param_name = strdup(argv[2]);
- qri->param_len = strlen(qri->param_name);
- qri->num_hosts = argc - 3;
- qri->hosts = (char**) TSmalloc(qri->num_hosts*sizeof(char*));
-
- for (i=0; i num_hosts; ++i) {
- qri->hosts[i] = strdup(argv[i+3]);
- }
-
- *ih = (ihandle)qri;
- return 0;
- }
-
-Another way remap plugins may want handle more complex configuration is
-to specify a configuration filename as a ``pparam`` and parse the
-specified file during instance initialization.
-
-Performing the Remap
-~~~~~~~~~~~~~~~~~~~~
-
-The plugin implements the ``tsremap_remap`` function, which is called
-when TS has read the client HTTP request headers and matched the request
-to a remap rule configured for the plugin. The ``TSRemapRequestInfo``
-struct contains input and output members for the remap operation.
-
-``tsremap_remap`` uses the configuration information passed via the
-``ihandle`` and checks the ``request_query`` for the configured query
-parameter. If the parameter is found, the plugin sets a ``new_host`` to
-modify the request host:
-
-::
-
- :::c
- int tsremap_remap(ihandle ih, rhandle rh, TSRemapRequestInfo *rri)
- {
- int hostidx = -1;
- query_remap_info *qri = (query_remap_info*)ih;
-
- if (!qri) {
- TSError("NULL ihandle");
- return 0;
- }
-
- if (rri && rri->request_query && rri->request_query_size > 0) {
- char *q, *s, *key;
-
- //make a copy of the query, as it is read only
- q = (char*) TSmalloc(rri->request_query_size+1);
- strncpy(q, rri->request_query, rri->request_query_size);
- q[rri->request_query_size] = '\0';
-
- s = q;
- //parse query parameters
- for (key = strsep(&s, "&"); key != NULL; key = strsep(&s, "&")) {
- char *val = strchr(key, '=');
- if (val && (size_t)(val-key) == qri->param_len &&
- !strncmp(key, qri->param_name, qri->param_len)) {
- ++val;
- //the param key matched the configured param_name
- //hash the param value to pick a host
- hostidx = hash_fnv32(val, strlen(val)) % (u_int32_t)qri->num_hosts;
- break;
- }
- }
-
- TSfree(q);
-
- if (hostidx >= 0) {
- rri->new_host_size = strlen(qri->hosts[hostidx]);
- if (rri->new_host_size new_host, qri->hosts[hostidx], rri->new_host_size);
- return 1; //host has been modified
- }
- }
- }
-
- //the request was not modified, TS will use the toURL from the remap rule
- return 0;
- }
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/sample-source-code.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/sample-source-code.en.rst b/doc/source/sdk/sample-source-code.en.rst
deleted file mode 100644
index 42be2a9..0000000
--- a/doc/source/sdk/sample-source-code.en.rst
+++ /dev/null
@@ -1,309 +0,0 @@
-Sample Source Code
-******************
-
-.. 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.
-
-This appendix provides several source code examples. In the online
-formats of this book, function calls are linked to their references in
-the previous chapters. The following sample plugins are provided:
-
-- `blacklist-1.c <App_SampleSourceCode.html#Sample_blacklist-1.c>`__
-
-blacklist-1.c
--------------
-
-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.
-
-This plugin illustrates:
-
-- An HTTP transaction extension
-
-- How to examine HTTP request headers
-
-- How to use the logging interface
-
-- How to use the plugin configuration management interface
-
-.. raw:: html
-
- <pre>
- /* blacklist-1.c: An example program that denies client access
- * to blacklisted sites. This plugin illustrates
- * how to use configuration information from the
- * blacklist.txt configuration file.
- *
- * Usage:
- * (Solaris) : blacklist-1.so
- *
- *
- */
-
- #include <stdio.h>
- #include <string.h>
- #include <ts/ts.h>
-
- #define MAX_NSITES 500
-
- static char* sites[MAX_NSITES];
- static int nsites;
- static TSMutex sites_mutex;
- static TSTextLogObject log;
-
- static void
- handle_dns (TSHttpTxn txnp, TSCont contp)
- {
- TSMBuffer bufp;
- TSMLoc hdr_loc;
- TSMLoc url_loc;
- const char *host;
- int i;
- int host_length;
-
- if (!TSHttpTxnClientReqGet (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, &host_length);
- if (!host) {
- TSError ("couldn't retrieve request hostname\n");
- TSHandleMLocRelease (bufp, hdr_loc, url_loc);
- TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
- goto done;
- }
-
- TSMutexLock(sites_mutex);
-
- for (i = 0; i < nsites; i++) {
- if (strncmp (host, sites[i], host_length) == 0) {
- if (log) {
- TSTextLogObjectWrite(log, "blacklisting site: %s", sites[i]);
- } else {
- 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);
- TSHandleMLocRelease (bufp, hdr_loc, url_loc);
- TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
-
- done:
- TSHttpTxnReenable (txnp, TS_EVENT_HTTP_CONTINUE);
- }
-
- static void
- handle_response (TSHttpTxn txnp)
- {
- TSMBuffer bufp;
- TSMLoc hdr_loc;
- TSMLoc url_loc;
- char *url_str;
- char *buf;
- int url_length;
-
- if (!TSHttpTxnClientRespGet (txnp, &bufp, &hdr_loc)) {
- TSError ("couldn't retrieve client response header\n");
- goto done;
- }
-
- TSHttpHdrStatusSet (bufp, hdr_loc, TS_HTTP_STATUS_FORBIDDEN);
- TSHttpHdrReasonSet (bufp, hdr_loc,
- TSHttpHdrReasonLookup (TS_HTTP_STATUS_FORBIDDEN),
- strlen (TSHttpHdrReasonLookup (TS_HTTP_STATUS_FORBIDDEN)) );
-
- if (!TSHttpTxnClientReqGet (txnp, &bufp, &hdr_loc)) {
- TSError ("couldn't retrieve client request header\n");
- TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
- 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;
- }
-
- buf = (char *)TSmalloc (4096);
-
- url_str = TSUrlStringGet (bufp, url_loc, &url_length);
- sprintf (buf, "You are forbidden from accessing \"%s\"\n", url_str);
- TSfree (url_str);
- TSHandleMLocRelease (bufp, hdr_loc, url_loc);
- TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
-
- TSHttpTxnErrorBodySet (txnp, buf, strlen (buf), NULL);
-
- done:
- TSHttpTxnReenable (txnp, TS_EVENT_HTTP_CONTINUE);
- }
-
- static void
- read_blacklist (void)
- {
- char blacklist_file[1024];
- TSFile file;
-
- sprintf (blacklist_file, "%s/blacklist.txt", TSPluginDirGet());
- file = TSfopen(blacklist_file, "r");
-
- TSMutexLock (sites_mutex);
- nsites = 0;
-
- if (file != NULL) {
- char buffer[1024];
-
- while (TSfgets (file, buffer, sizeof(buffer)-1) != NULL && nsites < MAX_NSITES) {
- char* eol;
- if ((eol = strstr(buffer, "\r\n")) != NULL) {
- /* To handle newlines on Windows */
- *eol = '\0';
- } else if ((eol = strchr(buffer, '\n')) != NULL) {
- *eol = '\0';
- } else {
- /* Not a valid line, skip it */
- continue;
- }
- if (sites[nsites] != NULL) {
- TSfree (sites[nsites]);
- }
- sites[nsites] = TSstrdup (buffer);
- nsites++;
- }
-
- TSfclose (file);
- } else {
- TSError ("unable to open %s\n", blacklist_file);
- TSError ("all sites will be allowed\n", blacklist_file);
- }
-
- TSMutexUnlock (sites_mutex);
- }
-
- 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;
- }
-
- int
- check_ts_version()
- {
-
- const char *ts_version = TSTrafficServerVersionGet();
- int result = 0;
-
- if (ts_version) {
- int major_ts_version = 0;
- int minor_ts_version = 0;
- int patch_ts_version = 0;
-
- if (sscanf(ts_version, "%d.%d.%d", &major_ts_version, &minor_ts_version, &patch_ts_version) != 3) {
- return 0;
- }
-
- /* Need at least TS 2.0 */
- if (major_ts_version >= 2) {
- result = 1;
- }
-
- }
-
- return result;
- }
-
- void
- TSPluginInit (int argc, const char *argv[])
- {
- int i;
- TSCont contp;
- TSPluginRegistrationInfo info;
- int error;
-
- info.plugin_name = "blacklist-1";
- info.vendor_name = "DsCompany";
- info.support_email = "ts-api-support@DsCompany.com";
-
- if (!TSPluginRegister (TS_SDK_VERSION_2_0 , &info)) {
- TSError ("Plugin registration failed.\n");
- }
-
- if (!check_ts_version()) {
- TSError ("Plugin requires Traffic Server 2.0 or later\n");
- return;
- }
-
- /* create an TSTextLogObject to log blacklisted requests to */
- log = TSTextLogObjectCreate("blacklist", TS_LOG_MODE_ADD_TIMESTAMP,
- NULL, &error);
- if (!log) {
- printf("Blacklist plugin: error %d while creating log\n", error);
- }
-
- sites_mutex = TSMutexCreate ();
-
- nsites = 0;
- for (i = 0; i < MAX_NSITES; i++) {
- sites[i] = NULL;
- }
-
- read_blacklist ();
-
- contp = TSContCreate (blacklist_plugin, NULL);
-
- TSHttpHookAdd (TS_HTTP_OS_DNS_HOOK, contp);
-
- TSMgmtUpdateRegister (contp, "Super Blacklist Plugin", "blacklist.cgi");
- }
-
- </pre>
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/troubleshooting-tips.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/troubleshooting-tips.en.rst b/doc/source/sdk/troubleshooting-tips.en.rst
deleted file mode 100644
index 3863485..0000000
--- a/doc/source/sdk/troubleshooting-tips.en.rst
+++ /dev/null
@@ -1,57 +0,0 @@
-Troubleshooting Tips
-********************
-
-.. 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.
-
-This appendix lists the following troubleshooting tips.
-
-.. toctree::
- :maxdepth: 2
-
- troubleshooting-tips/unable-to-load-plugins.en
- troubleshooting-tips/unable-to-debug-tags.en
- troubleshooting-tips/using-a-debugger.en
- troubleshooting-tips/debugging-memory-leaks.en
-
-
-Unable to Compile Plugins
--------------------------
-
-The process for compiling a shared library varies with the platform
-used, so the Traffic Server API includes the ``tsxs`` script you can use
-to create shared libraries on all supported Traffic Server platforms.
-
-Example
-~~~~~~~
-
-Assuming the sample program is stored in the file ``hello-world.c``, you
-could use the following commands to building a shared library:
-
-::
-
- :::text
- tsxs -c hello-world.c -o hello-world.so
-
-To install this plugin in your ``plugindir`` use the equivalent of sudo
-on your platform to execute:
-
-::
-
- :::text
- sudo tsxs -o hello-world.so -i
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/troubleshooting-tips/debugging-memory-leaks.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/troubleshooting-tips/debugging-memory-leaks.en.rst b/doc/source/sdk/troubleshooting-tips/debugging-memory-leaks.en.rst
deleted file mode 100644
index 4021e07..0000000
--- a/doc/source/sdk/troubleshooting-tips/debugging-memory-leaks.en.rst
+++ /dev/null
@@ -1,32 +0,0 @@
-Debugging Memory Leaks
-**********************
-
-.. 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.
-
-Memory leaks in a plugin can be detected using e.g. an MRTG graph
-related to memory - you can use memory dump information. Enable
-``mem dump`` in ``records.config`` as follows:
-
-::
-
- :::text
- CONFIG proxy.config.dump_mem_info_frequency INT <value>
-
-This causes Traffic Server to dump memory information to ``traffic.out``
-at ``<value>`` (intervals are in seconds). A zero value means that it is
-disabled.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/troubleshooting-tips/unable-to-debug-tags.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/troubleshooting-tips/unable-to-debug-tags.en.rst b/doc/source/sdk/troubleshooting-tips/unable-to-debug-tags.en.rst
deleted file mode 100644
index 8e3a30b..0000000
--- a/doc/source/sdk/troubleshooting-tips/unable-to-debug-tags.en.rst
+++ /dev/null
@@ -1,113 +0,0 @@
-Using Debug Tags
-****************
-
-.. 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.
-
-Use the API
-``void TSDebug (const char *tag, const char *format_str, ...)`` to add
-traces in your plugin. In this API:
-
-- ``tag`` is the Traffic Server parameter that enables Traffic Server
- to print out *``format_str``*
-
-- ``...`` are variables for *``format_str``* in the standard ``printf``
- style.
-
-Run Traffic Server with the ``-Ttag`` option. For example, if the tag is
-``my-plugin``, then the debug output goes to ``traffic.out.``\ See
-below:
-
-::
-
- :::text
- traffic_server -T"my-plugin"
-
-Set the following variables in ``records.config`` (in the Traffic Server
-``config`` directory):
-
-::
-
- :::text
- proxy.config.diags.debug.enabled INT 1
- proxy.config.diags.debug.tags STRING debug-tag-name
-
-In this case, debug output goes to ``traffic.out``.
-
-Example:
-
-::
-
- :::c
- TSDebug ("my-plugin", "Starting my-plugin at %d\n", the_time);
-
-The statement ``"Starting my-plugin at <time>"`` appears whenever you
-run Traffic Server with the ``my-plugin`` tag:
-
-::
-
- :::text
- traffic_server -T"my-plugin"
-
-Other Useful Internal Debug Tags
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Embedded in the base Traffic Server code are many debug tags for
-internal debugging purposes. These can also be used to follow Traffic
-Server behavior for testing and analysis.
-
-The debug tag setting (``-T`` and ``proxy.config.diag.debug.tags``) is a
-anchored regular expression against which the tag for a specific debug
-message is matched. This means the value "http" matches debug emssages
-with the tag "http" but also "http\_seq" and "http\_trans". If you want
-multiple tags then use a pipe symbol to separate the tags. For example
-"http\_tproxy\|dns\|hostdb" will match any of the message tags
-"http\_tproxy", "dns", "hostdb", or "dns\_srv" (but not "http\_trans"
-nor "splitdns").
-
-Some of the useful HTTP debug tags are:
-
-- ``http_hdrs`` - traces all incoming and outgoing HTTP headers.
-
-- ``http_trans`` - traces actions in an HTTP transaction.
-
-- ``http_seq`` - traces the sequence of the HTTP state machine.
-
-- ``http_tproxy`` - transparency related HTTP events
-
-- ``dns`` - DNS operations
-
-- ``hostdb`` - Host name lookup
-
-- ``iocore_net`` - Socket and low level IO (very voluminous)
-
-- ``socket`` - socket operations
-
-- ``ssl`` - SSL related events
-
-- ``cache`` - Cache operations (many subtags, examine the output to
- narrow the tag set)
-
-- ``cache_update`` - Cache updates including writes
-
-- ``cache_read`` - Cache read events.
-
-- ``dir_probe`` - Cache searches.
-
-- ``sdk`` - gives some warning concerning API usage.
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/troubleshooting-tips/unable-to-load-plugins.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/troubleshooting-tips/unable-to-load-plugins.en.rst b/doc/source/sdk/troubleshooting-tips/unable-to-load-plugins.en.rst
deleted file mode 100644
index 70d21bd..0000000
--- a/doc/source/sdk/troubleshooting-tips/unable-to-load-plugins.en.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-Unable to Load Plugins
-**********************
-
-.. 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.
-
-To load plugins, follow the steps below.
-
-1. Make sure that your plugin source code contains an ``TSPluginInit``
- initialization function.
-
-2. Compile your plugin source code, creating a shared library.
-
-3. Add an entry to the ``plugin.config`` file for your plugin.
-
-4. Add the path to your plugin shared library to the ``records.config``
- file.
-
-5. Restart Traffic Server.
-
-For detailed information about each step above, refer to `A Simple
-Plugin <../getting-started/a-simple-plugin>`__.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/source/sdk/troubleshooting-tips/using-a-debugger.en.rst
----------------------------------------------------------------------
diff --git a/doc/source/sdk/troubleshooting-tips/using-a-debugger.en.rst b/doc/source/sdk/troubleshooting-tips/using-a-debugger.en.rst
deleted file mode 100644
index 82a0165..0000000
--- a/doc/source/sdk/troubleshooting-tips/using-a-debugger.en.rst
+++ /dev/null
@@ -1,40 +0,0 @@
-Using a Debugger
-****************
-
-.. 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.
-
-A debugger can set breakpoints in a plugin. Use a Traffic Server debug
-build and compile the plugin with the ``-g`` option. A debugger can also
-be used to analyze a core dump. To generate core, set the size limit of
-the core files in the ``records.config`` file to -1 as follows:
-
-::
-
- :::c
- CONFIG proxy.config.core_limit INT -1
-
-This is the equivalent of setting ``ulimit -c unlimited``
-
-Debugging Tips:
-~~~~~~~~~~~~~~~
-
-- Use a Traffic Server debug version.
-
-- Use assertions in your plugin (``TSAssert``/``TSReleaseAssert``).
-
-
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/alarm.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/alarm.jpg b/doc/static/images/admin/alarm.jpg
new file mode 100644
index 0000000..06a94a0
Binary files /dev/null and b/doc/static/images/admin/alarm.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/ats-basic-traffic.png
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/ats-basic-traffic.png b/doc/static/images/admin/ats-basic-traffic.png
new file mode 100644
index 0000000..f877060
Binary files /dev/null and b/doc/static/images/admin/ats-basic-traffic.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/ats-traffic-bridge.png
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/ats-traffic-bridge.png b/doc/static/images/admin/ats-traffic-bridge.png
new file mode 100644
index 0000000..97cf4bc
Binary files /dev/null and b/doc/static/images/admin/ats-traffic-bridge.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/cache_hit.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/cache_hit.jpg b/doc/static/images/admin/cache_hit.jpg
new file mode 100644
index 0000000..c703925
Binary files /dev/null and b/doc/static/images/admin/cache_hit.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/cache_miss.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/cache_miss.jpg b/doc/static/images/admin/cache_miss.jpg
new file mode 100644
index 0000000..2509b63
Binary files /dev/null and b/doc/static/images/admin/cache_miss.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/cachehrc.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/cachehrc.jpg b/doc/static/images/admin/cachehrc.jpg
new file mode 100644
index 0000000..9f6ed52
Binary files /dev/null and b/doc/static/images/admin/cachehrc.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/configur.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/configur.jpg b/doc/static/images/admin/configur.jpg
new file mode 100644
index 0000000..f6f4660
Binary files /dev/null and b/doc/static/images/admin/configur.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/dash.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/dash.jpg b/doc/static/images/admin/dash.jpg
new file mode 100644
index 0000000..52ccc3b
Binary files /dev/null and b/doc/static/images/admin/dash.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/dash3.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/dash3.jpg b/doc/static/images/admin/dash3.jpg
new file mode 100644
index 0000000..25cb745
Binary files /dev/null and b/doc/static/images/admin/dash3.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/firewall.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/firewall.jpg b/doc/static/images/admin/firewall.jpg
new file mode 100644
index 0000000..aa66081
Binary files /dev/null and b/doc/static/images/admin/firewall.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/httprvs.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/httprvs.jpg b/doc/static/images/admin/httprvs.jpg
new file mode 100644
index 0000000..de004e6
Binary files /dev/null and b/doc/static/images/admin/httprvs.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/logcolat.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/logcolat.jpg b/doc/static/images/admin/logcolat.jpg
new file mode 100644
index 0000000..4b489f3
Binary files /dev/null and b/doc/static/images/admin/logcolat.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/monitor.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/monitor.jpg b/doc/static/images/admin/monitor.jpg
new file mode 100644
index 0000000..686c8ef
Binary files /dev/null and b/doc/static/images/admin/monitor.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/netscape_common_format.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/netscape_common_format.jpg b/doc/static/images/admin/netscape_common_format.jpg
new file mode 100644
index 0000000..852658d
Binary files /dev/null and b/doc/static/images/admin/netscape_common_format.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/netscape_extended2_format.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/netscape_extended2_format.jpg b/doc/static/images/admin/netscape_extended2_format.jpg
new file mode 100644
index 0000000..ca306a4
Binary files /dev/null and b/doc/static/images/admin/netscape_extended2_format.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/netscape_extended_format.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/netscape_extended_format.jpg b/doc/static/images/admin/netscape_extended_format.jpg
new file mode 100644
index 0000000..e910a4c
Binary files /dev/null and b/doc/static/images/admin/netscape_extended_format.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/process.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/process.jpg b/doc/static/images/admin/process.jpg
new file mode 100644
index 0000000..f683ac7
Binary files /dev/null and b/doc/static/images/admin/process.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/records.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/records.jpg b/doc/static/images/admin/records.jpg
new file mode 100644
index 0000000..381d138
Binary files /dev/null and b/doc/static/images/admin/records.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/revproxy.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/revproxy.jpg b/doc/static/images/admin/revproxy.jpg
new file mode 100644
index 0000000..78782aa
Binary files /dev/null and b/doc/static/images/admin/revproxy.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/squid_format.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/squid_format.jpg b/doc/static/images/admin/squid_format.jpg
new file mode 100644
index 0000000..62693f7
Binary files /dev/null and b/doc/static/images/admin/squid_format.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/ssl_c.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/ssl_c.jpg b/doc/static/images/admin/ssl_c.jpg
new file mode 100644
index 0000000..cadafbe
Binary files /dev/null and b/doc/static/images/admin/ssl_c.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/ssl_os.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/ssl_os.jpg b/doc/static/images/admin/ssl_os.jpg
new file mode 100644
index 0000000..8ed7e3d
Binary files /dev/null and b/doc/static/images/admin/ssl_os.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/stat.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/stat.jpg b/doc/static/images/admin/stat.jpg
new file mode 100644
index 0000000..0946dad
Binary files /dev/null and b/doc/static/images/admin/stat.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/summary-mixt.log_file.jpg
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/summary-mixt.log_file.jpg b/doc/static/images/admin/summary-mixt.log_file.jpg
new file mode 100644
index 0000000..5a18e0d
Binary files /dev/null and b/doc/static/images/admin/summary-mixt.log_file.jpg differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/admin/wccp-shared-outer.png
----------------------------------------------------------------------
diff --git a/doc/static/images/admin/wccp-shared-outer.png b/doc/static/images/admin/wccp-shared-outer.png
new file mode 100644
index 0000000..e616517
Binary files /dev/null and b/doc/static/images/admin/wccp-shared-outer.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/akamai.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/akamai.png b/doc/static/images/companies/akamai.png
new file mode 100644
index 0000000..012162e
Binary files /dev/null and b/doc/static/images/companies/akamai.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/betfair.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/betfair.png b/doc/static/images/companies/betfair.png
new file mode 100644
index 0000000..06cb63c
Binary files /dev/null and b/doc/static/images/companies/betfair.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/brainswear.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/brainswear.png b/doc/static/images/companies/brainswear.png
new file mode 100644
index 0000000..8eee43c
Binary files /dev/null and b/doc/static/images/companies/brainswear.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/comcast.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/comcast.png b/doc/static/images/companies/comcast.png
new file mode 100644
index 0000000..eaa8968
Binary files /dev/null and b/doc/static/images/companies/comcast.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/devaus.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/devaus.png b/doc/static/images/companies/devaus.png
new file mode 100644
index 0000000..74f1aa9
Binary files /dev/null and b/doc/static/images/companies/devaus.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/frisch.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/frisch.png b/doc/static/images/companies/frisch.png
new file mode 100644
index 0000000..3f74248
Binary files /dev/null and b/doc/static/images/companies/frisch.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/godaddy.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/godaddy.png b/doc/static/images/companies/godaddy.png
new file mode 100644
index 0000000..34dbf28
Binary files /dev/null and b/doc/static/images/companies/godaddy.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/guruve.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/guruve.png b/doc/static/images/companies/guruve.png
new file mode 100644
index 0000000..fb06afb
Binary files /dev/null and b/doc/static/images/companies/guruve.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/internode.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/internode.png b/doc/static/images/companies/internode.png
new file mode 100644
index 0000000..6873413
Binary files /dev/null and b/doc/static/images/companies/internode.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/linkedin.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/linkedin.png b/doc/static/images/companies/linkedin.png
new file mode 100644
index 0000000..51a9256
Binary files /dev/null and b/doc/static/images/companies/linkedin.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/omniti.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/omniti.png b/doc/static/images/companies/omniti.png
new file mode 100644
index 0000000..13b229f
Binary files /dev/null and b/doc/static/images/companies/omniti.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/powerhttp.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/powerhttp.png b/doc/static/images/companies/powerhttp.png
new file mode 100644
index 0000000..804e00a
Binary files /dev/null and b/doc/static/images/companies/powerhttp.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/sic.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/sic.png b/doc/static/images/companies/sic.png
new file mode 100644
index 0000000..6f49773
Binary files /dev/null and b/doc/static/images/companies/sic.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/suomen.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/suomen.png b/doc/static/images/companies/suomen.png
new file mode 100644
index 0000000..06a7b12
Binary files /dev/null and b/doc/static/images/companies/suomen.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/taobao.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/taobao.png b/doc/static/images/companies/taobao.png
new file mode 100644
index 0000000..001007d
Binary files /dev/null and b/doc/static/images/companies/taobao.png differ
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a782694b/doc/static/images/companies/vng.png
----------------------------------------------------------------------
diff --git a/doc/static/images/companies/vng.png b/doc/static/images/companies/vng.png
new file mode 100644
index 0000000..91c0087
Binary files /dev/null and b/doc/static/images/companies/vng.png differ