You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2015/12/21 20:44:53 UTC
[02/16] trafficserver git commit: TS-3944: Add documentation for
TSHttpTxnServerAddrSet to clarify when it must be called. This close #385.
TS-3944: Add documentation for TSHttpTxnServerAddrSet to clarify when it must be called.
This close #385.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/64957d4e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/64957d4e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/64957d4e
Branch: refs/heads/6.1.x
Commit: 64957d4e84ced2605b657f9dad2dea0e311b571f
Parents: 55c6add
Author: Alan M. Carroll <am...@apache.org>
Authored: Wed Dec 16 23:40:04 2015 -0600
Committer: Alan M. Carroll <am...@apache.org>
Committed: Thu Dec 17 17:01:40 2015 -0600
----------------------------------------------------------------------
.../api/functions/TSHttpTxnServerAddrSet.en.rst | 42 ++++++++++++++++++++
.../http-transactions.en.rst | 2 +
2 files changed, 44 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/64957d4e/doc/developer-guide/api/functions/TSHttpTxnServerAddrSet.en.rst
----------------------------------------------------------------------
diff --git a/doc/developer-guide/api/functions/TSHttpTxnServerAddrSet.en.rst b/doc/developer-guide/api/functions/TSHttpTxnServerAddrSet.en.rst
new file mode 100644
index 0000000..76790a9
--- /dev/null
+++ b/doc/developer-guide/api/functions/TSHttpTxnServerAddrSet.en.rst
@@ -0,0 +1,42 @@
+.. 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.
+
+.. include:: ../../../common.defs
+
+.. default-domain:: c
+
+TSHttpTxnServerAddrSet
+**********************
+
+Synopsis
+========
+
+`#include <ts/ts.h>`
+
+.. function:: TSReturnCode TSHttpTxnServerAddrGet(TSHttpTxn txnp, struct sockaddr const* addr)
+
+Description
+===========
+
+Set the origin server address for transaction :arg:`txnp`. This includes the port in :arg:`addr`.
+The address family is also set by the contents of :arg:`addr`. The address data is copied out of
+:arg:`addr` so there is no dependency on the lifetime of that object.
+
+This hook must be called no later than TS_HTTP_OS_DNS_HOOK. If this is called then DNS resolution
+will not be done as the address of the server is already know.
+
+An error value is returned if :arg:`addr` does not contain a valid IPv4 or IPv6 address with a valid
+(non-zero) port.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/64957d4e/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst
----------------------------------------------------------------------
diff --git a/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst b/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst
index 28a7f9e..aa6c020 100644
--- a/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst
+++ b/doc/developer-guide/plugins/hooks-and-transactions/http-transactions.en.rst
@@ -185,6 +185,8 @@ The HTTP transaction functions are:
- :c:func:`TSHttpTxnServerAddrGet`
+- :c:func:`TSHttpTxnServerAddrSet`
+
- :c:func:`TSHttpTxnServerReqGet`
- :c:func:`TSHttpTxnServerRespGet`