TSAPI Types - TSTypes API function
#include <ts/ts.h>
#include <ts/remap.h>
The Apache Traffic Server API provides large number of types. Many
of them are specific to a particular API function or function group, but
others are used more widely. Those are described on this page.
- type
INK_MD5
- Buffer type sufficient to contain an MD5 hash value.
- type
TSCont
- An opaque type that represents a Traffic Server continuation.
- type
TSHostLookupResult
- A type representing the result of a call to TSHostLookup(). Use
with TSHostLookupResultAddrGet().
- type
TSHRTime
- "High Resolution Time"
A 64 bit time value, measured in nanoseconds.
- type
TSHttpConnectOptions
- A type that encapsulates options passed into the
TSHttpConnectPlugin() function.
- int64_t
id
- Numeric identifier passed through to the HTTP state machine.
- TSIOBufferWaterMark
buffer_water_mark
- A numeric value specifying the minimum number of bytes that must be
written to an IOBuffer before any continuation is called back to read from
the buffer. See the TSIOBufferWaterMarkGet() and
TSIOBufferWaterMarkSet() functions for further detail.
- type
TSConnectType
- Enumeration that specifies the type of data within a
TSHttpConnectOptions structure.
- type
TSHttpSsn
- An opaque type that represents a Traffic Server session.
- type
TSHttpTxn
- An opaque type that represents a Traffic Server HTTP
transaction.
- type
TSMBuffer
- Internally, data for a transaction is stored in one or more header
heaps. These are storage local to the transaction, and generally each
HTTP header is stored in a separate one. This type is a handle to a header
heap, and is provided or required by functions that locate HTTP header
related data.
- type
TSMgmtFloat
- The type used internally for a floating point value. This corresponds to
the value TS_RECORDDATATYPE_FLOAT for TSRecordDataType.
- type
TSMgmtInt
- The type used internally for an integer. This corresponds to the value
TS_RECORDDATATYPE_INT for TSRecordDataType.
- type
TSMLoc
- This is a memory location relative to a header heap represented by
a TSMBuffer and must always be used in conjunction with that
TSMBuffer instance. It identifies a specific object in the
TSMBuffer. This indirection is needed so that the TSMBuffer
can reallocate space as needed. Therefore a raw address obtained from a
TSMLoc should be considered volatile that may become invalid across
any API call.
- type
TSRemapRequestInfo
- Data passed to a remap plugin during the invocation of a remap rule.
- TSMLoc
requestUrl
- The current request URL. The remap rule and plugins listed earlier in the
remap rule can modify this from the client request URL. Remap plugins are
expected to modify this value to perform the remapping of the request.
Note this is the same TSMLoc as would be obtained by calling
TSHttpTxnClientReqGet().
- int redirect
- Flag for using the remapped URL as an explicit redirection. This can be
set by the remap plugin.
- type
TSSslX509
- This type represents the X509 object created from an SSL
certificate.
- type
TSTextLogObject
- This type represents a custom log file that you create with
TSTextLogObjectCreate().
Your plugin writes entries into this log file using
TSTextLogObjectWrite().
- type
TSThread
- This represents an internal Traffic Server thread, created by the Traffic
Server core. It is an opaque type which can be used only to check for
equality / inequality, and passed to API functions. An instance that
refers to the current thread can be obtained with
TSThreadSelf().
- type
TSEventThread
- This type represents an event thread. It is an opaque which is used
to specify a particular event processing thread in Traffic Server. If
plugin code is executing in an event thread (which will be true if called
from a hook or a scheduled event) then the current event thread can be
obtained via TSEventThreadSelf().
A TSEventThread is also a TSThread and can be
passed as an argument to any parameter of type TSThread.
- type
TSVConn
- A virtual connection. This is the basic mechanism for abstracting I/O
operations in Traffic Server.
- type
TSNetVConnection
- A subtype of TSVConn that provides additional IP network
information and operations.
- type
TSHttpPriority
- The abstract type of the various HTTP priority implementations.
- uint8_t
priority_type
- The reference to the concrete HTTP priority implementation. This will be a
value from TSHttpPriorityType
- uint8_t
data[7]
- The space allocated for the concrete priority implementation.
Note that this has to take padding into account. There is a
static_assert in InkAPI.cc to verify that TSHttpPriority
is at least as large as TSHttp2Priority. As other structures are
added that are represented by TSHttpPriority add more
static_asserts to verify that TSHttpPriority is as large as it
needs to be.
- type
TSHttp2Priority
- A structure for HTTP/2 priority. For an explanation of these terms with
respect to HTTP/2, see RFC 7540, section 5.3.
- int32_t
stream_dependency
- The stream dependency. Per spec, see RFC 7540 section 6.2, this is
31 bits. We use a signed 32 bit structure to store either a valid
dependency or -1 if the stream has no dependency.
2023, dev@trafficserver.apache.org