.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "TSAPI TYPES" "3ts" "Apr 16, 2024" "9.2" "Apache Traffic Server" .SH NAME TSAPI Types \- TSTypes API function .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX #include #include .EE .UNINDENT .UNINDENT .SH DESCRIPTION .sp 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. .INDENT 0.0 .TP .B type ink_hrtime .UNINDENT .INDENT 0.0 .TP .B type INK_MD5 Buffer type sufficient to contain an MD5 hash value. .UNINDENT .INDENT 0.0 .TP .B class INK_MD5 See \fI\%INK_MD5\fP\&. .UNINDENT .INDENT 0.0 .TP .B class RecRawStatBlock A data block intended to contain Traffic Server statistics. .UNINDENT .INDENT 0.0 .TP .B type TSAction .UNINDENT .INDENT 0.0 .TP .B type TSCacheKey .UNINDENT .INDENT 0.0 .TP .B type TSConfig .UNINDENT .INDENT 0.0 .TP .B type TSCont An opaque type that represents a Traffic Server \fI\%continuation\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSEventFunc .UNINDENT .INDENT 0.0 .TP .B type TSFile .UNINDENT .INDENT 0.0 .TP .B type TSHostLookupResult A type representing the result of a call to \fI\%TSHostLookup()\fP\&. Use with \fI\%TSHostLookupResultAddrGet()\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSHRTime \(dqHigh Resolution Time\(dq .sp A 64 bit time value, measured in nanoseconds. .UNINDENT .INDENT 0.0 .TP .B type TSHttpConnectOptions A type that encapsulates options passed into the \fI\%TSHttpConnectPlugin()\fP function. .INDENT 7.0 .TP .B \fI\%TSConnectType\fP connect_type The type of data represented in the struct. .UNINDENT .INDENT 7.0 .TP .B sockaddr const *addr Network address of the target of the connection. .UNINDENT .INDENT 7.0 .TP .B const char *tag Tag that is passed through to the HTTP state machine. .UNINDENT .INDENT 7.0 .TP .B int64_t id Numeric identifier passed through to the HTTP state machine. .UNINDENT .INDENT 7.0 .TP .B \fI\%TSIOBufferSizeIndex\fP buffer_index A numeric buffer size index used to derive actual sizes used when constructing IOBuffers; see \fI\%TSIOBufferSizeIndex\fP\&. .UNINDENT .INDENT 7.0 .TP .B \fI\%TSIOBufferWaterMark\fP 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 \fI\%TSIOBufferWaterMarkGet()\fP and \fI\%TSIOBufferWaterMarkSet()\fP functions for further detail. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B type TSConnectType Enumeration that specifies the type of data within a \fI\%TSHttpConnectOptions\fP structure. .UNINDENT .INDENT 0.0 .TP .B type TSHttpParser .UNINDENT .INDENT 0.0 .TP .B type TSHttpSsn An opaque type that represents a Traffic Server \fI\%session\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSHttpTxn An opaque type that represents a Traffic Server HTTP \fI\%transaction\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSIOBuffer .UNINDENT .INDENT 0.0 .TP .B type TSIOBufferBlock .UNINDENT .INDENT 0.0 .TP .B type TSIOBufferReader .UNINDENT .INDENT 0.0 .TP .B type TSIOBufferSizeIndex .UNINDENT .INDENT 0.0 .TP .B type TSIOBufferWaterMark An enumeration that contains valid watermark values, currently only defaults. .UNINDENT .INDENT 0.0 .TP .B type TSLifecycleHookID An enumeration that identifies a \fI\%life cycle hook\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSMBuffer Internally, data for a transaction is stored in one or more \fI\%header heap\fPs. 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. .UNINDENT .INDENT 0.0 .TP .B type TSMgmtCounter .UNINDENT .INDENT 0.0 .TP .B type TSMgmtFloat The type used internally for a floating point value. This corresponds to the value \fBTS_RECORDDATATYPE_FLOAT\fP for \fI\%TSRecordDataType\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSMgmtInt The type used internally for an integer. This corresponds to the value \fBTS_RECORDDATATYPE_INT\fP for \fI\%TSRecordDataType\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSMgmtString .UNINDENT .INDENT 0.0 .TP .B type TSMimeParser .UNINDENT .INDENT 0.0 .TP .B type TSMLoc This is a memory location relative to a \fI\%header heap\fP represented by a \fI\%TSMBuffer\fP and must always be used in conjunction with that \fI\%TSMBuffer\fP instance. It identifies a specific object in the \fI\%TSMBuffer\fP\&. This indirection is needed so that the \fI\%TSMBuffer\fP can reallocate space as needed. Therefore a raw address obtained from a \fI\%TSMLoc\fP should be considered volatile that may become invalid across any API call. .UNINDENT .INDENT 0.0 .TP .B \fI\%TSMLoc\fP TS_NULL_MLOC A predefined null valued \fI\%TSMLoc\fP used to indicate the absence of an \fI\%TSMLoc\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSMutex .UNINDENT .INDENT 0.0 .TP .B type TSPluginRegistrationInfo The following struct is used by \fI\%TSPluginRegister()\fP\&. .sp It stores registration information about the plugin. .UNINDENT .INDENT 0.0 .TP .B type TSRemapInterface Data passed to a remap plugin via \fI\%TSRemapInit()\fP\&. .INDENT 7.0 .TP .B unsigned long size The size of the structure in bytes, including this member. .UNINDENT .INDENT 7.0 .TP .B unsigned long tsremap_version The API version of the C API. The lower 16 bits are the minor version, and the upper bits the major version. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B type TSRemapRequestInfo Data passed to a remap plugin during the invocation of a remap rule. .INDENT 7.0 .TP .B \fI\%TSMBuffer\fP requestBufp The client request. All of the other \fI\%TSMLoc\fP values use this as the base buffer. .UNINDENT .INDENT 7.0 .TP .B \fI\%TSMLoc\fP requestHdrp The client request. .UNINDENT .INDENT 7.0 .TP .B \fI\%TSMLoc\fP mapFromUrl The match URL in the remap rule. .UNINDENT .INDENT 7.0 .TP .B \fI\%TSMLoc\fP mapToUrl The target URL in the remap rule. .UNINDENT .INDENT 7.0 .TP .B \fI\%TSMLoc\fP 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 \fBTSMLoc\fP as would be obtained by calling \fI\%TSHttpTxnClientReqGet()\fP\&. .UNINDENT .INDENT 7.0 .TP .B int redirect Flag for using the remapped URL as an explicit redirection. This can be set by the remap plugin. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B type TSSecretID Contains the data for a TLS certificate and key. .INDENT 7.0 .TP .B const char *cert_name; The TLS certificate name. .UNINDENT .INDENT 7.0 .TP .B size_t cert_name_len; The length of the TLS certificate name. .UNINDENT .INDENT 7.0 .TP .B const char *key_name; The name of the TLS key. .UNINDENT .INDENT 7.0 .TP .B size_t key_name_len; The length of the name of the TLS key. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B type TSSslX509 This type represents the \fBX509\fP object created from an SSL certificate. .UNINDENT .INDENT 0.0 .TP .B type TSTextLogObject This type represents a custom log file that you create with \fI\%TSTextLogObjectCreate()\fP\&. .sp Your plugin writes entries into this log file using \fI\%TSTextLogObjectWrite()\fP\&. .UNINDENT .INDENT 0.0 .TP .B 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 \fI\%TSThreadSelf()\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSEventThread This type represents an \fI\%event thread\fP\&. 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 \fI\%TSEventThreadSelf()\fP\&. .sp A \fBTSEventThread\fP is also a \fI\%TSThread\fP and can be passed as an argument to any parameter of type \fI\%TSThread\fP\&. .UNINDENT .INDENT 0.0 .TP .B type TSThreadFunc .UNINDENT .INDENT 0.0 .TP .B type TSUserArgType An enum for the supported types of user arguments. .UNINDENT .INDENT 0.0 .TP .B enum TSUuidVersion A version value for at \fI\%TSUuid\fP\&. .INDENT 7.0 .TP .B enumerator TS_UUID_V4 A version 4 UUID. Currently only this value is used. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B size_t TS_UUID_STRING_LEN Length of a UUID string. .UNINDENT .INDENT 0.0 .TP .B type TSVConn A virtual connection. This is the basic mechanism for abstracting I/O operations in Traffic Server\&. .UNINDENT .INDENT 0.0 .TP .B type TSNetVConnection A subtype of \fI\%TSVConn\fP that provides additional IP network information and operations. .UNINDENT .INDENT 0.0 .TP .B type TSVIO .UNINDENT .INDENT 0.0 .TP .B type ModuleVersion A module version. .UNINDENT .INDENT 0.0 .TP .B type ModuleVersion A module version. .UNINDENT .INDENT 0.0 .TP .B template class DLL An anchor for a double linked intrusive list of instance of \fIT\fP\&. .UNINDENT .INDENT 0.0 .TP .B template class Queue .UNINDENT .INDENT 0.0 .TP .B type TSAcceptor .UNINDENT .INDENT 0.0 .TP .B template class LINK .UNINDENT .INDENT 0.0 .TP .B class VersionNumber A two part version number, defined in \fI\%include/tscore/I_Version.h\fP\&. .INDENT 7.0 .TP .B short int ink_major Major version number. .UNINDENT .INDENT 7.0 .TP .B short int ink_minor Minor version number. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B type TSFetchUrlParams_t .UNINDENT .INDENT 0.0 .TP .B type TSFetchSM .UNINDENT .INDENT 0.0 .TP .B type TSFetchEvent .UNINDENT .INDENT 0.0 .TP .B type TSHttpPriority The abstract type of the various HTTP priority implementations. .INDENT 7.0 .TP .B uint8_t priority_type The reference to the concrete HTTP priority implementation. This will be a value from TSHttpPriorityType .UNINDENT .INDENT 7.0 .TP .B uint8_t data[7] The space allocated for the concrete priority implementation. .sp Note that this has to take padding into account. There is a static_assert in \fBInkAPI.cc\fP to verify that \fI\%TSHttpPriority\fP is at least as large as \fI\%TSHttp2Priority\fP\&. As other structures are added that are represented by \fI\%TSHttpPriority\fP add more static_asserts to verify that \fI\%TSHttpPriority\fP is as large as it needs to be. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B type TSHttp2Priority A structure for HTTP/2 priority. For an explanation of these terms with respect to HTTP/2, see \fI\%RFC 7540\fP, section 5.3. .INDENT 7.0 .TP .B uint8_t priority_type HTTP_PROTOCOL_TYPE_HTTP_2 .UNINDENT .INDENT 7.0 .TP .B uint8_t weight .UNINDENT .INDENT 7.0 .TP .B int32_t stream_dependency The stream dependency. Per spec, see \fI\%RFC 7540\fP 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. .UNINDENT .UNINDENT .SH COPYRIGHT 2024, dev@trafficserver.apache.org .\" Generated by docutils manpage writer. .