ApacheTrafficServer  3.3.0-dev
Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
ts.h File Reference

Traffic Server SDK API header file. More...

#include <stdint.h>
#include <sys/types.h>
#include <sys/socket.h>
Include dependency graph for ts.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  TSPluginRegistrationInfo
 The following struct is used by TSPluginRegister(). More...
union  TSRecordData
struct  TSFetchEvent
struct  TSFetchUrlParams

Defines

#define tsapi
#define TS_PRINTFLIKE(fmt, arg)
#define TS_VERSION_STRING   "3.3.0-dev"
#define TS_VERSION_NUMBER   3003000
#define TS_VERSION_MAJOR   3
#define TS_VERSION_MINOR   3
#define TS_VERSION_MICRO   0
#define TS_HTTP_VERSION(a, b)   ((((a) & 0xFFFF) << 16) | ((b) & 0xFFFF))
#define TS_HTTP_MINOR(v)   ((v) & 0xFFFF)
#define TS_HTTP_MAJOR(v)   (((v) >> 16) & 0xFFFF)
#define __TS_RES_PATH(x)   #x
#define _TS_RES_PATH(x)   __TS_RES_PATH (x)
#define TS_RES_PATH(x)   x __FILE__ ":" _TS_RES_PATH (__LINE__)
#define TS_RES_MEM_PATH   TS_RES_PATH ("memory/")
#define TS_MAX_USER_NAME_LEN   256
#define TS_DEPRECATED
#define TS_HTTP_READ_REQUEST_PRE_REMAP_HOOK   TS_HTTP_PRE_REMAP_HOOK
#define TS_EVENT_HTTP_READ_REQUEST_PRE_REMAP   TS_EVENT_HTTP_PRE_REMAP
#define TSmalloc(s)   _TSmalloc ((s), TS_RES_MEM_PATH)
#define TSrealloc(p, s)   _TSrealloc ((p), (s), TS_RES_MEM_PATH)
#define TSstrdup(p)   _TSstrdup ((p), -1, TS_RES_MEM_PATH)
#define TSstrndup(p, n)   _TSstrdup ((p), (n), TS_RES_MEM_PATH)
#define TSstrlcpy(d, s, l)   _TSstrlcpy ((d), (s), (l))
#define TSstrlcat(d, s, l)   _TSstrlcat ((d), (s), (l))
#define TSfree(p)   _TSfree (p)
#define TSReleaseAssert(EX)   (void)((EX) || (_TSReleaseAssert(#EX, __FILE__, __LINE__)))
#define TSAssert(EX)   (void)((EX) || (_TSAssert(#EX, __FILE__, __LINE__)))
#define TSDEBUG   if (diags_on_for_plugins) TSDebug

Typedefs

typedef int64_t TSHRTime
typedef int64_t TSMgmtInt
typedef int64_t TSMgmtCounter
typedef float TSMgmtFloat
typedef char * TSMgmtString
typedef struct tsapi_file * TSFile
typedef struct tsapi_mloc * TSMLoc
typedef struct tsapi_mbuffer * TSMBuffer
typedef struct tsapi_httpssn * TSHttpSsn
typedef struct tsapi_httptxn * TSHttpTxn
typedef struct tsapi_httpaltinfo * TSHttpAltInfo
typedef struct tsapi_mimeparser * TSMimeParser
typedef struct tsapi_httpparser * TSHttpParser
typedef struct tsapi_cachekey * TSCacheKey
typedef struct
tsapi_cachehttpinfo * 
TSCacheHttpInfo
typedef struct tsapi_cachetxn * TSCacheTxn
typedef struct tsapi_port * TSPortDescriptor
typedef struct tsapi_vio * TSVIO
typedef struct tsapi_thread * TSThread
typedef struct tsapi_mutex * TSMutex
typedef struct tsapi_config * TSConfig
typedef struct tsapi_cont * TSCont
typedef struct tsapi_cont * TSVConn
typedef struct tsapi_action * TSAction
typedef struct tsapi_iobuffer * TSIOBuffer
typedef struct tsapi_iobufferdata * TSIOBufferData
typedef struct tsapi_bufferblock * TSIOBufferBlock
typedef struct tsapi_bufferreader * TSIOBufferReader
typedef struct
tsapi_hostlookupresult * 
TSHostLookupResult
typedef struct tsapi_aiocallback * TSAIOCallback
typedef void *(* TSThreadFunc )(void *data)
typedef int(* TSEventFunc )(TSCont contp, TSEvent event, void *edata)
typedef void(* TSConfigDestroyFunc )(void *data)
typedef struct TSFetchUrlParams TSFetchUrlParams_t
typedef struct
tsapi_textlogobject * 
TSTextLogObject
 This type represents a custom log file that you create with TSTextLogObjectCreate().
typedef void(* TSRecordDumpCb )(TSRecordType rec_type, void *edata, int registered, const char *name, TSRecordDataType data_type, TSRecordData *datum)

Enumerations

enum  TSParseResult { TS_PARSE_ERROR = -1, TS_PARSE_DONE = 0, TS_PARSE_OK = 1, TS_PARSE_CONT = 2 }
 This set of enums are possible values returned by TSHttpHdrParseReq() and TSHttpHdrParseResp(). More...
enum  TSHttpType { TS_HTTP_TYPE_UNKNOWN, TS_HTTP_TYPE_REQUEST, TS_HTTP_TYPE_RESPONSE }
 This set of enums represents the possible HTTP types that can be assigned to an HTTP header. More...
enum  TSHttpStatus {
  TS_HTTP_STATUS_NONE = 0, TS_HTTP_STATUS_CONTINUE = 100, TS_HTTP_STATUS_SWITCHING_PROTOCOL = 101, TS_HTTP_STATUS_OK = 200,
  TS_HTTP_STATUS_CREATED = 201, TS_HTTP_STATUS_ACCEPTED = 202, TS_HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION = 203, TS_HTTP_STATUS_NO_CONTENT = 204,
  TS_HTTP_STATUS_RESET_CONTENT = 205, TS_HTTP_STATUS_PARTIAL_CONTENT = 206, TS_HTTP_STATUS_MULTI_STATUS = 207, TS_HTTP_STATUS_ALREADY_REPORTED = 208,
  TS_HTTP_STATUS_IM_USED = 211, TS_HTTP_STATUS_MULTIPLE_CHOICES = 300, TS_HTTP_STATUS_MOVED_PERMANENTLY = 301, TS_HTTP_STATUS_MOVED_TEMPORARILY = 302,
  TS_HTTP_STATUS_SEE_OTHER = 303, TS_HTTP_STATUS_NOT_MODIFIED = 304, TS_HTTP_STATUS_USE_PROXY = 305, TS_HTTP_STATUS_TEMPORARY_REDIRECT = 307,
  TS_HTTP_STATUS_PERMANENT_REDIRECT = 308, TS_HTTP_STATUS_BAD_REQUEST = 400, TS_HTTP_STATUS_UNAUTHORIZED = 401, TS_HTTP_STATUS_PAYMENT_REQUIRED = 402,
  TS_HTTP_STATUS_FORBIDDEN = 403, TS_HTTP_STATUS_NOT_FOUND = 404, TS_HTTP_STATUS_METHOD_NOT_ALLOWED = 405, TS_HTTP_STATUS_NOT_ACCEPTABLE = 406,
  TS_HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED = 407, TS_HTTP_STATUS_REQUEST_TIMEOUT = 408, TS_HTTP_STATUS_CONFLICT = 409, TS_HTTP_STATUS_GONE = 410,
  TS_HTTP_STATUS_LENGTH_REQUIRED = 411, TS_HTTP_STATUS_PRECONDITION_FAILED = 412, TS_HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE = 413, TS_HTTP_STATUS_REQUEST_URI_TOO_LONG = 414,
  TS_HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE = 415, TS_HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE = 416, TS_HTTP_STATUS_EXPECTATION_FAILED = 417, TS_HTTP_STATUS_UNPROCESSABLE_ENTITY = 422,
  TS_HTTP_STATUS_LOCKED = 423, TS_HTTP_STATUS_FAILED_DEPENDENCY = 424, TS_HTTP_STATUS_UPGRADE_REQUIRED = 426, TS_HTTP_STATUS_PRECONDITION_REQUIRED = 428,
  TS_HTTP_STATUS_TOO_MANY_REQUESTS = 429, TS_HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE = 431, TS_HTTP_STATUS_INTERNAL_SERVER_ERROR = 500, TS_HTTP_STATUS_NOT_IMPLEMENTED = 501,
  TS_HTTP_STATUS_BAD_GATEWAY = 502, TS_HTTP_STATUS_SERVICE_UNAVAILABLE = 503, TS_HTTP_STATUS_GATEWAY_TIMEOUT = 504, TS_HTTP_STATUS_HTTPVER_NOT_SUPPORTED = 505,
  TS_HTTP_STATUS_VARIANT_ALSO_NEGOTIATES = 506, TS_HTTP_STATUS_INSUFFICIENT_STORAGE = 507, TS_HTTP_STATUS_LOOP_DETECTED = 508, TS_HTTP_STATUS_NOT_EXTENDED = 510,
  TS_HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED = 511
}
 This set of enums represents possible return values from TSHttpHdrStatusGet(), which retrieves the status code from an HTTP response header (TSHttpHdrStatusGet() retrieves status codes only from headers of type TS_HTTP_TYPE_RESPONSE). More...
enum  TSHttpHookID {
  TS_HTTP_READ_REQUEST_HDR_HOOK, TS_HTTP_OS_DNS_HOOK, TS_HTTP_SEND_REQUEST_HDR_HOOK, TS_HTTP_READ_CACHE_HDR_HOOK,
  TS_HTTP_READ_RESPONSE_HDR_HOOK, TS_HTTP_SEND_RESPONSE_HDR_HOOK, TS_HTTP_REQUEST_TRANSFORM_HOOK, TS_HTTP_RESPONSE_TRANSFORM_HOOK,
  TS_HTTP_SELECT_ALT_HOOK, TS_HTTP_TXN_START_HOOK, TS_HTTP_TXN_CLOSE_HOOK, TS_HTTP_SSN_START_HOOK,
  TS_HTTP_SSN_CLOSE_HOOK, TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK, TS_HTTP_PRE_REMAP_HOOK, TS_HTTP_POST_REMAP_HOOK,
  TS_HTTP_LAST_HOOK
}
 This set of enums represents the possible hooks where you can set up continuation callbacks. More...
enum  TSEvent {
  TS_EVENT_NONE = 0, TS_EVENT_IMMEDIATE = 1, TS_EVENT_TIMEOUT = 2, TS_EVENT_ERROR = 3,
  TS_EVENT_CONTINUE = 4, TS_EVENT_VCONN_READ_READY = 100, TS_EVENT_VCONN_WRITE_READY = 101, TS_EVENT_VCONN_READ_COMPLETE = 102,
  TS_EVENT_VCONN_WRITE_COMPLETE = 103, TS_EVENT_VCONN_EOS = 104, TS_EVENT_VCONN_INACTIVITY_TIMEOUT = 105, TS_EVENT_NET_CONNECT = 200,
  TS_EVENT_NET_CONNECT_FAILED = 201, TS_EVENT_NET_ACCEPT = 202, TS_EVENT_NET_ACCEPT_FAILED = 204, TS_EVENT_INTERNAL_206 = 206,
  TS_EVENT_INTERNAL_207 = 207, TS_EVENT_INTERNAL_208 = 208, TS_EVENT_INTERNAL_209 = 209, TS_EVENT_INTERNAL_210 = 210,
  TS_EVENT_INTERNAL_211 = 211, TS_EVENT_INTERNAL_212 = 212, TS_EVENT_HOST_LOOKUP = 500, TS_EVENT_CACHE_OPEN_READ = 1102,
  TS_EVENT_CACHE_OPEN_READ_FAILED = 1103, TS_EVENT_CACHE_OPEN_WRITE = 1108, TS_EVENT_CACHE_OPEN_WRITE_FAILED = 1109, TS_EVENT_CACHE_REMOVE = 1112,
  TS_EVENT_CACHE_REMOVE_FAILED = 1113, TS_EVENT_CACHE_SCAN = 1120, TS_EVENT_CACHE_SCAN_FAILED = 1121, TS_EVENT_CACHE_SCAN_OBJECT = 1122,
  TS_EVENT_CACHE_SCAN_OPERATION_BLOCKED = 1123, TS_EVENT_CACHE_SCAN_OPERATION_FAILED = 1124, TS_EVENT_CACHE_SCAN_DONE = 1125, TS_EVENT_CACHE_LOOKUP = 1126,
  TS_EVENT_CACHE_READ = 1127, TS_EVENT_CACHE_DELETE = 1128, TS_EVENT_CACHE_WRITE = 1129, TS_EVENT_CACHE_WRITE_HEADER = 1130,
  TS_EVENT_CACHE_CLOSE = 1131, TS_EVENT_CACHE_LOOKUP_READY = 1132, TS_EVENT_CACHE_LOOKUP_COMPLETE = 1133, TS_EVENT_CACHE_READ_READY = 1134,
  TS_EVENT_CACHE_READ_COMPLETE = 1135, TS_EVENT_INTERNAL_1200 = 1200, TS_AIO_EVENT_DONE = 3900, TS_EVENT_HTTP_CONTINUE = 60000,
  TS_EVENT_HTTP_ERROR = 60001, TS_EVENT_HTTP_READ_REQUEST_HDR = 60002, TS_EVENT_HTTP_OS_DNS = 60003, TS_EVENT_HTTP_SEND_REQUEST_HDR = 60004,
  TS_EVENT_HTTP_READ_CACHE_HDR = 60005, TS_EVENT_HTTP_READ_RESPONSE_HDR = 60006, TS_EVENT_HTTP_SEND_RESPONSE_HDR = 60007, TS_EVENT_HTTP_REQUEST_TRANSFORM = 60008,
  TS_EVENT_HTTP_RESPONSE_TRANSFORM = 60009, TS_EVENT_HTTP_SELECT_ALT = 60010, TS_EVENT_HTTP_TXN_START = 60011, TS_EVENT_HTTP_TXN_CLOSE = 60012,
  TS_EVENT_HTTP_SSN_START = 60013, TS_EVENT_HTTP_SSN_CLOSE = 60014, TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE = 60015, TS_EVENT_HTTP_PRE_REMAP = 60016,
  TS_EVENT_HTTP_POST_REMAP = 60017, TS_EVENT_MGMT_UPDATE = 60100, TS_EVENT_INTERNAL_60200 = 60200, TS_EVENT_INTERNAL_60201 = 60201,
  TS_EVENT_INTERNAL_60202 = 60202
}
 TSEvents are sent to continuations when they are called back. More...
enum  TSServerState {
  TS_SRVSTATE_STATE_UNDEFINED = 0, TS_SRVSTATE_ACTIVE_TIMEOUT, TS_SRVSTATE_BAD_INCOMING_RESPONSE, TS_SRVSTATE_CONNECTION_ALIVE,
  TS_SRVSTATE_CONNECTION_CLOSED, TS_SRVSTATE_CONNECTION_ERROR, TS_SRVSTATE_INACTIVE_TIMEOUT, TS_SRVSTATE_OPEN_RAW_ERROR,
  TS_SRVSTATE_PARSE_ERROR, TS_SRVSTATE_TRANSACTION_COMPLETE, TS_SRVSTATE_CONGEST_CONTROL_CONGESTED_ON_F, TS_SRVSTATE_CONGEST_CONTROL_CONGESTED_ON_M
}
enum  TSLookingUpType {
  TS_LOOKUP_UNDEFINED_LOOKUP, TS_LOOKUP_ICP_SUGGESTED_HOST, TS_LOOKUP_PARENT_PROXY, TS_LOOKUP_ORIGIN_SERVER,
  TS_LOOKUP_INCOMING_ROUTER, TS_LOOKUP_HOST_NONE
}
enum  TSCacheLookupResult { TS_CACHE_LOOKUP_MISS, TS_CACHE_LOOKUP_HIT_STALE, TS_CACHE_LOOKUP_HIT_FRESH, TS_CACHE_LOOKUP_SKIPPED }
enum  TSCacheDataType { TS_CACHE_DATA_TYPE_NONE, TS_CACHE_DATA_TYPE_HTTP, TS_CACHE_DATA_TYPE_OTHER }
enum  TSCacheError { TS_CACHE_ERROR_NO_DOC = -20400, TS_CACHE_ERROR_DOC_BUSY = -20401, TS_CACHE_ERROR_NOT_READY = -20407 }
enum  TSCacheScanResult {
  TS_CACHE_SCAN_RESULT_DONE = 0, TS_CACHE_SCAN_RESULT_CONTINUE = 1, TS_CACHE_SCAN_RESULT_DELETE = 10, TS_CACHE_SCAN_RESULT_DELETE_ALL_ALTERNATES,
  TS_CACHE_SCAN_RESULT_UPDATE, TS_CACHE_SCAN_RESULT_RETRY
}
enum  TSIOBufferDataFlags { TS_DATA_ALLOCATE, TS_DATA_MALLOCED, TS_DATA_CONSTANT }
enum  TSVConnCloseFlags { TS_VC_CLOSE_ABORT = -1, TS_VC_CLOSE_NORMAL = 1 }
enum  TSIOBufferSizeIndex {
  TS_IOBUFFER_SIZE_INDEX_128 = 0, TS_IOBUFFER_SIZE_INDEX_256 = 1, TS_IOBUFFER_SIZE_INDEX_512 = 2, TS_IOBUFFER_SIZE_INDEX_1K = 3,
  TS_IOBUFFER_SIZE_INDEX_2K = 4, TS_IOBUFFER_SIZE_INDEX_4K = 5, TS_IOBUFFER_SIZE_INDEX_8K = 6, TS_IOBUFFER_SIZE_INDEX_16K = 7,
  TS_IOBUFFER_SIZE_INDEX_32K = 8
}
enum  TSSDKVersion { TS_SDK_VERSION_2_0 = 0, TS_SDK_VERSION_3_0 }
 Starting 2.0, SDK now follows same versioning as Traffic Server. More...
enum  TSReturnCode { TS_ERROR = -1, TS_SUCCESS = 0 }
enum  TSFetchWakeUpOptions { NO_CALLBACK = 0, AFTER_HEADER, AFTER_BODY }
enum  TSRecordType {
  TS_RECORDTYPE_NULL = 0, TS_RECORDTYPE_CONFIG, TS_RECORDTYPE_PROCESS, TS_RECORDTYPE_NODE,
  TS_RECORDTYPE_CLUSTER, TS_RECORDTYPE_LOCAL, TS_RECORDTYPE_PLUGIN, TS_RECORDTYPE_MAX
}
enum  TSRecordDataType {
  TS_RECORDDATATYPE_NULL = 0, TS_RECORDDATATYPE_INT, TS_RECORDDATATYPE_FLOAT, TS_RECORDDATATYPE_STRING,
  TS_RECORDDATATYPE_COUNTER, TS_RECORDDATATYPE_STAT_CONST, TS_RECORDDATATYPE_STAT_FX, TS_RECORDDATATYPE_MAX
}
enum  TSRecordPersistType { TS_RECORDP_NULL, TS_RECORDP_PERSISTENT, TS_RECORDP_NON_PERSISTENT }
enum  TSRecordUpdateType {
  TS_RECORDUPDATE_NULL, TS_RECORDUPDATE_DYNAMIC, TS_RECORDUPDATE_RESTART_TS, TS_RECORDUPDATE_RESTART_TM,
  TS_RECORDUPDATE_RESTART_TC
}
enum  TSRecordCheckType { TS_RECORDCHECK_NULL, TS_RECORDCHECK_STR, TS_RECORDCHECK_INT, TS_RECORDCHECK_IP }
enum  TSRecordModeType { TS_RECORDMODE_NULL, TS_RECORDMODE_CLIENT, TS_RECORDMODE_SERVER, TS_RECORDMODE_STAND_ALONE }
enum  TSRecordAccessType { TS_RECORDACCESS_NULL, TS_RECORDACCESS_NO_ACCESS, TS_RECORDACCESS_READ_ONLY }
enum  TSOverridableConfigKey {
  TS_CONFIG_NULL = -1, TS_CONFIG_URL_REMAP_PRISTINE_HOST_HDR, TS_CONFIG_HTTP_CHUNKING_ENABLED, TS_CONFIG_HTTP_NEGATIVE_CACHING_ENABLED,
  TS_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIME, TS_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATE, TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_IN, TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUT,
  TS_CONFIG_HTTP_KEEP_ALIVE_POST_OUT, TS_CONFIG_HTTP_SHARE_SERVER_SESSIONS, TS_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUT, TS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUT,
  TS_CONFIG_NET_SOCK_OPTION_FLAG_OUT, TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROM, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERER,
  TS_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENT, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIE, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP, TS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IP,
  TS_CONFIG_HTTP_RESPONSE_SERVER_ENABLED, TS_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FOR, TS_CONFIG_HTTP_SERVER_TCP_INIT_CWND, TS_CONFIG_HTTP_SEND_HTTP11_REQUESTS,
  TS_CONFIG_HTTP_CACHE_HTTP, TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHE, TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGE, TS_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHE,
  TS_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHE, TS_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIES, TS_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATION, TS_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMIC,
  TS_CONFIG_HTTP_CACHE_REQUIRED_HEADERS, TS_CONFIG_HTTP_INSERT_REQUEST_VIA_STR, TS_CONFIG_HTTP_INSERT_RESPONSE_VIA_STR, TS_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIME,
  TS_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIME, TS_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIME, TS_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIME, TS_CONFIG_HTTP_CACHE_MAX_STALE_AGE,
  TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_IN, TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUT, TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_IN, TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUT,
  TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUT, TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS, TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES, TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVER,
  TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIES, TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT, TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT, TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME,
  TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD, TS_CONFIG_HTTP_CACHE_FUZZ_TIME, TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME, TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS,
  TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT, TS_CONFIG_HTTP_RESPONSE_SERVER_STR, TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR, TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY,
  TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD, TS_CONFIG_NET_SOCK_PACKET_MARK_OUT, TS_CONFIG_NET_SOCK_PACKET_TOS_OUT, TS_CONFIG_LAST_ENTRY
}
enum  TSThreadPool {
  TS_THREAD_POOL_DEFAULT = -1, TS_THREAD_POOL_NET, TS_THREAD_POOL_TASK, TS_THREAD_POOL_SSL,
  TS_THREAD_POOL_DNS, TS_THREAD_POOL_REMAP, TS_THREAD_POOL_CLUSTER, TS_THREAD_POOL_UDP
}
enum  TSMilestonesType {
  TS_MILESTONE_NULL = -1, TS_MILESTONE_UA_BEGIN, TS_MILESTONE_UA_READ_HEADER_DONE, TS_MILESTONE_UA_BEGIN_WRITE,
  TS_MILESTONE_UA_CLOSE, TS_MILESTONE_SERVER_FIRST_CONNECT, TS_MILESTONE_SERVER_CONNECT, TS_MILESTONE_SERVER_CONNECT_END,
  TS_MILESTONE_SERVER_BEGIN_WRITE, TS_MILESTONE_SERVER_FIRST_READ, TS_MILESTONE_SERVER_READ_HEADER_DONE, TS_MILESTONE_SERVER_CLOSE,
  TS_MILESTONE_CACHE_OPEN_READ_BEGIN, TS_MILESTONE_CACHE_OPEN_READ_END, TS_MILESTONE_CACHE_OPEN_WRITE_BEGIN, TS_MILESTONE_CACHE_OPEN_WRITE_END,
  TS_MILESTONE_DNS_LOOKUP_BEGIN, TS_MILESTONE_DNS_LOOKUP_END, TS_MILESTONE_SM_START, TS_MILESTONE_SM_FINISH,
  TS_MILESTONE_LAST_ENTRY
}
enum  TSStatPersistence { TS_STAT_PERSISTENT = 1, TS_STAT_NON_PERSISTENT }
enum  TSStatSync { TS_STAT_SYNC_SUM = 0, TS_STAT_SYNC_COUNT, TS_STAT_SYNC_AVG, TS_STAT_SYNC_TIMEAVG }
enum  { TS_LOG_MODE_ADD_TIMESTAMP = 1, TS_LOG_MODE_DO_NOT_RENAME = 2, TS_LOG_MODE_INVALID_FLAG = 4 }
 The following enum values are flags, so they should be powers of two. More...

Functions

tsapi void TSPluginInit (int argc, const char *argv[])
 This function must be defined by all plugins.
tsapi int TSPluginLicenseRequired (void)
 This function lets Traffic Server know that a license key is required for the plugin.
tsapi void * _TSmalloc (size_t size, const char *path)
tsapi void * _TSrealloc (void *ptr, size_t size, const char *path)
tsapi char * _TSstrdup (const char *str, int64_t length, const char *path)
tsapi size_t _TSstrlcpy (char *dst, const char *str, size_t siz)
tsapi size_t _TSstrlcat (char *dst, const char *str, size_t siz)
tsapi void _TSfree (void *ptr)
tsapi TSReturnCode TSHandleMLocRelease (TSMBuffer bufp, TSMLoc parent, TSMLoc mloc)
 Releases the TSMLoc mloc created from the TSMLoc parent.
tsapi const char * TSInstallDirGet (void)
 Gets the path of the directory in which Traffic Server is installed.
tsapi const char * TSConfigDirGet (void)
 Gets the path of the directory of Traffic Server configuration.
tsapi const char * TSPluginDirGet (void)
 Gets the path of the plugin directory relative to the Traffic Server install directory.
tsapi const char * TSTrafficServerVersionGet (void)
 Gets the version of Traffic Server currently running.
int TSTrafficServerVersionGetMajor (void)
 Get the major version of Traffic Server currently running.
int TSTrafficServerVersionGetMinor (void)
 Get the minor version of Traffic Server currently running.
int TSTrafficServerVersionGetPatch (void)
 Get the patch version of Traffic Server currently running.
tsapi TSReturnCode TSPluginRegister (TSSDKVersion sdk_version, TSPluginRegistrationInfo *plugin_info)
 This function registers your plugin with a particular version of Traffic Server SDK.
tsapi TSFile TSfopen (const char *filename, const char *mode)
 Opens a file for reading or writing and returns a descriptor for accessing the file.
tsapi void TSfclose (TSFile filep)
 Closes the file to which filep points and frees the data structures and buffers associated with it.
tsapi size_t TSfread (TSFile filep, void *buf, size_t length)
 Attempts to read length bytes of data from the file pointed to by filep into the buffer buf.
tsapi size_t TSfwrite (TSFile filep, const void *buf, size_t length)
 Attempts to write length bytes of data from the buffer buf to the file filep.
tsapi void TSfflush (TSFile filep)
 Flushes pending data that has been buffered up in memory from previous calls to TSfwrite().
tsapi char * TSfgets (TSFile filep, char *buf, size_t length)
 Reads a line from the file pointed to by filep into the buffer buf.
tsapi void TSError (const char *fmt,...) TS_PRINTFLIKE(1
 Writes printf-style error messages to the Traffic Server error log.
tsapi void tsapi int _TSReleaseAssert (const char *txt, const char *f, int l)
tsapi int _TSAssert (const char *txt, const char *f, int l)
tsapi TSMBuffer TSMBufferCreate (void)
 Creates a new marshal buffer and initializes the reference count to 1.
tsapi TSReturnCode TSMBufferDestroy (TSMBuffer bufp)
 Ignores the reference count and destroys the marshal buffer bufp.
tsapi TSReturnCode TSUrlCreate (TSMBuffer bufp, TSMLoc *locp)
 Creates a new URL within the marshal buffer bufp.
tsapi TS_DEPRECATED TSReturnCode TSUrlDestroy (TSMBuffer bufp, TSMLoc offset)
 Destroys the URL located at url_loc within the marshal buffer bufp.
tsapi TSReturnCode TSUrlClone (TSMBuffer dest_bufp, TSMBuffer src_bufp, TSMLoc src_url, TSMLoc *locp)
 Copies the URL located at src_url within src_bufp to a URL location within the marshal buffer dest_bufp, and returns the TSMLoc location of the copied URL.
tsapi TSReturnCode TSUrlCopy (TSMBuffer dest_bufp, TSMLoc dest_offset, TSMBuffer src_bufp, TSMLoc src_offset)
 Copies the contents of the URL at lcoation src_loc within the marshal buffer src_bufp to the location dest_loc within the marshal buffer dest_bufp.
tsapi void TSUrlPrint (TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp)
 Formats a URL stored in an TSMBuffer into an TSIOBuffer.
tsapi TSParseResult TSUrlParse (TSMBuffer bufp, TSMLoc offset, const char **start, const char *end)
 Parses a URL.
tsapi int TSUrlLengthGet (TSMBuffer bufp, TSMLoc offset)
 Calculates the length of the URL located at url_loc within the marshal buffer bufp if it were returned as a string.
tsapi char * TSUrlStringGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Constructs a string representation of the URL located at url_loc within bufp.
tsapi const char * TSUrlSchemeGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Retrieves the scheme portion of the URL located at url_loc within the marshal buffer bufp.
tsapi TSReturnCode TSUrlSchemeSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
 Sets the scheme portion of the URL located at url_loc within the marshal buffer bufp to the string value.
tsapi const char * TSUrlUserGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Retrieves the user portion of the URL located at url_loc within bufp.
tsapi TSReturnCode TSUrlUserSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
 Sets the user portion of the URL located at url_loc within bufp to the string value.
tsapi const char * TSUrlPasswordGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Retrieves the password portion of the URL located at url_loc within bufp.
tsapi TSReturnCode TSUrlPasswordSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
 Sets the password portion of the URL located at url_loc within bufp to the string value.
tsapi const char * TSUrlHostGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Retrieves the host portion of the URL located at url_loc within bufp.
tsapi TSReturnCode TSUrlHostSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
 Sets the host portion of the URL at url_loc to the string value.
tsapi int TSUrlPortGet (TSMBuffer bufp, TSMLoc offset)
 Retrieves the port portion of the URL located at url_loc.
tsapi TSReturnCode TSUrlPortSet (TSMBuffer bufp, TSMLoc offset, int port)
 Sets the port portion of the URL located at url_loc.
tsapi const char * TSUrlPathGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Retrieves the path portion of the URL located at url_loc within bufp.
tsapi TSReturnCode TSUrlPathSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
 Sets the path portion of the URL located at url_loc within bufp to the string value.
tsapi int TSUrlFtpTypeGet (TSMBuffer bufp, TSMLoc offset)
 Retrieves the FTP type of the URL located at url_loc within bufp.
tsapi TSReturnCode TSUrlFtpTypeSet (TSMBuffer bufp, TSMLoc offset, int type)
 Sets the FTP type portion of the URL located at url_loc within bufp to the value type.
tsapi const char * TSUrlHttpParamsGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Retrieves the HTTP params portion of the URL located at url_loc within bufp.
tsapi TSReturnCode TSUrlHttpParamsSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
 Sets the HTTP params portion of the URL located at url_loc within bufp to the string value.
tsapi const char * TSUrlHttpQueryGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Retrieves the HTTP query portion of the URL located at url_loc within bufp.
tsapi TSReturnCode TSUrlHttpQuerySet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
 Sets the HTTP query portion of the URL located at url_loc within bufp to value.
tsapi const char * TSUrlHttpFragmentGet (TSMBuffer bufp, TSMLoc offset, int *length)
 Retrieves the HTTP fragment portion of the URL located at url_loc within bufp.
tsapi TSReturnCode TSUrlHttpFragmentSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
 Sets the HTTP fragment portion of the URL located at url_loc within bufp to value.
tsapi TSReturnCode TSStringPercentEncode (const char *str, int str_len, char *dst, size_t dst_size, size_t *length, const unsigned char *map)
 Perform percent-encoding of the string in the buffer, storing the new string in the destination buffer.
tsapi TSReturnCode TSUrlPercentEncode (TSMBuffer bufp, TSMLoc offset, char *dst, size_t dst_size, size_t *length, const unsigned char *map)
 Similar to TSStringPercentEncode(), but works on a URL object.
tsapi TSReturnCode TSStringPercentDecode (const char *str, size_t str_len, char *dst, size_t dst_size, size_t *length)
 Perform percent-decoding of the string in the buffer, writing to the output buffer.
tsapi TSMimeParser TSMimeParserCreate (void)
 Creates a MIME parser.
tsapi void TSMimeParserClear (TSMimeParser parser)
 Clears the specified MIME parser so that it can be used again.
tsapi void TSMimeParserDestroy (TSMimeParser parser)
 Destroys the specified MIME parser and frees the associated memory.
tsapi TSReturnCode TSMimeHdrCreate (TSMBuffer bufp, TSMLoc *locp)
 Creates a new MIME header within bufp.
tsapi TSReturnCode TSMimeHdrDestroy (TSMBuffer bufp, TSMLoc offset)
 Destroys the MIME header located at hdr_loc within bufp.
tsapi TSReturnCode TSMimeHdrClone (TSMBuffer dest_bufp, TSMBuffer src_bufp, TSMLoc src_hdr, TSMLoc *locp)
 Copies a specified MIME header to a specified marshal buffer, and returns the location of the copied MIME header within the destination marshal buffer.
tsapi TSReturnCode TSMimeHdrCopy (TSMBuffer dest_bufp, TSMLoc dest_offset, TSMBuffer src_bufp, TSMLoc src_offset)
 Copies the contents of the MIME header located at src_loc within src_bufp to the MIME header located at dest_loc within dest_bufp.
tsapi void TSMimeHdrPrint (TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp)
 Formats the MIME header located at hdr_loc within bufp into the TSIOBuffer iobufp.
tsapi TSParseResult TSMimeHdrParse (TSMimeParser parser, TSMBuffer bufp, TSMLoc offset, const char **start, const char *end)
 Parses a MIME header.
tsapi int TSMimeHdrLengthGet (TSMBuffer bufp, TSMLoc offset)
 Calculates the length of the MIME header located at hdr_loc if it were returned as a string.
tsapi TSReturnCode TSMimeHdrFieldsClear (TSMBuffer bufp, TSMLoc offset)
 Removes and destroys all the MIME fields within the MIME header located at hdr_loc within the marshal buffer bufp.
tsapi int TSMimeHdrFieldsCount (TSMBuffer bufp, TSMLoc offset)
 Returns a count of the number of MIME fields within the MIME header located at hdr_loc within the marshal buffer bufp.
tsapi TSMLoc TSMimeHdrFieldGet (TSMBuffer bufp, TSMLoc hdr, int idx)
 Retrieves the location of a specified MIME field within the MIME header located at hdr_loc within bufp.
tsapi TSMLoc TSMimeHdrFieldFind (TSMBuffer bufp, TSMLoc hdr, const char *name, int length)
 Retrieves the TSMLoc location of a specfied MIME field from within the MIME header located at hdr.
tsapi TSReturnCode TSMimeHdrFieldAppend (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
 Returns the TSMLoc location of a specified MIME field from within the MIME header located at hdr.
tsapi TSReturnCode TSMimeHdrFieldRemove (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
 Removes the MIME field located at field within bufp from the header located at hdr within bufp.
tsapi TSReturnCode TSMimeHdrFieldCreate (TSMBuffer bufp, TSMLoc hdr, TSMLoc *locp)
tsapi TSReturnCode TSMimeHdrFieldCreateNamed (TSMBuffer bufp, TSMLoc mh_mloc, const char *name, int name_len, TSMLoc *locp)
tsapi TSReturnCode TSMimeHdrFieldDestroy (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
 Destroys the MIME field located at field within bufp.
tsapi TSReturnCode TSMimeHdrFieldClone (TSMBuffer dest_bufp, TSMLoc dest_hdr, TSMBuffer src_bufp, TSMLoc src_hdr, TSMLoc src_field, TSMLoc *locp)
tsapi TSReturnCode TSMimeHdrFieldCopy (TSMBuffer dest_bufp, TSMLoc dest_hdr, TSMLoc dest_field, TSMBuffer src_bufp, TSMLoc src_hdr, TSMLoc src_field)
tsapi TSReturnCode TSMimeHdrFieldCopyValues (TSMBuffer dest_bufp, TSMLoc dest_hdr, TSMLoc dest_field, TSMBuffer src_bufp, TSMLoc src_hdr, TSMLoc src_field)
tsapi TSMLoc TSMimeHdrFieldNext (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
tsapi TSMLoc TSMimeHdrFieldNextDup (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
tsapi int TSMimeHdrFieldLengthGet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
tsapi const char * TSMimeHdrFieldNameGet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int *length)
tsapi TSReturnCode TSMimeHdrFieldNameSet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, const char *name, int length)
tsapi TSReturnCode TSMimeHdrFieldValuesClear (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
tsapi int TSMimeHdrFieldValuesCount (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
tsapi const char * TSMimeHdrFieldValueStringGet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, int *value_len_ptr)
tsapi int TSMimeHdrFieldValueIntGet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx)
tsapi int64_t TSMimeHdrFieldValueInt64Get (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx)
tsapi unsigned int TSMimeHdrFieldValueUintGet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx)
tsapi time_t TSMimeHdrFieldValueDateGet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field)
tsapi TSReturnCode TSMimeHdrFieldValueStringSet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, const char *value, int length)
tsapi TSReturnCode TSMimeHdrFieldValueIntSet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, int value)
tsapi TSReturnCode TSMimeHdrFieldValueInt64Set (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, int64_t value)
tsapi TSReturnCode TSMimeHdrFieldValueUintSet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, unsigned int value)
tsapi TSReturnCode TSMimeHdrFieldValueDateSet (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, time_t value)
tsapi TSReturnCode TSMimeHdrFieldValueAppend (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, const char *value, int length)
tsapi TSReturnCode TSMimeHdrFieldValueStringInsert (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, const char *value, int length)
tsapi TSReturnCode TSMimeHdrFieldValueIntInsert (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, int value)
tsapi TSReturnCode TSMimeHdrFieldValueUintInsert (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx, unsigned int value)
tsapi TSReturnCode TSMimeHdrFieldValueDateInsert (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, time_t value)
tsapi TSReturnCode TSMimeHdrFieldValueDelete (TSMBuffer bufp, TSMLoc hdr, TSMLoc field, int idx)
tsapi TSHttpParser TSHttpParserCreate (void)
tsapi void TSHttpParserClear (TSHttpParser parser)
tsapi void TSHttpParserDestroy (TSHttpParser parser)
tsapi TSMLoc TSHttpHdrCreate (TSMBuffer bufp)
tsapi void TSHttpHdrDestroy (TSMBuffer bufp, TSMLoc offset)
 Destroys the HTTP header located at hdr_loc within the marshal buffer bufp.
tsapi TSReturnCode TSHttpHdrClone (TSMBuffer dest_bufp, TSMBuffer src_bufp, TSMLoc src_hdr, TSMLoc *locp)
tsapi TSReturnCode TSHttpHdrCopy (TSMBuffer dest_bufp, TSMLoc dest_offset, TSMBuffer src_bufp, TSMLoc src_offset)
 Copies the contents of the HTTP header located at src_loc within src_bufp to the HTTP header located at dest_loc within dest_bufp.
tsapi void TSHttpHdrPrint (TSMBuffer bufp, TSMLoc offset, TSIOBuffer iobufp)
tsapi TSParseResult TSHttpHdrParseReq (TSHttpParser parser, TSMBuffer bufp, TSMLoc offset, const char **start, const char *end)
 Parses an HTTP request header.
tsapi TSParseResult TSHttpHdrParseResp (TSHttpParser parser, TSMBuffer bufp, TSMLoc offset, const char **start, const char *end)
tsapi int TSHttpHdrLengthGet (TSMBuffer bufp, TSMLoc offset)
tsapi TSHttpType TSHttpHdrTypeGet (TSMBuffer bufp, TSMLoc offset)
tsapi TSReturnCode TSHttpHdrTypeSet (TSMBuffer bufp, TSMLoc offset, TSHttpType type)
tsapi int TSHttpHdrVersionGet (TSMBuffer bufp, TSMLoc offset)
tsapi TSReturnCode TSHttpHdrVersionSet (TSMBuffer bufp, TSMLoc offset, int ver)
tsapi const char * TSHttpHdrMethodGet (TSMBuffer bufp, TSMLoc offset, int *length)
tsapi TSReturnCode TSHttpHdrMethodSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
tsapi TSReturnCode TSHttpHdrUrlGet (TSMBuffer bufp, TSMLoc offset, TSMLoc *locp)
tsapi TSReturnCode TSHttpHdrUrlSet (TSMBuffer bufp, TSMLoc offset, TSMLoc url)
tsapi TSHttpStatus TSHttpHdrStatusGet (TSMBuffer bufp, TSMLoc offset)
tsapi TSReturnCode TSHttpHdrStatusSet (TSMBuffer bufp, TSMLoc offset, TSHttpStatus status)
tsapi const char * TSHttpHdrReasonGet (TSMBuffer bufp, TSMLoc offset, int *length)
tsapi TSReturnCode TSHttpHdrReasonSet (TSMBuffer bufp, TSMLoc offset, const char *value, int length)
tsapi const char * TSHttpHdrReasonLookup (TSHttpStatus status)
tsapi TSThread TSThreadCreate (TSThreadFunc func, void *data)
tsapi TSThread TSThreadInit (void)
tsapi void TSThreadDestroy (TSThread thread)
tsapi TSThread TSThreadSelf (void)
tsapi TSMutex TSMutexCreate (void)
tsapi void TSMutexLock (TSMutex mutexp)
tsapi TSReturnCode TSMutexLockTry (TSMutex mutexp)
tsapi void TSMutexUnlock (TSMutex mutexp)
tsapi TSCacheKey TSCacheKeyCreate (void)
 Creates (allocates memory for) a new cache key.
tsapi TSReturnCode TSCacheKeyDigestSet (TSCacheKey key, const char *input, int length)
 Generates a key for an object to be cached (written to the cache).
tsapi TSReturnCode TSCacheKeyDigestFromUrlSet (TSCacheKey key, TSMLoc url)
tsapi TSReturnCode TSCacheKeyHostNameSet (TSCacheKey key, const char *hostname, int host_len)
 Associates a host name to the cache key.
tsapi TSReturnCode TSCacheKeyPinnedSet (TSCacheKey key, time_t pin_in_cache)
tsapi TSReturnCode TSCacheKeyDestroy (TSCacheKey key)
 Destroys a cache key.
tsapi TSReturnCode TSCacheUrlSet (TSHttpTxn txnp, const char *url, int length)
tsapi unsigned int TSConfigSet (unsigned int id, void *data, TSConfigDestroyFunc funcp)
tsapi TSConfig TSConfigGet (unsigned int id)
tsapi void TSConfigRelease (unsigned int id, TSConfig configp)
tsapi void * TSConfigDataGet (TSConfig configp)
tsapi void TSMgmtUpdateRegister (TSCont contp, const char *plugin_name)
tsapi TSReturnCode TSMgmtIntGet (const char *var_name, TSMgmtInt *result)
tsapi TSReturnCode TSMgmtCounterGet (const char *var_name, TSMgmtCounter *result)
tsapi TSReturnCode TSMgmtFloatGet (const char *var_name, TSMgmtFloat *result)
tsapi TSReturnCode TSMgmtStringGet (const char *var_name, TSMgmtString *result)
tsapi TSCont TSContCreate (TSEventFunc funcp, TSMutex mutexp)
tsapi void TSContDestroy (TSCont contp)
tsapi void TSContDataSet (TSCont contp, void *data)
tsapi void * TSContDataGet (TSCont contp)
tsapi TSAction TSContSchedule (TSCont contp, TSHRTime timeout, TSThreadPool tp)
tsapi TSAction TSContScheduleEvery (TSCont contp, TSHRTime every, TSThreadPool tp)
tsapi TSAction TSHttpSchedule (TSCont contp, TSHttpTxn txnp, TSHRTime timeout)
tsapi int TSContCall (TSCont contp, TSEvent event, void *edata)
tsapi TSMutex TSContMutexGet (TSCont contp)
tsapi void TSHttpHookAdd (TSHttpHookID id, TSCont contp)
tsapi void TSHttpSsnHookAdd (TSHttpSsn ssnp, TSHttpHookID id, TSCont contp)
tsapi void TSHttpSsnReenable (TSHttpSsn ssnp, TSEvent event)
tsapi int TSHttpSsnTransactionCount (TSHttpSsn ssnp)
tsapi void TSHttpTxnHookAdd (TSHttpTxn txnp, TSHttpHookID id, TSCont contp)
tsapi TSHttpSsn TSHttpTxnSsnGet (TSHttpTxn txnp)
tsapi TSReturnCode TSHttpTxnClientReqGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi TSReturnCode TSHttpTxnPristineUrlGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *url_loc)
tsapi TSReturnCode TSHttpTxnClientDataGet (TSHttpTxn txnp, const char **bufp, int *len)
tsapi char * TSHttpTxnEffectiveUrlStringGet (TSHttpTxn txnp, int *length)
 Get the effective URL for the transaction.
tsapi TSReturnCode TSHttpTxnClientRespGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi TSReturnCode TSHttpTxnServerReqGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi TSReturnCode TSHttpTxnServerRespGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi TSReturnCode TSHttpTxnCachedReqGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi TSReturnCode TSHttpTxnCachedRespGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi void TSHttpTxnRespCacheableSet (TSHttpTxn txnp, int flag)
tsapi void TSHttpTxnReqCacheableSet (TSHttpTxn txnp, int flag)
tsapi TSReturnCode TSFetchPageRespGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi char * TSFetchRespGet (TSHttpTxn txnp, int *length)
tsapi TSReturnCode TSHttpTxnCacheLookupStatusGet (TSHttpTxn txnp, int *lookup_status)
tsapi TSReturnCode TSHttpTxnTransformRespGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi struct sockaddr const * TSHttpTxnClientAddrGet (TSHttpTxn txnp)
 Get client address for transaction txnp.
tsapi struct sockaddr const * TSHttpTxnIncomingAddrGet (TSHttpTxn txnp)
 Get the incoming address.
tsapi struct sockaddr const * TSHttpTxnServerAddrGet (TSHttpTxn txnp)
 Get the origin server address.
tsapi TSReturnCode TSHttpTxnServerAddrSet (TSHttpTxn txnp, struct sockaddr const *addr)
 Set the origin server address.
tsapi struct sockaddr const * TSHttpTxnNextHopAddrGet (TSHttpTxn txnp)
 Get the next hop address.
tsapi TSReturnCode TSHttpTxnClientFdGet (TSHttpTxn txnp, int *fdp)
tsapi TSReturnCode TSHttpTxnOutgoingAddrSet (TSHttpTxn txnp, struct sockaddr const *addr)
tsapi TSReturnCode TSHttpTxnOutgoingTransparencySet (TSHttpTxn txnp, int flag)
tsapi struct sockaddr const * TSHttpSsnClientAddrGet (TSHttpSsn ssnp)
tsapi struct sockaddr const * TSHttpSsnIncomingAddrGet (TSHttpSsn ssnp)
tsapi TSReturnCode TSHttpSsnClientFdGet (TSHttpSsn ssnp, int *fdp)
tsapi TSReturnCode TSHttpTxnClientPacketMarkSet (TSHttpTxn txnp, int mark)
 Change packet firewall mark for the client side connection.
tsapi TSReturnCode TSHttpTxnServerPacketMarkSet (TSHttpTxn txnp, int mark)
 Change packet firewall mark for the server side connection.
tsapi TSReturnCode TSHttpTxnClientPacketTosSet (TSHttpTxn txnp, int tos)
 Change packet TOS for the client side connection.
tsapi TSReturnCode TSHttpTxnServerPacketTosSet (TSHttpTxn txnp, int tos)
 Change packet TOS for the server side connection.
tsapi void TSHttpTxnErrorBodySet (TSHttpTxn txnp, char *buf, int buflength, char *mimetype)
tsapi TSReturnCode TSHttpTxnParentProxyGet (TSHttpTxn txnp, char **hostname, int *port)
 Retrieves the parent proxy hostname and port, if parent proxying is enabled.
tsapi void TSHttpTxnParentProxySet (TSHttpTxn txnp, char *hostname, int port)
 Sets the parent proxy name and port.
tsapi void TSHttpTxnUntransformedRespCache (TSHttpTxn txnp, int on)
tsapi void TSHttpTxnTransformedRespCache (TSHttpTxn txnp, int on)
tsapi void TSHttpTxnReenable (TSHttpTxn txnp, TSEvent event)
 Notifies the HTTP transaction txnp that the plugin is finished processing the current hook.
tsapi TSReturnCode TSHttpCacheReenable (TSCacheTxn txnp, const TSEvent event, const void *data, const uint64_t size)
tsapi TSReturnCode TSHttpTxnFollowRedirect (TSHttpTxn txnp, int on)
tsapi void TSHttpTxnArgSet (TSHttpTxn txnp, int arg_idx, void *arg)
tsapi void * TSHttpTxnArgGet (TSHttpTxn txnp, int arg_idx)
tsapi void TSHttpSsnArgSet (TSHttpSsn ssnp, int arg_idx, void *arg)
tsapi void * TSHttpSsnArgGet (TSHttpSsn ssnp, int arg_idx)
tsapi TSReturnCode TSHttpArgIndexReserve (const char *name, const char *description, int *arg_idx)
tsapi TSReturnCode TSHttpArgIndexNameLookup (const char *name, int *arg_idx, const char **description)
tsapi TSReturnCode TSHttpArgIndexLookup (int arg_idx, const char **name, const char **description)
tsapi int TSHttpTxnGetMaxHttpRetBodySize (void)
tsapi void TSHttpTxnSetHttpRetBody (TSHttpTxn txnp, const char *body_msg, int plain_msg)
tsapi void TSHttpTxnSetHttpRetStatus (TSHttpTxn txnp, TSHttpStatus http_retstatus)
tsapi void TSHttpTxnActiveTimeoutSet (TSHttpTxn txnp, int timeout)
 timeout is in msec overrides as proxy.config.http.transaction_active_timeout_out
tsapi void TSHttpTxnConnectTimeoutSet (TSHttpTxn txnp, int timeout)
 timeout is in msec overrides as proxy.config.http.connect_attempts_timeout
tsapi void TSHttpTxnDNSTimeoutSet (TSHttpTxn txnp, int timeout)
 timeout is in msec overrides as proxy.config.dns.lookup_timeout
tsapi void TSHttpTxnNoActivityTimeoutSet (TSHttpTxn txnp, int timeout)
 timeout is in msec overrides as proxy.config.http.transaction_no_activity_timeout_out
tsapi TSServerState TSHttpTxnServerStateGet (TSHttpTxn txnp)
tsapi void TSHttpTxnDebugSet (TSHttpTxn txnp, int on)
 Set the transaction specific debugging flag for this transaction.
tsapi int TSHttpTxnDebugGet (TSHttpTxn txnp)
 Returns the transaction specific debugging flag for this transaction.
tsapi void TSHttpSsnDebugSet (TSHttpSsn ssnp, int on)
 Set the session specific debugging flag for this client session.
tsapi int TSHttpSsnDebugGet (TSHttpSsn ssnp, int *on)
 Returns the transaction specific debugging flag for this client session.
tsapi void TSHttpTxnIntercept (TSCont contp, TSHttpTxn txnp)
 Allows a plugin take over the servicing of the request as though it was the origin server.
tsapi void TSHttpTxnServerIntercept (TSCont contp, TSHttpTxn txnp)
 Allows a plugin take over the servicing of the request as though it was the origin server.
tsapi TSVConn TSHttpConnect (struct sockaddr const *addr)
 Allows the plugin to initiate an http connection.
tsapi TSVConn TSHttpConnectTransparent (struct sockaddr const *client_addr, struct sockaddr const *server_addr)
 Allows the plugin to initiate a transparent http connection.
tsapi void TSFetchUrl (const char *request, int request_len, struct sockaddr const *addr, TSCont contp, TSFetchWakeUpOptions callback_options, TSFetchEvent event)
tsapi void TSFetchPages (TSFetchUrlParams_t *params)
tsapi TSReturnCode TSHttpIsInternalRequest (TSHttpTxn txnp)
tsapi TSReturnCode TSHttpAltInfoClientReqGet (TSHttpAltInfo infop, TSMBuffer *bufp, TSMLoc *offset)
tsapi TSReturnCode TSHttpAltInfoCachedReqGet (TSHttpAltInfo infop, TSMBuffer *bufp, TSMLoc *offset)
tsapi TSReturnCode TSHttpAltInfoCachedRespGet (TSHttpAltInfo infop, TSMBuffer *bufp, TSMLoc *offset)
tsapi void TSHttpAltInfoQualitySet (TSHttpAltInfo infop, float quality)
tsapi void TSActionCancel (TSAction actionp)
tsapi int TSActionDone (TSAction actionp)
tsapi TSVIO TSVConnReadVIOGet (TSVConn connp)
tsapi TSVIO TSVConnWriteVIOGet (TSVConn connp)
tsapi int TSVConnClosedGet (TSVConn connp)
tsapi TSVIO TSVConnRead (TSVConn connp, TSCont contp, TSIOBuffer bufp, int64_t nbytes)
tsapi TSVIO TSVConnWrite (TSVConn connp, TSCont contp, TSIOBufferReader readerp, int64_t nbytes)
tsapi void TSVConnClose (TSVConn connp)
tsapi void TSVConnAbort (TSVConn connp, int error)
tsapi void TSVConnShutdown (TSVConn connp, int read, int write)
tsapi int64_t TSVConnCacheObjectSizeGet (TSVConn connp)
tsapi TSVConn TSTransformCreate (TSEventFunc event_funcp, TSHttpTxn txnp)
tsapi TSVConn TSTransformOutputVConnGet (TSVConn connp)
tsapi struct sockaddr const * TSNetVConnRemoteAddrGet (TSVConn vc)
tsapi TSAction TSNetConnect (TSCont contp, struct sockaddr const *to)
 Opens a network connection to the host specified by ip on the port specified by port.
tsapi TSAction TSNetAccept (TSCont contp, int port, int domain, int accept_threads)
tsapi TSReturnCode TSNetAcceptNamedProtocol (TSCont contp, const char *protocol)
 Listen on all SSL ports for connections for the specified protocol name.
tsapi TSPortDescriptor TSPortDescriptorParse (const char *descriptor)
 Create a new port from the string specification used by the proxy.config.http.server_ports configuration value.
tsapi TSReturnCode TSPortDescriptorAccept (TSPortDescriptor, TSCont)
 Start listening on the given port descriptor.
tsapi TSAction TSHostLookup (TSCont contp, const char *hostname, size_t namelen)
tsapi struct sockaddr const * TSHostLookupResultAddrGet (TSHostLookupResult lookup_result)
tsapi TSAction TSCacheRead (TSCont contp, TSCacheKey key)
 Asks the Traffic Server cache if the object corresponding to key exists in the cache and can be read.
tsapi TSAction TSCacheWrite (TSCont contp, TSCacheKey key)
 Asks the Traffic Server cache if contp can start writing the object (corresponding to key) to the cache.
tsapi TSAction TSCacheRemove (TSCont contp, TSCacheKey key)
 Removes the object corresponding to key from the cache.
tsapi TSReturnCode TSCacheReady (int *is_ready)
tsapi TSAction TSCacheScan (TSCont contp, TSCacheKey key, int KB_per_second)
tsapi void TSVIOReenable (TSVIO viop)
tsapi TSIOBuffer TSVIOBufferGet (TSVIO viop)
tsapi TSIOBufferReader TSVIOReaderGet (TSVIO viop)
tsapi int64_t TSVIONBytesGet (TSVIO viop)
tsapi void TSVIONBytesSet (TSVIO viop, int64_t nbytes)
tsapi int64_t TSVIONDoneGet (TSVIO viop)
tsapi void TSVIONDoneSet (TSVIO viop, int64_t ndone)
tsapi int64_t TSVIONTodoGet (TSVIO viop)
tsapi TSMutex TSVIOMutexGet (TSVIO viop)
tsapi TSCont TSVIOContGet (TSVIO viop)
tsapi TSVConn TSVIOVConnGet (TSVIO viop)
tsapi TSIOBuffer TSIOBufferCreate (void)
tsapi TSIOBuffer TSIOBufferSizedCreate (TSIOBufferSizeIndex index)
 Creates a new TSIOBuffer of the specified size.
tsapi int64_t TSIOBufferWaterMarkGet (TSIOBuffer bufp)
 The watermark of an TSIOBuffer is the minimum number of bytes of data that have to be in the buffer before calling back any continuation that has initiated a read operation on this buffer.
tsapi void TSIOBufferWaterMarkSet (TSIOBuffer bufp, int64_t water_mark)
 The watermark of an TSIOBuffer is the minimum number of bytes of data that have to be in the buffer before calling back any continuation that has initiated a read operation on this buffer.
tsapi void TSIOBufferDestroy (TSIOBuffer bufp)
tsapi TSIOBufferBlock TSIOBufferStart (TSIOBuffer bufp)
tsapi int64_t TSIOBufferCopy (TSIOBuffer bufp, TSIOBufferReader readerp, int64_t length, int64_t offset)
tsapi int64_t TSIOBufferWrite (TSIOBuffer bufp, const void *buf, int64_t length)
 Writes length bytes of data contained in the string buf to the TSIOBuffer bufp.
tsapi void TSIOBufferProduce (TSIOBuffer bufp, int64_t nbytes)
tsapi TSIOBufferBlock TSIOBufferBlockNext (TSIOBufferBlock blockp)
tsapi const char * TSIOBufferBlockReadStart (TSIOBufferBlock blockp, TSIOBufferReader readerp, int64_t *avail)
tsapi int64_t TSIOBufferBlockReadAvail (TSIOBufferBlock blockp, TSIOBufferReader readerp)
tsapi char * TSIOBufferBlockWriteStart (TSIOBufferBlock blockp, int64_t *avail)
tsapi int64_t TSIOBufferBlockWriteAvail (TSIOBufferBlock blockp)
tsapi TSIOBufferReader TSIOBufferReaderAlloc (TSIOBuffer bufp)
tsapi TSIOBufferReader TSIOBufferReaderClone (TSIOBufferReader readerp)
tsapi void TSIOBufferReaderFree (TSIOBufferReader readerp)
tsapi TSIOBufferBlock TSIOBufferReaderStart (TSIOBufferReader readerp)
tsapi void TSIOBufferReaderConsume (TSIOBufferReader readerp, int64_t nbytes)
tsapi int64_t TSIOBufferReaderAvail (TSIOBufferReader readerp)
tsapi struct sockaddr const * TSNetVConnLocalAddrGet (TSVConn vc)
tsapi TSReturnCode TSMgmtStringCreate (TSRecordType rec_type, const char *name, const TSMgmtString data_default, TSRecordUpdateType update_type, TSRecordCheckType check_type, const char *check_regex, TSRecordAccessType access_type)
tsapi TSReturnCode TSMgmtIntCreate (TSRecordType rec_type, const char *name, TSMgmtInt data_default, TSRecordUpdateType update_type, TSRecordCheckType check_type, const char *check_regex, TSRecordAccessType access_type)
tsapi int TSStatCreate (const char *the_name, TSRecordDataType the_type, TSStatPersistence persist, TSStatSync sync)
tsapi void TSStatIntIncrement (int the_stat, TSMgmtInt amount)
tsapi void TSStatIntDecrement (int the_stat, TSMgmtInt amount)
tsapi TSMgmtInt TSStatIntGet (int the_stat)
tsapi void TSStatIntSet (int the_stat, TSMgmtInt value)
tsapi TSReturnCode TSStatFindName (const char *name, int *idp)
tsapi int TSIsDebugTagSet (const char *t)
tsapi void TSDebug (const char *tag, const char *format_str,...) TS_PRINTFLIKE(2
tsapi void tsapi void TSDebugSpecific (int debug_flag, const char *tag, const char *format_str,...) TS_PRINTFLIKE(3
 Output a debug line even if the debug tag is turned off, as long as debugging is enabled.
tsapi void TSRecordDump (TSRecordType rec_type, TSRecordDumpCb callback, void *edata)
tsapi TSReturnCode TSTextLogObjectCreate (const char *filename, int mode, TSTextLogObject *new_log_obj)
 Creates a new custom log file that your plugin can write to.
tsapi TSReturnCode TSTextLogObjectWrite (TSTextLogObject the_object, char *format,...) TS_PRINTFLIKE(2
 Writes a printf-style formatted statement to an TSTextLogObject (a plugin custom log).
tsapi TSReturnCode tsapi void TSTextLogObjectFlush (TSTextLogObject the_object)
 This immediately flushes the contents of the log write buffer for the_object to disk.
tsapi TSReturnCode TSTextLogObjectDestroy (TSTextLogObject the_object)
 Destroys a log object and releases the memory allocated to it.
tsapi void TSTextLogObjectHeaderSet (TSTextLogObject the_object, const char *header)
 Set log header.
tsapi void TSTextLogObjectRollingEnabledSet (TSTextLogObject the_object, int rolling_enabled)
 Enable/disable rolling.
tsapi void TSTextLogObjectRollingIntervalSecSet (TSTextLogObject the_object, int rolling_interval_sec)
 Set the rolling interval.
tsapi void TSTextLogObjectRollingOffsetHrSet (TSTextLogObject the_object, int rolling_offset_hr)
 Set the rolling offset.
tsapi TSReturnCode TSAIORead (int fd, off_t offset, char *buf, size_t buffSize, TSCont contp)
 Async disk IO read.
tsapi char * TSAIOBufGet (TSAIOCallback data)
 Async disk IO buffer get.
tsapi int TSAIONBytesGet (TSAIOCallback data)
 Async disk IO get number of bytes.
tsapi TSReturnCode TSAIOWrite (int fd, off_t offset, char *buf, size_t bufSize, TSCont contp)
 Async disk IO write.
tsapi TSReturnCode TSAIOThreadNumSet (int thread_num)
 Async disk IO set number of threads.
tsapi TSReturnCode TSHttpTxnAborted (TSHttpTxn txnp)
 Check if transaction was aborted (due client/server errors etc.)
tsapi TSVConn TSVConnCreate (TSEventFunc event_funcp, TSMutex mutexp)
tsapi int TSHttpTxnClientReqHdrBytesGet (TSHttpTxn txnp)
tsapi int64_t TSHttpTxnClientReqBodyBytesGet (TSHttpTxn txnp)
tsapi int TSHttpTxnServerReqHdrBytesGet (TSHttpTxn txnp)
tsapi int64_t TSHttpTxnServerReqBodyBytesGet (TSHttpTxn txnp)
tsapi int TSHttpTxnPushedRespHdrBytesGet (TSHttpTxn txnp)
tsapi int64_t TSHttpTxnPushedRespBodyBytesGet (TSHttpTxn txnp)
tsapi int TSHttpTxnServerRespHdrBytesGet (TSHttpTxn txnp)
tsapi int64_t TSHttpTxnServerRespBodyBytesGet (TSHttpTxn txnp)
tsapi int TSHttpTxnClientRespHdrBytesGet (TSHttpTxn txnp)
tsapi int64_t TSHttpTxnClientRespBodyBytesGet (TSHttpTxn txnp)
tsapi void TSVConnInactivityTimeoutSet (TSVConn connp, TSHRTime timeout)
tsapi void TSVConnInactivityTimeoutCancel (TSVConn connp)
tsapi void TSVConnActiveTimeoutSet (TSVConn connp, TSHRTime timeout)
tsapi void TSVConnActiveTimeoutCancel (TSVConn connp)
tsapi void TSSkipRemappingSet (TSHttpTxn txnp, int flag)
tsapi TSReturnCode TSHttpTxnConfigIntSet (TSHttpTxn txnp, TSOverridableConfigKey conf, TSMgmtInt value)
tsapi TSReturnCode TSHttpTxnConfigIntGet (TSHttpTxn txnp, TSOverridableConfigKey conf, TSMgmtInt *value)
tsapi TSReturnCode TSHttpTxnConfigFloatSet (TSHttpTxn txnp, TSOverridableConfigKey conf, TSMgmtFloat value)
tsapi TSReturnCode TSHttpTxnConfigFloatGet (TSHttpTxn txnp, TSOverridableConfigKey conf, TSMgmtFloat *value)
tsapi TSReturnCode TSHttpTxnConfigStringSet (TSHttpTxn txnp, TSOverridableConfigKey conf, const char *value, int length)
tsapi TSReturnCode TSHttpTxnConfigStringGet (TSHttpTxn txnp, TSOverridableConfigKey conf, const char **value, int *length)
tsapi TSReturnCode TSHttpTxnConfigFind (const char *name, int length, TSOverridableConfigKey *conf, TSRecordDataType *type)
tsapi void TSRedirectUrlSet (TSHttpTxn txnp, const char *url, const int url_len)
tsapi const char * TSRedirectUrlGet (TSHttpTxn txnp, int *url_len_ptr)
tsapi int TSHttpCurrentClientConnectionsGet (void)
tsapi int TSHttpCurrentActiveClientConnectionsGet (void)
tsapi int TSHttpCurrentIdleClientConnectionsGet (void)
tsapi int TSHttpCurrentCacheConnectionsGet (void)
tsapi int TSHttpCurrentServerConnectionsGet (void)
tsapi TSReturnCode TSHttpTxnCachedRespModifiableGet (TSHttpTxn txnp, TSMBuffer *bufp, TSMLoc *offset)
tsapi TSReturnCode TSHttpTxnCacheLookupStatusSet (TSHttpTxn txnp, int cachelookup)
tsapi TSReturnCode TSHttpTxnCacheLookupUrlGet (TSHttpTxn txnp, TSMBuffer bufp, TSMLoc obj)
tsapi TSReturnCode TSHttpTxnCachedUrlSet (TSHttpTxn txnp, TSMBuffer bufp, TSMLoc obj)
tsapi TSReturnCode TSHttpTxnPrivateSessionSet (TSHttpTxn txnp, int private_session)
tsapi int TSHttpTxnBackgroundFillStarted (TSHttpTxn txnp)
tsapi TSReturnCode TSBase64Decode (const char *str, size_t str_len, unsigned char *dst, size_t dst_size, size_t *length)
tsapi TSReturnCode TSBase64Encode (const char *str, size_t str_len, char *dst, size_t dst_size, size_t *length)
tsapi TSReturnCode TSHttpTxnMilestoneGet (TSHttpTxn txnp, TSMilestonesType milestone, TSHRTime *time)
 Return the particular milestone timer for the transaction.

Variables

tsapi const char * TS_URL_SCHEME_FILE
tsapi const char * TS_URL_SCHEME_FTP
tsapi const char * TS_URL_SCHEME_GOPHER
tsapi const char * TS_URL_SCHEME_HTTP
tsapi const char * TS_URL_SCHEME_HTTPS
tsapi const char * TS_URL_SCHEME_MAILTO
tsapi const char * TS_URL_SCHEME_NEWS
tsapi const char * TS_URL_SCHEME_NNTP
tsapi const char * TS_URL_SCHEME_PROSPERO
tsapi const char * TS_URL_SCHEME_TELNET
tsapi const char * TS_URL_SCHEME_TUNNEL
tsapi const char * TS_URL_SCHEME_WAIS
tsapi const char * TS_URL_SCHEME_PNM
tsapi const char * TS_URL_SCHEME_RTSP
tsapi const char * TS_URL_SCHEME_RTSPU
tsapi const char * TS_URL_SCHEME_MMS
tsapi const char * TS_URL_SCHEME_MMSU
tsapi const char * TS_URL_SCHEME_MMST
tsapi int TS_URL_LEN_FILE
tsapi int TS_URL_LEN_FTP
tsapi int TS_URL_LEN_GOPHER
tsapi int TS_URL_LEN_HTTP
tsapi int TS_URL_LEN_HTTPS
tsapi int TS_URL_LEN_MAILTO
tsapi int TS_URL_LEN_NEWS
tsapi int TS_URL_LEN_NNTP
tsapi int TS_URL_LEN_PROSPERO
tsapi int TS_URL_LEN_TELNET
tsapi int TS_URL_LEN_WAIS
tsapi const char * TS_MIME_FIELD_ACCEPT
tsapi const char * TS_MIME_FIELD_ACCEPT_CHARSET
tsapi const char * TS_MIME_FIELD_ACCEPT_ENCODING
tsapi const char * TS_MIME_FIELD_ACCEPT_LANGUAGE
tsapi const char * TS_MIME_FIELD_ACCEPT_RANGES
tsapi const char * TS_MIME_FIELD_AGE
tsapi const char * TS_MIME_FIELD_ALLOW
tsapi const char * TS_MIME_FIELD_APPROVED
tsapi const char * TS_MIME_FIELD_AUTHORIZATION
tsapi const char * TS_MIME_FIELD_BYTES
tsapi const char * TS_MIME_FIELD_CACHE_CONTROL
tsapi const char * TS_MIME_FIELD_CLIENT_IP
tsapi const char * TS_MIME_FIELD_CONNECTION
tsapi const char * TS_MIME_FIELD_CONTENT_BASE
tsapi const char * TS_MIME_FIELD_CONTENT_ENCODING
tsapi const char * TS_MIME_FIELD_CONTENT_LANGUAGE
tsapi const char * TS_MIME_FIELD_CONTENT_LENGTH
tsapi const char * TS_MIME_FIELD_CONTENT_LOCATION
tsapi const char * TS_MIME_FIELD_CONTENT_MD5
tsapi const char * TS_MIME_FIELD_CONTENT_RANGE
tsapi const char * TS_MIME_FIELD_CONTENT_TYPE
tsapi const char * TS_MIME_FIELD_CONTROL
tsapi const char * TS_MIME_FIELD_COOKIE
tsapi const char * TS_MIME_FIELD_DATE
tsapi const char * TS_MIME_FIELD_DISTRIBUTION
tsapi const char * TS_MIME_FIELD_ETAG
tsapi const char * TS_MIME_FIELD_EXPECT
tsapi const char * TS_MIME_FIELD_EXPIRES
tsapi const char * TS_MIME_FIELD_FOLLOWUP_TO
tsapi const char * TS_MIME_FIELD_FROM
tsapi const char * TS_MIME_FIELD_HOST
tsapi const char * TS_MIME_FIELD_IF_MATCH
tsapi const char * TS_MIME_FIELD_IF_MODIFIED_SINCE
tsapi const char * TS_MIME_FIELD_IF_NONE_MATCH
tsapi const char * TS_MIME_FIELD_IF_RANGE
tsapi const char * TS_MIME_FIELD_IF_UNMODIFIED_SINCE
tsapi const char * TS_MIME_FIELD_KEEP_ALIVE
tsapi const char * TS_MIME_FIELD_KEYWORDS
tsapi const char * TS_MIME_FIELD_LAST_MODIFIED
tsapi const char * TS_MIME_FIELD_LINES
tsapi const char * TS_MIME_FIELD_LOCATION
tsapi const char * TS_MIME_FIELD_MAX_FORWARDS
tsapi const char * TS_MIME_FIELD_MESSAGE_ID
tsapi const char * TS_MIME_FIELD_NEWSGROUPS
tsapi const char * TS_MIME_FIELD_ORGANIZATION
tsapi const char * TS_MIME_FIELD_PATH
tsapi const char * TS_MIME_FIELD_PRAGMA
tsapi const char * TS_MIME_FIELD_PROXY_AUTHENTICATE
tsapi const char * TS_MIME_FIELD_PROXY_AUTHORIZATION
tsapi const char * TS_MIME_FIELD_PROXY_CONNECTION
tsapi const char * TS_MIME_FIELD_PUBLIC
tsapi const char * TS_MIME_FIELD_RANGE
tsapi const char * TS_MIME_FIELD_REFERENCES
tsapi const char * TS_MIME_FIELD_REFERER
tsapi const char * TS_MIME_FIELD_REPLY_TO
tsapi const char * TS_MIME_FIELD_RETRY_AFTER
tsapi const char * TS_MIME_FIELD_SENDER
tsapi const char * TS_MIME_FIELD_SERVER
tsapi const char * TS_MIME_FIELD_SET_COOKIE
tsapi const char * TS_MIME_FIELD_SUBJECT
tsapi const char * TS_MIME_FIELD_SUMMARY
tsapi const char * TS_MIME_FIELD_TE
tsapi const char * TS_MIME_FIELD_TRANSFER_ENCODING
tsapi const char * TS_MIME_FIELD_UPGRADE
tsapi const char * TS_MIME_FIELD_USER_AGENT
tsapi const char * TS_MIME_FIELD_VARY
tsapi const char * TS_MIME_FIELD_VIA
tsapi const char * TS_MIME_FIELD_WARNING
tsapi const char * TS_MIME_FIELD_WWW_AUTHENTICATE
tsapi const char * TS_MIME_FIELD_XREF
tsapi const char * TS_MIME_FIELD_X_FORWARDED_FOR
tsapi int TS_MIME_LEN_ACCEPT
tsapi int TS_MIME_LEN_ACCEPT_CHARSET
tsapi int TS_MIME_LEN_ACCEPT_ENCODING
tsapi int TS_MIME_LEN_ACCEPT_LANGUAGE
tsapi int TS_MIME_LEN_ACCEPT_RANGES
tsapi int TS_MIME_LEN_AGE
tsapi int TS_MIME_LEN_ALLOW
tsapi int TS_MIME_LEN_APPROVED
tsapi int TS_MIME_LEN_AUTHORIZATION
tsapi int TS_MIME_LEN_BYTES
tsapi int TS_MIME_LEN_CACHE_CONTROL
tsapi int TS_MIME_LEN_CLIENT_IP
tsapi int TS_MIME_LEN_CONNECTION
tsapi int TS_MIME_LEN_CONTENT_BASE
tsapi int TS_MIME_LEN_CONTENT_ENCODING
tsapi int TS_MIME_LEN_CONTENT_LANGUAGE
tsapi int TS_MIME_LEN_CONTENT_LENGTH
tsapi int TS_MIME_LEN_CONTENT_LOCATION
tsapi int TS_MIME_LEN_CONTENT_MD5
tsapi int TS_MIME_LEN_CONTENT_RANGE
tsapi int TS_MIME_LEN_CONTENT_TYPE
tsapi int TS_MIME_LEN_CONTROL
tsapi int TS_MIME_LEN_COOKIE
tsapi int TS_MIME_LEN_DATE
tsapi int TS_MIME_LEN_DISTRIBUTION
tsapi int TS_MIME_LEN_ETAG
tsapi int TS_MIME_LEN_EXPECT
tsapi int TS_MIME_LEN_EXPIRES
tsapi int TS_MIME_LEN_FOLLOWUP_TO
tsapi int TS_MIME_LEN_FROM
tsapi int TS_MIME_LEN_HOST
tsapi int TS_MIME_LEN_IF_MATCH
tsapi int TS_MIME_LEN_IF_MODIFIED_SINCE
tsapi int TS_MIME_LEN_IF_NONE_MATCH
tsapi int TS_MIME_LEN_IF_RANGE
tsapi int TS_MIME_LEN_IF_UNMODIFIED_SINCE
tsapi int TS_MIME_LEN_KEEP_ALIVE
tsapi int TS_MIME_LEN_KEYWORDS
tsapi int TS_MIME_LEN_LAST_MODIFIED
tsapi int TS_MIME_LEN_LINES
tsapi int TS_MIME_LEN_LOCATION
tsapi int TS_MIME_LEN_MAX_FORWARDS
tsapi int TS_MIME_LEN_MESSAGE_ID
tsapi int TS_MIME_LEN_NEWSGROUPS
tsapi int TS_MIME_LEN_ORGANIZATION
tsapi int TS_MIME_LEN_PATH
tsapi int TS_MIME_LEN_PRAGMA
tsapi int TS_MIME_LEN_PROXY_AUTHENTICATE
tsapi int TS_MIME_LEN_PROXY_AUTHORIZATION
tsapi int TS_MIME_LEN_PROXY_CONNECTION
tsapi int TS_MIME_LEN_PUBLIC
tsapi int TS_MIME_LEN_RANGE
tsapi int TS_MIME_LEN_REFERENCES
tsapi int TS_MIME_LEN_REFERER
tsapi int TS_MIME_LEN_REPLY_TO
tsapi int TS_MIME_LEN_RETRY_AFTER
tsapi int TS_MIME_LEN_SENDER
tsapi int TS_MIME_LEN_SERVER
tsapi int TS_MIME_LEN_SET_COOKIE
tsapi int TS_MIME_LEN_SUBJECT
tsapi int TS_MIME_LEN_SUMMARY
tsapi int TS_MIME_LEN_TE
tsapi int TS_MIME_LEN_TRANSFER_ENCODING
tsapi int TS_MIME_LEN_UPGRADE
tsapi int TS_MIME_LEN_USER_AGENT
tsapi int TS_MIME_LEN_VARY
tsapi int TS_MIME_LEN_VIA
tsapi int TS_MIME_LEN_WARNING
tsapi int TS_MIME_LEN_WWW_AUTHENTICATE
tsapi int TS_MIME_LEN_XREF
tsapi int TS_MIME_LEN_X_FORWARDED_FOR
tsapi const char * TS_HTTP_VALUE_BYTES
tsapi const char * TS_HTTP_VALUE_CHUNKED
tsapi const char * TS_HTTP_VALUE_CLOSE
tsapi const char * TS_HTTP_VALUE_COMPRESS
tsapi const char * TS_HTTP_VALUE_DEFLATE
tsapi const char * TS_HTTP_VALUE_GZIP
tsapi const char * TS_HTTP_VALUE_IDENTITY
tsapi const char * TS_HTTP_VALUE_KEEP_ALIVE
tsapi const char * TS_HTTP_VALUE_MAX_AGE
tsapi const char * TS_HTTP_VALUE_MAX_STALE
tsapi const char * TS_HTTP_VALUE_MIN_FRESH
tsapi const char * TS_HTTP_VALUE_MUST_REVALIDATE
tsapi const char * TS_HTTP_VALUE_NONE
tsapi const char * TS_HTTP_VALUE_NO_CACHE
tsapi const char * TS_HTTP_VALUE_NO_STORE
tsapi const char * TS_HTTP_VALUE_NO_TRANSFORM
tsapi const char * TS_HTTP_VALUE_ONLY_IF_CACHED
tsapi const char * TS_HTTP_VALUE_PRIVATE
tsapi const char * TS_HTTP_VALUE_PROXY_REVALIDATE
tsapi const char * TS_HTTP_VALUE_PUBLIC
tsapi int TS_HTTP_LEN_BYTES
tsapi int TS_HTTP_LEN_CHUNKED
tsapi int TS_HTTP_LEN_CLOSE
tsapi int TS_HTTP_LEN_COMPRESS
tsapi int TS_HTTP_LEN_DEFLATE
tsapi int TS_HTTP_LEN_GZIP
tsapi int TS_HTTP_LEN_IDENTITY
tsapi int TS_HTTP_LEN_KEEP_ALIVE
tsapi int TS_HTTP_LEN_MAX_AGE
tsapi int TS_HTTP_LEN_MAX_STALE
tsapi int TS_HTTP_LEN_MIN_FRESH
tsapi int TS_HTTP_LEN_MUST_REVALIDATE
tsapi int TS_HTTP_LEN_NONE
tsapi int TS_HTTP_LEN_NO_CACHE
tsapi int TS_HTTP_LEN_NO_STORE
tsapi int TS_HTTP_LEN_NO_TRANSFORM
tsapi int TS_HTTP_LEN_ONLY_IF_CACHED
tsapi int TS_HTTP_LEN_PRIVATE
tsapi int TS_HTTP_LEN_PROXY_REVALIDATE
tsapi int TS_HTTP_LEN_PUBLIC
tsapi const char * TS_HTTP_METHOD_CONNECT
tsapi const char * TS_HTTP_METHOD_DELETE
tsapi const char * TS_HTTP_METHOD_GET
tsapi const char * TS_HTTP_METHOD_HEAD
tsapi const char * TS_HTTP_METHOD_ICP_QUERY
tsapi const char * TS_HTTP_METHOD_OPTIONS
tsapi const char * TS_HTTP_METHOD_POST
tsapi const char * TS_HTTP_METHOD_PURGE
tsapi const char * TS_HTTP_METHOD_PUT
tsapi const char * TS_HTTP_METHOD_TRACE
tsapi int TS_HTTP_LEN_CONNECT
tsapi int TS_HTTP_LEN_DELETE
tsapi int TS_HTTP_LEN_GET
tsapi int TS_HTTP_LEN_HEAD
tsapi int TS_HTTP_LEN_ICP_QUERY
tsapi int TS_HTTP_LEN_OPTIONS
tsapi int TS_HTTP_LEN_POST
tsapi int TS_HTTP_LEN_PURGE
tsapi int TS_HTTP_LEN_PUT
tsapi int TS_HTTP_LEN_TRACE
tsapi const char * TS_NPN_PROTOCOL_HTTP_1_0
tsapi const char * TS_NPN_PROTOCOL_HTTP_1_1
tsapi const char * TS_NPN_PROTOCOL_SPDY_1
tsapi const char * TS_NPN_PROTOCOL_SPDY_2
tsapi const char * TS_NPN_PROTOCOL_SPDY_3
tsapi const TSMLoc TS_NULL_MLOC
 Use TS_NULL_MLOC as the parent in calls that require a parent when an TSMLoc does not have a parent TSMLoc.
tsapi void tsapi void int diags_on_for_plugins

Detailed Description

Traffic Server SDK API header file.

License

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.

Developers

Developers, when adding a new element to an enum, append it. DO NOT insert it. Otherwise, binary compatibility of plugins will be broken!


Define Documentation

#define __TS_RES_PATH (   x)    #x
#define _TS_RES_PATH (   x)    __TS_RES_PATH (x)
#define TS_DEPRECATED
#define TS_EVENT_HTTP_READ_REQUEST_PRE_REMAP   TS_EVENT_HTTP_PRE_REMAP
#define TS_HTTP_MAJOR (   v)    (((v) >> 16) & 0xFFFF)

Referenced by SDK_API_TSHttpHdr().

#define TS_HTTP_MINOR (   v)    ((v) & 0xFFFF)

Referenced by SDK_API_TSHttpHdr().

#define TS_HTTP_READ_REQUEST_PRE_REMAP_HOOK   TS_HTTP_PRE_REMAP_HOOK
#define TS_HTTP_VERSION (   a,
 
)    ((((a) & 0xFFFF) << 16) | ((b) & 0xFFFF))

Referenced by SDK_API_TSHttpHdr().

#define TS_MAX_USER_NAME_LEN   256
#define TS_PRINTFLIKE (   fmt,
  arg 
)
#define TS_RES_MEM_PATH   TS_RES_PATH ("memory/")
#define TS_RES_PATH (   x)    x __FILE__ ":" _TS_RES_PATH (__LINE__)
#define TS_VERSION_MAJOR   3
#define TS_VERSION_MICRO   0
#define TS_VERSION_MINOR   3
#define TS_VERSION_NUMBER   3003000
#define TS_VERSION_STRING   "3.3.0-dev"
#define tsapi
#define TSAssert (   EX)    (void)((EX) || (_TSAssert(#EX, __FILE__, __LINE__)))
#define TSDEBUG   if (diags_on_for_plugins) TSDebug
#define TSfree (   p)    _TSfree (p)
#define TSmalloc (   s)    _TSmalloc ((s), TS_RES_MEM_PATH)
#define TSrealloc (   p,
 
)    _TSrealloc ((p), (s), TS_RES_MEM_PATH)
#define TSReleaseAssert (   EX)    (void)((EX) || (_TSReleaseAssert(#EX, __FILE__, __LINE__)))

Referenced by cache_handler(), and cont_test_handler().

#define TSstrdup (   p)    _TSstrdup ((p), -1, TS_RES_MEM_PATH)

Referenced by SDK_API_TSTextLog(), and ssn_handler().

#define TSstrlcat (   d,
  s,
 
)    _TSstrlcat ((d), (s), (l))
#define TSstrlcpy (   d,
  s,
 
)    _TSstrlcpy ((d), (s), (l))
#define TSstrndup (   p,
 
)    _TSstrdup ((p), (n), TS_RES_MEM_PATH)

Typedef Documentation

typedef struct tsapi_action* TSAction
typedef struct tsapi_aiocallback* TSAIOCallback
typedef struct tsapi_cachehttpinfo* TSCacheHttpInfo
typedef struct tsapi_cachekey* TSCacheKey
typedef struct tsapi_cachetxn* TSCacheTxn
typedef struct tsapi_config* TSConfig
typedef void(* TSConfigDestroyFunc)(void *data)
typedef struct tsapi_cont* TSCont
typedef int(* TSEventFunc)(TSCont contp, TSEvent event, void *edata)
typedef struct tsapi_file* TSFile
typedef struct tsapi_hostlookupresult* TSHostLookupResult
typedef int64_t TSHRTime
typedef struct tsapi_httpaltinfo* TSHttpAltInfo
typedef struct tsapi_httpparser* TSHttpParser
typedef struct tsapi_httpssn* TSHttpSsn
typedef struct tsapi_httptxn* TSHttpTxn
typedef struct tsapi_iobuffer* TSIOBuffer
typedef struct tsapi_bufferblock* TSIOBufferBlock
typedef struct tsapi_iobufferdata* TSIOBufferData
typedef struct tsapi_bufferreader* TSIOBufferReader
typedef struct tsapi_mbuffer* TSMBuffer
typedef int64_t TSMgmtCounter
typedef float TSMgmtFloat
typedef int64_t TSMgmtInt
typedef char* TSMgmtString
typedef struct tsapi_mimeparser* TSMimeParser
typedef struct tsapi_mloc* TSMLoc
typedef struct tsapi_mutex* TSMutex
typedef struct tsapi_port* TSPortDescriptor
typedef void(* TSRecordDumpCb)(TSRecordType rec_type, void *edata, int registered, const char *name, TSRecordDataType data_type, TSRecordData *datum)
typedef struct tsapi_textlogobject* TSTextLogObject

This type represents a custom log file that you create with TSTextLogObjectCreate().

Your plugin writes entries into this log file using TSTextLogObjectWrite().

typedef struct tsapi_thread* TSThread
typedef void*(* TSThreadFunc)(void *data)
typedef struct tsapi_cont* TSVConn
typedef struct tsapi_vio* TSVIO

Enumeration Type Documentation

anonymous enum

The following enum values are flags, so they should be powers of two.

With the exception of TS_LOG_MODE_INVALID_FLAG, they are all used to configure the creation of an TSTextLogObject through the mode argument to TSTextLogObjectCreate(). TS_LOG_MODE_INVALID_FLAG is used internally to check the validity of this argument. Insert new flags before TS_LOG_MODE_INVALID_FLAG, and set TS_LOG_MODE_INVALID_FLAG to the largest power of two of the enum.

Enumerator:
TS_LOG_MODE_ADD_TIMESTAMP 
TS_LOG_MODE_DO_NOT_RENAME 
TS_LOG_MODE_INVALID_FLAG 
Enumerator:
TS_CACHE_DATA_TYPE_NONE 
TS_CACHE_DATA_TYPE_HTTP 
TS_CACHE_DATA_TYPE_OTHER 
Enumerator:
TS_CACHE_ERROR_NO_DOC 
TS_CACHE_ERROR_DOC_BUSY 
TS_CACHE_ERROR_NOT_READY 
Enumerator:
TS_CACHE_LOOKUP_MISS 
TS_CACHE_LOOKUP_HIT_STALE 
TS_CACHE_LOOKUP_HIT_FRESH 
TS_CACHE_LOOKUP_SKIPPED 
Enumerator:
TS_CACHE_SCAN_RESULT_DONE 
TS_CACHE_SCAN_RESULT_CONTINUE 
TS_CACHE_SCAN_RESULT_DELETE 
TS_CACHE_SCAN_RESULT_DELETE_ALL_ALTERNATES 
TS_CACHE_SCAN_RESULT_UPDATE 
TS_CACHE_SCAN_RESULT_RETRY 
enum TSEvent

TSEvents are sent to continuations when they are called back.

The TSEvent provides the continuation's handler function with information about the callback. Based on the event it receives, the handler function can decide what to do.

Enumerator:
TS_EVENT_NONE 
TS_EVENT_IMMEDIATE 
TS_EVENT_TIMEOUT 
TS_EVENT_ERROR 
TS_EVENT_CONTINUE 
TS_EVENT_VCONN_READ_READY 
TS_EVENT_VCONN_WRITE_READY 
TS_EVENT_VCONN_READ_COMPLETE 
TS_EVENT_VCONN_WRITE_COMPLETE 
TS_EVENT_VCONN_EOS 
TS_EVENT_VCONN_INACTIVITY_TIMEOUT 
TS_EVENT_NET_CONNECT 
TS_EVENT_NET_CONNECT_FAILED 
TS_EVENT_NET_ACCEPT 
TS_EVENT_NET_ACCEPT_FAILED 
TS_EVENT_INTERNAL_206 
TS_EVENT_INTERNAL_207 
TS_EVENT_INTERNAL_208 
TS_EVENT_INTERNAL_209 
TS_EVENT_INTERNAL_210 
TS_EVENT_INTERNAL_211 
TS_EVENT_INTERNAL_212 
TS_EVENT_HOST_LOOKUP 
TS_EVENT_CACHE_OPEN_READ 
TS_EVENT_CACHE_OPEN_READ_FAILED 
TS_EVENT_CACHE_OPEN_WRITE 
TS_EVENT_CACHE_OPEN_WRITE_FAILED 
TS_EVENT_CACHE_REMOVE 
TS_EVENT_CACHE_REMOVE_FAILED 
TS_EVENT_CACHE_SCAN 
TS_EVENT_CACHE_SCAN_FAILED 
TS_EVENT_CACHE_SCAN_OBJECT 
TS_EVENT_CACHE_SCAN_OPERATION_BLOCKED 
TS_EVENT_CACHE_SCAN_OPERATION_FAILED 
TS_EVENT_CACHE_SCAN_DONE 
TS_EVENT_CACHE_LOOKUP 
TS_EVENT_CACHE_READ 
TS_EVENT_CACHE_DELETE 
TS_EVENT_CACHE_WRITE 
TS_EVENT_CACHE_WRITE_HEADER 
TS_EVENT_CACHE_CLOSE 
TS_EVENT_CACHE_LOOKUP_READY 
TS_EVENT_CACHE_LOOKUP_COMPLETE 
TS_EVENT_CACHE_READ_READY 
TS_EVENT_CACHE_READ_COMPLETE 
TS_EVENT_INTERNAL_1200 
TS_AIO_EVENT_DONE 
TS_EVENT_HTTP_CONTINUE 
TS_EVENT_HTTP_ERROR 
TS_EVENT_HTTP_READ_REQUEST_HDR 
TS_EVENT_HTTP_OS_DNS 
TS_EVENT_HTTP_SEND_REQUEST_HDR 
TS_EVENT_HTTP_READ_CACHE_HDR 
TS_EVENT_HTTP_READ_RESPONSE_HDR 
TS_EVENT_HTTP_SEND_RESPONSE_HDR 
TS_EVENT_HTTP_REQUEST_TRANSFORM 
TS_EVENT_HTTP_RESPONSE_TRANSFORM 
TS_EVENT_HTTP_SELECT_ALT 
TS_EVENT_HTTP_TXN_START 
TS_EVENT_HTTP_TXN_CLOSE 
TS_EVENT_HTTP_SSN_START 
TS_EVENT_HTTP_SSN_CLOSE 
TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE 
TS_EVENT_HTTP_PRE_REMAP 
TS_EVENT_HTTP_POST_REMAP 
TS_EVENT_MGMT_UPDATE 
TS_EVENT_INTERNAL_60200 
TS_EVENT_INTERNAL_60201 
TS_EVENT_INTERNAL_60202 
Enumerator:
NO_CALLBACK 
AFTER_HEADER 
AFTER_BODY 

This set of enums represents the possible hooks where you can set up continuation callbacks.

The functions used to register a continuation for a particular hook are:

TSHttpHookAdd: adds a global hook. You can globally add any hook except for TS_HTTP_REQUEST_TRANSFORM_HOOK and TS_HTTP_RESPONSE_TRANSFORM_HOOK.

The following hooks can ONLY be added globally:

  • TS_HTTP_SELECT_ALT_HOOK
  • TS_HTTP_SSN_START_HOOK
  • TS_HTTP_SSN_CLOSE_HOOK

TSHttpSsnHookAdd: adds a transaction hook to each transaction within a session. You can only use transaction hooks with this call:

  • TS_HTTP_READ_REQUEST_HDR_HOOK
  • TS_HTTP_OS_DNS_HOOK
  • TS_HTTP_SEND_REQUEST_HDR_HOOK
  • TS_HTTP_READ_CACHE_HDR_HOOK
  • TS_HTTP_READ_RESPONSE_HDR_HOOK
  • TS_HTTP_SEND_RESPONSE_HDR_HOOK
  • TS_HTTP_REQUEST_TRANSFORM_HOOK
  • TS_HTTP_RESPONSE_TRANSFORM_HOOK
  • TS_HTTP_TXN_START_HOOK
  • TS_HTTP_TXN_CLOSE_HOOK

TSHttpTxnHookAdd: adds a callback at a specific point within an HTTP transaction. The following hooks can be used with this function:

  • TS_HTTP_READ_REQUEST_HDR_HOOK
  • TS_HTTP_OS_DNS_HOOK
  • TS_HTTP_SEND_REQUEST_HDR_HOOK
  • TS_HTTP_READ_CACHE_HDR_HOOK
  • TS_HTTP_READ_RESPONSE_HDR_HOOK
  • TS_HTTP_SEND_RESPONSE_HDR_HOOK
  • TS_HTTP_REQUEST_TRANSFORM_HOOK
  • TS_HTTP_RESPONSE_TRANSFORM_HOOK
  • TS_HTTP_TXN_CLOSE_HOOK

The two transform hooks can ONLY be added as transaction hooks.

TS_HTTP_LAST_HOOK _must_ be the last element. Only right place to insert a new element is just before TS_HTTP_LAST_HOOK.

Enumerator:
TS_HTTP_READ_REQUEST_HDR_HOOK 
TS_HTTP_OS_DNS_HOOK 
TS_HTTP_SEND_REQUEST_HDR_HOOK 
TS_HTTP_READ_CACHE_HDR_HOOK 
TS_HTTP_READ_RESPONSE_HDR_HOOK 
TS_HTTP_SEND_RESPONSE_HDR_HOOK 
TS_HTTP_REQUEST_TRANSFORM_HOOK 
TS_HTTP_RESPONSE_TRANSFORM_HOOK 
TS_HTTP_SELECT_ALT_HOOK 
TS_HTTP_TXN_START_HOOK 
TS_HTTP_TXN_CLOSE_HOOK 
TS_HTTP_SSN_START_HOOK 
TS_HTTP_SSN_CLOSE_HOOK 
TS_HTTP_CACHE_LOOKUP_COMPLETE_HOOK 
TS_HTTP_PRE_REMAP_HOOK 
TS_HTTP_POST_REMAP_HOOK 
TS_HTTP_LAST_HOOK 

This set of enums represents possible return values from TSHttpHdrStatusGet(), which retrieves the status code from an HTTP response header (TSHttpHdrStatusGet() retrieves status codes only from headers of type TS_HTTP_TYPE_RESPONSE).

You can also set the TSHttpStatus of a response header using TSHttpHdrStatusSet().

Enumerator:
TS_HTTP_STATUS_NONE 
TS_HTTP_STATUS_CONTINUE 
TS_HTTP_STATUS_SWITCHING_PROTOCOL 
TS_HTTP_STATUS_OK 
TS_HTTP_STATUS_CREATED 
TS_HTTP_STATUS_ACCEPTED 
TS_HTTP_STATUS_NON_AUTHORITATIVE_INFORMATION 
TS_HTTP_STATUS_NO_CONTENT 
TS_HTTP_STATUS_RESET_CONTENT 
TS_HTTP_STATUS_PARTIAL_CONTENT 
TS_HTTP_STATUS_MULTI_STATUS 
TS_HTTP_STATUS_ALREADY_REPORTED 
TS_HTTP_STATUS_IM_USED 
TS_HTTP_STATUS_MULTIPLE_CHOICES 
TS_HTTP_STATUS_MOVED_PERMANENTLY 
TS_HTTP_STATUS_MOVED_TEMPORARILY 
TS_HTTP_STATUS_SEE_OTHER 
TS_HTTP_STATUS_NOT_MODIFIED 
TS_HTTP_STATUS_USE_PROXY 
TS_HTTP_STATUS_TEMPORARY_REDIRECT 
TS_HTTP_STATUS_PERMANENT_REDIRECT 
TS_HTTP_STATUS_BAD_REQUEST 
TS_HTTP_STATUS_UNAUTHORIZED 
TS_HTTP_STATUS_PAYMENT_REQUIRED 
TS_HTTP_STATUS_FORBIDDEN 
TS_HTTP_STATUS_NOT_FOUND 
TS_HTTP_STATUS_METHOD_NOT_ALLOWED 
TS_HTTP_STATUS_NOT_ACCEPTABLE 
TS_HTTP_STATUS_PROXY_AUTHENTICATION_REQUIRED 
TS_HTTP_STATUS_REQUEST_TIMEOUT 
TS_HTTP_STATUS_CONFLICT 
TS_HTTP_STATUS_GONE 
TS_HTTP_STATUS_LENGTH_REQUIRED 
TS_HTTP_STATUS_PRECONDITION_FAILED 
TS_HTTP_STATUS_REQUEST_ENTITY_TOO_LARGE 
TS_HTTP_STATUS_REQUEST_URI_TOO_LONG 
TS_HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE 
TS_HTTP_STATUS_REQUESTED_RANGE_NOT_SATISFIABLE 
TS_HTTP_STATUS_EXPECTATION_FAILED 
TS_HTTP_STATUS_UNPROCESSABLE_ENTITY 
TS_HTTP_STATUS_LOCKED 
TS_HTTP_STATUS_FAILED_DEPENDENCY 
TS_HTTP_STATUS_UPGRADE_REQUIRED 
TS_HTTP_STATUS_PRECONDITION_REQUIRED 
TS_HTTP_STATUS_TOO_MANY_REQUESTS 
TS_HTTP_STATUS_REQUEST_HEADER_FIELDS_TOO_LARGE 
TS_HTTP_STATUS_INTERNAL_SERVER_ERROR 
TS_HTTP_STATUS_NOT_IMPLEMENTED 
TS_HTTP_STATUS_BAD_GATEWAY 
TS_HTTP_STATUS_SERVICE_UNAVAILABLE 
TS_HTTP_STATUS_GATEWAY_TIMEOUT 
TS_HTTP_STATUS_HTTPVER_NOT_SUPPORTED 
TS_HTTP_STATUS_VARIANT_ALSO_NEGOTIATES 
TS_HTTP_STATUS_INSUFFICIENT_STORAGE 
TS_HTTP_STATUS_LOOP_DETECTED 
TS_HTTP_STATUS_NOT_EXTENDED 
TS_HTTP_STATUS_NETWORK_AUTHENTICATION_REQUIRED 
enum TSHttpType

This set of enums represents the possible HTTP types that can be assigned to an HTTP header.

When a header is created with TSHttpHdrCreate(), it is automatically assigned a type of TS_HTTP_TYPE_UNKNOWN. You can modify the HTTP type ONCE after it the header is created, using TSHttpHdrTypeSet(). After setting the HTTP type once, you cannot set it again. Use TSHttpHdrTypeGet() to obtain the TSHttpType of an HTTP header.

Enumerator:
TS_HTTP_TYPE_UNKNOWN 
TS_HTTP_TYPE_REQUEST 
TS_HTTP_TYPE_RESPONSE 
Enumerator:
TS_DATA_ALLOCATE 
TS_DATA_MALLOCED 
TS_DATA_CONSTANT 
Enumerator:
TS_IOBUFFER_SIZE_INDEX_128 
TS_IOBUFFER_SIZE_INDEX_256 
TS_IOBUFFER_SIZE_INDEX_512 
TS_IOBUFFER_SIZE_INDEX_1K 
TS_IOBUFFER_SIZE_INDEX_2K 
TS_IOBUFFER_SIZE_INDEX_4K 
TS_IOBUFFER_SIZE_INDEX_8K 
TS_IOBUFFER_SIZE_INDEX_16K 
TS_IOBUFFER_SIZE_INDEX_32K 
Enumerator:
TS_LOOKUP_UNDEFINED_LOOKUP 
TS_LOOKUP_ICP_SUGGESTED_HOST 
TS_LOOKUP_PARENT_PROXY 
TS_LOOKUP_ORIGIN_SERVER 
TS_LOOKUP_INCOMING_ROUTER 
TS_LOOKUP_HOST_NONE 
Enumerator:
TS_MILESTONE_NULL 
TS_MILESTONE_UA_BEGIN 
TS_MILESTONE_UA_READ_HEADER_DONE 
TS_MILESTONE_UA_BEGIN_WRITE 
TS_MILESTONE_UA_CLOSE 
TS_MILESTONE_SERVER_FIRST_CONNECT 
TS_MILESTONE_SERVER_CONNECT 
TS_MILESTONE_SERVER_CONNECT_END 
TS_MILESTONE_SERVER_BEGIN_WRITE 
TS_MILESTONE_SERVER_FIRST_READ 
TS_MILESTONE_SERVER_READ_HEADER_DONE 
TS_MILESTONE_SERVER_CLOSE 
TS_MILESTONE_CACHE_OPEN_READ_BEGIN 
TS_MILESTONE_CACHE_OPEN_READ_END 
TS_MILESTONE_CACHE_OPEN_WRITE_BEGIN 
TS_MILESTONE_CACHE_OPEN_WRITE_END 
TS_MILESTONE_DNS_LOOKUP_BEGIN 
TS_MILESTONE_DNS_LOOKUP_END 
TS_MILESTONE_SM_START 
TS_MILESTONE_SM_FINISH 
TS_MILESTONE_LAST_ENTRY 
Enumerator:
TS_CONFIG_NULL 
TS_CONFIG_URL_REMAP_PRISTINE_HOST_HDR 
TS_CONFIG_HTTP_CHUNKING_ENABLED 
TS_CONFIG_HTTP_NEGATIVE_CACHING_ENABLED 
TS_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIME 
TS_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATE 
TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_IN 
TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUT 
TS_CONFIG_HTTP_KEEP_ALIVE_POST_OUT 
TS_CONFIG_HTTP_SHARE_SERVER_SESSIONS 
TS_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUT 
TS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUT 
TS_CONFIG_NET_SOCK_OPTION_FLAG_OUT 
TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT 
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROM 
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERER 
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENT 
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIE 
TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP 
TS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IP 
TS_CONFIG_HTTP_RESPONSE_SERVER_ENABLED 
TS_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FOR 
TS_CONFIG_HTTP_SERVER_TCP_INIT_CWND 
TS_CONFIG_HTTP_SEND_HTTP11_REQUESTS 
TS_CONFIG_HTTP_CACHE_HTTP 
TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHE 
TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGE 
TS_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHE 
TS_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHE 
TS_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIES 
TS_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATION 
TS_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMIC 
TS_CONFIG_HTTP_CACHE_REQUIRED_HEADERS 
TS_CONFIG_HTTP_INSERT_REQUEST_VIA_STR 
TS_CONFIG_HTTP_INSERT_RESPONSE_VIA_STR 
TS_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIME 
TS_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIME 
TS_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIME 
TS_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIME 
TS_CONFIG_HTTP_CACHE_MAX_STALE_AGE 
TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_IN 
TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUT 
TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_IN 
TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUT 
TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUT 
TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS 
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES 
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVER 
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIES 
TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT 
TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT 
TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME 
TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD 
TS_CONFIG_HTTP_CACHE_FUZZ_TIME 
TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME 
TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS 
TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT 
TS_CONFIG_HTTP_RESPONSE_SERVER_STR 
TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR 
TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY 
TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD 
TS_CONFIG_NET_SOCK_PACKET_MARK_OUT 
TS_CONFIG_NET_SOCK_PACKET_TOS_OUT 
TS_CONFIG_LAST_ENTRY 

This set of enums are possible values returned by TSHttpHdrParseReq() and TSHttpHdrParseResp().

Enumerator:
TS_PARSE_ERROR 
TS_PARSE_DONE 
TS_PARSE_OK 
TS_PARSE_CONT 
Enumerator:
TS_RECORDACCESS_NULL 
TS_RECORDACCESS_NO_ACCESS 
TS_RECORDACCESS_READ_ONLY 
Enumerator:
TS_RECORDCHECK_NULL 
TS_RECORDCHECK_STR 
TS_RECORDCHECK_INT 
TS_RECORDCHECK_IP 
Enumerator:
TS_RECORDDATATYPE_NULL 
TS_RECORDDATATYPE_INT 
TS_RECORDDATATYPE_FLOAT 
TS_RECORDDATATYPE_STRING 
TS_RECORDDATATYPE_COUNTER 
TS_RECORDDATATYPE_STAT_CONST 
TS_RECORDDATATYPE_STAT_FX 
TS_RECORDDATATYPE_MAX 
Enumerator:
TS_RECORDMODE_NULL 
TS_RECORDMODE_CLIENT 
TS_RECORDMODE_SERVER 
TS_RECORDMODE_STAND_ALONE 
Enumerator:
TS_RECORDP_NULL 
TS_RECORDP_PERSISTENT 
TS_RECORDP_NON_PERSISTENT 
Enumerator:
TS_RECORDTYPE_NULL 
TS_RECORDTYPE_CONFIG 
TS_RECORDTYPE_PROCESS 
TS_RECORDTYPE_NODE 
TS_RECORDTYPE_CLUSTER 
TS_RECORDTYPE_LOCAL 
TS_RECORDTYPE_PLUGIN 
TS_RECORDTYPE_MAX 
Enumerator:
TS_RECORDUPDATE_NULL 
TS_RECORDUPDATE_DYNAMIC 
TS_RECORDUPDATE_RESTART_TS 
TS_RECORDUPDATE_RESTART_TM 
TS_RECORDUPDATE_RESTART_TC 
Enumerator:
TS_ERROR 
TS_SUCCESS 

Starting 2.0, SDK now follows same versioning as Traffic Server.

Enumerator:
TS_SDK_VERSION_2_0 
TS_SDK_VERSION_3_0 
Enumerator:
TS_SRVSTATE_STATE_UNDEFINED 
TS_SRVSTATE_ACTIVE_TIMEOUT 
TS_SRVSTATE_BAD_INCOMING_RESPONSE 
TS_SRVSTATE_CONNECTION_ALIVE 
TS_SRVSTATE_CONNECTION_CLOSED 
TS_SRVSTATE_CONNECTION_ERROR 
TS_SRVSTATE_INACTIVE_TIMEOUT 
TS_SRVSTATE_OPEN_RAW_ERROR 
TS_SRVSTATE_PARSE_ERROR 
TS_SRVSTATE_TRANSACTION_COMPLETE 
TS_SRVSTATE_CONGEST_CONTROL_CONGESTED_ON_F 
TS_SRVSTATE_CONGEST_CONTROL_CONGESTED_ON_M 
Enumerator:
TS_STAT_PERSISTENT 
TS_STAT_NON_PERSISTENT 
enum TSStatSync
Enumerator:
TS_STAT_SYNC_SUM 
TS_STAT_SYNC_COUNT 
TS_STAT_SYNC_AVG 
TS_STAT_SYNC_TIMEAVG 
Enumerator:
TS_THREAD_POOL_DEFAULT 
TS_THREAD_POOL_NET 
TS_THREAD_POOL_TASK 
TS_THREAD_POOL_SSL 
TS_THREAD_POOL_DNS 
TS_THREAD_POOL_REMAP 
TS_THREAD_POOL_CLUSTER 
TS_THREAD_POOL_UDP 
Enumerator:
TS_VC_CLOSE_ABORT 
TS_VC_CLOSE_NORMAL 

Function Documentation

tsapi int _TSAssert ( const char *  txt,
const char *  f,
int  l 
)

References _ink_assert(), and NOWARN_UNUSED.

tsapi void _TSfree ( void *  ptr)

References ats_free().

tsapi void* _TSmalloc ( size_t  size,
const char *  path 
)

References NOWARN_UNUSED, and ats_malloc().

tsapi void* _TSrealloc ( void *  ptr,
size_t  size,
const char *  path 
)

References NOWARN_UNUSED, and ats_realloc().

tsapi void tsapi int _TSReleaseAssert ( const char *  txt,
const char *  f,
int  l 
)

References _ink_assert().

tsapi char* _TSstrdup ( const char *  str,
int64_t  length,
const char *  path 
)

References _xstrdup().

tsapi size_t _TSstrlcat ( char *  dst,
const char *  str,
size_t  siz 
)

References ink_strlcat().

tsapi size_t _TSstrlcpy ( char *  dst,
const char *  str,
size_t  siz 
)

References ink_strlcpy().

tsapi void TSActionCancel ( TSAction  actionp)
tsapi int TSActionDone ( TSAction  actionp)
tsapi char* TSAIOBufGet ( TSAIOCallback  data)

Async disk IO buffer get.

Returns:
char* to the buffer

References AIOCallback::aiocb, and ink_aiocb::aio_buf.

tsapi int TSAIONBytesGet ( TSAIOCallback  data)

Async disk IO get number of bytes.

Returns:
the number of bytes

References AIOCallback::aio_result.

tsapi TSReturnCode TSAIORead ( int  fd,
off_t  offset,
char *  buf,
size_t  buffSize,
TSCont  contp 
)
tsapi TSReturnCode TSAIOThreadNumSet ( int  thread_num)

Async disk IO set number of threads.

Returns:
TS_SUCCESS or TS_ERROR.

References ink_aio_thread_num_set(), TS_SUCCESS, and TS_ERROR.

tsapi TSReturnCode TSAIOWrite ( int  fd,
off_t  offset,
char *  buf,
size_t  bufSize,
TSCont  contp 
)
tsapi TSReturnCode TSBase64Decode ( const char *  str,
size_t  str_len,
unsigned char *  dst,
size_t  dst_size,
size_t *  length 
)
tsapi TSReturnCode TSBase64Encode ( const char *  str,
size_t  str_len,
char *  dst,
size_t  dst_size,
size_t *  length 
)
tsapi TSCacheKey TSCacheKeyCreate ( void  )

Creates (allocates memory for) a new cache key.

References NEW, sdk_assert, sdk_sanity_check_cachekey(), and TS_SUCCESS.

Referenced by SDK_API_TSCache().

tsapi TSReturnCode TSCacheKeyDestroy ( TSCacheKey  key)

Destroys a cache key.

You must destroy cache keys when you are finished with them, i.e. after all reads and writes are completed.

Parameters:
keyto be destroyed.

References sdk_assert, sdk_sanity_check_cachekey(), TS_SUCCESS, CACHE_INFO_MAGIC_ALIVE, TS_ERROR, ats_free(), CacheInfo::hostname, CacheInfo::magic, and CACHE_INFO_MAGIC_DEAD.

Referenced by cache_handler(), and SDK_API_TSCache().

tsapi TSReturnCode TSCacheKeyDigestFromUrlSet ( TSCacheKey  key,
TSMLoc  url 
)
tsapi TSReturnCode TSCacheKeyDigestSet ( TSCacheKey  key,
const char *  input,
int  length 
)

Generates a key for an object to be cached (written to the cache).

Parameters:
keyto be associated with the cached object. Before calling TSCacheKeySetDigest() you must create the key with TSCacheKeyCreate().
inputstring that uniquely identifies the object. In most cases, it is the URL of the object.
lengthof the string input.

References sdk_assert, sdk_sanity_check_cachekey(), TS_SUCCESS, sdk_sanity_check_iocore_structure(), CACHE_INFO_MAGIC_ALIVE, and TS_ERROR.

Referenced by SDK_API_TSCache().

tsapi TSReturnCode TSCacheKeyHostNameSet ( TSCacheKey  key,
const char *  hostname,
int  host_len 
)

Associates a host name to the cache key.

Use this function if the cache has been partitioned by hostname. The hostname tells the cache which volume to use for the object.

Parameters:
keyof the cached object.
hostnameto associate with the cache key.
host_lenlength of the string hostname.

References sdk_assert, sdk_sanity_check_cachekey(), TS_SUCCESS, sdk_sanity_check_null_ptr(), CACHE_INFO_MAGIC_ALIVE, TS_ERROR, CacheInfo::hostname, ats_malloc(), memcpy, and CacheInfo::len.

tsapi TSReturnCode TSCacheKeyPinnedSet ( TSCacheKey  key,
time_t  pin_in_cache 
)
tsapi TSAction TSCacheRead ( TSCont  contp,
TSCacheKey  key 
)

Asks the Traffic Server cache if the object corresponding to key exists in the cache and can be read.

If the object can be read, the Traffic Server cache calls the continuation contp back with the event TS_EVENT_CACHE_OPEN_READ. In this case, the cache also passes contp a cache vconnection and contp can then initiate a read operation on that vconnection using TSVConnRead.

If the object cannot be read, the cache calls contp back with the event TS_EVENT_CACHE_OPEN_READ_FAILED. The user (contp) has the option to cancel the action returned by TSCacheRead. Note that reentrant calls are possible, i.e. the cache can call back the user (contp) in the same call.

Parameters:
contpcontinuation to be called back if a read operation is permissible.
keycache key corresponding to the object to be read.
Returns:
something allowing the user to cancel or schedule the cache read.

References sdk_assert, sdk_sanity_check_iocore_structure(), TS_SUCCESS, sdk_sanity_check_cachekey(), FORCE_PLUGIN_MUTEX, cacheProcessor, CacheProcessor::open_read(), CacheInfo::cache_key, CacheInfo::frag_type, CacheInfo::hostname, and CacheInfo::len.

Referenced by cache_handler().

tsapi TSReturnCode TSCacheReady ( int *  is_ready)
tsapi TSAction TSCacheRemove ( TSCont  contp,
TSCacheKey  key 
)

Removes the object corresponding to key from the cache.

If the object was removed successfully, the cache calls contp back with the event TS_EVENT_CACHE_REMOVE. If the object was not found in the cache, the cache calls contp back with the event TS_EVENT_CACHE_REMOVE_FAILED.

In both of these callbacks, the user (contp) does not have to do anything. The user does not get any vconnection from the cache, since no data needs to be transferred. When the cache calls contp back with TS_EVENT_CACHE_REMOVE, the remove has already been commited.

Parameters:
contpcontinuation that the cache calls back reporting the success or failure of the remove.
keycache key corresponding to the object to be removed.
Returns:
something allowing the user to cancel or schedule the remove.

References sdk_assert, sdk_sanity_check_iocore_structure(), TS_SUCCESS, sdk_sanity_check_cachekey(), FORCE_PLUGIN_MUTEX, cacheProcessor, CacheProcessor::remove(), CacheInfo::cache_key, CacheInfo::frag_type, CacheInfo::hostname, and CacheInfo::len.

Referenced by cache_handler().

tsapi TSAction TSCacheScan ( TSCont  contp,
TSCacheKey  key,
int  KB_per_second 
)
tsapi TSReturnCode TSCacheUrlSet ( TSHttpTxn  txnp,
const char *  url,
int  length 
)
tsapi TSAction TSCacheWrite ( TSCont  contp,
TSCacheKey  key 
)

Asks the Traffic Server cache if contp can start writing the object (corresponding to key) to the cache.

If the object can be written, the cache calls contp back with the event TS_EVENT_CACHE_OPEN_WRITE. In this case, the cache also passes contp a cache vconnection and contp can then initiate a write operation on that vconnection using TSVConnWrite. The object is not committed to the cache until the vconnection is closed. When all data has been transferred, the user (contp) must do an TSVConnClose. In case of any errors, the user MUST do an TSVConnAbort(contp, 0).

If the object cannot be written, the cache calls contp back with the event TS_EVENT_CACHE_OPEN_WRITE_FAILED. This can happen, for example, if there is another object with the same key being written to the cache. The user (contp) has the option to cancel the action returned by TSCacheWrite.

Note that reentrant calls are possible, i.e. the cache can call back the user (contp) in the same call.

Parameters:
contpcontinuation that the cache calls back (telling it whether the write operation can proceed or not).
keycache key corresponding to the object to be cached.
Returns:
something allowing the user to cancel or schedule the cache write.

References sdk_assert, sdk_sanity_check_iocore_structure(), TS_SUCCESS, sdk_sanity_check_cachekey(), FORCE_PLUGIN_MUTEX, cacheProcessor, CacheProcessor::open_write(), CacheInfo::cache_key, CacheInfo::frag_type, CacheInfo::pin_in_cache, CacheInfo::hostname, and CacheInfo::len.

Referenced by SDK_API_TSCache().

tsapi void* TSConfigDataGet ( TSConfig  configp)

References INKConfigImpl::mdata.

Referenced by SDK_API_TSConfig().

tsapi const char* TSConfigDirGet ( void  )

Gets the path of the directory of Traffic Server configuration.

Returns:
pointer to Traffic Server configuration directory.

References system_config_directory.

Referenced by SDK_API_TSfopen().

tsapi TSConfig TSConfigGet ( unsigned int  id)
tsapi void TSConfigRelease ( unsigned int  id,
TSConfig  configp 
)
tsapi unsigned int TSConfigSet ( unsigned int  id,
void *  data,
TSConfigDestroyFunc  funcp 
)
tsapi int TSContCall ( TSCont  contp,
TSEvent  event,
void *  edata 
)
tsapi TSCont TSContCreate ( TSEventFunc  funcp,
TSMutex  mutexp 
)
tsapi void* TSContDataGet ( TSCont  contp)
tsapi void TSContDataSet ( TSCont  contp,
void *  data 
)
tsapi void TSContDestroy ( TSCont  contp)
tsapi TSMutex TSContMutexGet ( TSCont  contp)
tsapi TSAction TSContSchedule ( TSCont  contp,
TSHRTime  timeout,
TSThreadPool  tp 
)
tsapi TSAction TSContScheduleEvery ( TSCont  contp,
TSHRTime  every,
TSThreadPool  tp 
)
tsapi void TSDebug ( const char *  tag,
const char *  format_str,
  ... 
)
tsapi void tsapi void TSDebugSpecific ( int  debug_flag,
const char *  tag,
const char *  format_str,
  ... 
)

Output a debug line even if the debug tag is turned off, as long as debugging is enabled.

Could be used as follows:

      TSDebugSpecifc(TSHttpTxnDebugGet(txn), "plugin_tag" , "Hello World from transaction %p", txn);

will be printed if the plugin_tag is enabled or the transaction specific debugging is turned on for txn.

Parameters:
debug_flagboolean flag.
tagDebug tag for the line.
formatFormat string.
...Format arguments.
tsapi void TSError ( const char *  fmt,
  ... 
)

Writes printf-style error messages to the Traffic Server error log.

One advantage of TSError over printf is that each call is atomically placed into the error log and is not garbled with other error entries. This is not an issue in single-threaded programs but is a definite nuisance in multi-threaded programs.

Parameters:
fmtprintf format description.
...argument for the printf format description.

Referenced by test_url_print(), convert_http_hdr_to_string(), convert_mime_hdr_to_string(), synclient_txn_read_response(), and synserver_txn_read_request().

tsapi void TSfclose ( TSFile  filep)

Closes the file to which filep points and frees the data structures and buffers associated with it.

If the file was opened for writing, any pending data is flushed.

Parameters:
filepfile to be closed.

References FileImpl::fclose().

Referenced by SDK_API_TSfopen(), and log_test_handler().

tsapi TSReturnCode TSFetchPageRespGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi void TSFetchPages ( TSFetchUrlParams_t params)
tsapi char* TSFetchRespGet ( TSHttpTxn  txnp,
int *  length 
)
tsapi void TSFetchUrl ( const char *  request,
int  request_len,
struct sockaddr const *  addr,
TSCont  contp,
TSFetchWakeUpOptions  callback_options,
TSFetchEvent  event 
)
tsapi void TSfflush ( TSFile  filep)

Flushes pending data that has been buffered up in memory from previous calls to TSfwrite().

Parameters:
filepfile to flush.

References FileImpl::fflush().

Referenced by SDK_API_TSfopen().

tsapi char* TSfgets ( TSFile  filep,
char *  buf,
size_t  length 
)

Reads a line from the file pointed to by filep into the buffer buf.

Lines are terminated by a line feed character, '
'. The line placed in the buffer includes the line feed character and is terminated with a NULL. If the line is longer than length bytes then only the first length-minus-1 bytes are placed in buf.

Parameters:
filepfile to read from.
bufbuffer to read into.
lengthsize of the buffer to read into.
Returns:
pointer to the string read into the buffer buf.

References FileImpl::fgets().

Referenced by SDK_API_TSfopen(), and log_test_handler().

tsapi TSFile TSfopen ( const char *  filename,
const char *  mode 
)

Opens a file for reading or writing and returns a descriptor for accessing the file.

The current implementation cannot open a file for both reading or writing. See the SDK Programmer's Guide for sample code.

Parameters:
filenamefile to be opened.
modespecifies whether to open the file for reading or writing. If mode is "r" then the file is opened for reading. If mode is "w" then the file is opened for writing. Currently "r" and "w" are the only two valid modes for opening a file.
Returns:
descriptor for the file that TSfopen opens. Descriptors of type TSFile can be greater than 256.

References NEW, and FileImpl::fopen().

Referenced by SDK_API_TSfopen(), and log_test_handler().

tsapi size_t TSfread ( TSFile  filep,
void *  buf,
size_t  length 
)

Attempts to read length bytes of data from the file pointed to by filep into the buffer buf.

Parameters:
filepname of the file to read from.
bufbuffer to read into.
lengthamount of data to read, in bytes.
Returns:
number of bytes read. If end of the file, it returns 0. If the file was not opened for reading or if an error occurs while reading the file, it returns -1.

References FileImpl::fread().

Referenced by SDK_API_TSfopen().

tsapi size_t TSfwrite ( TSFile  filep,
const void *  buf,
size_t  length 
)

Attempts to write length bytes of data from the buffer buf to the file filep.

Make sure that filep is open for writing. You might want to check the number of bytes written (TSfwrite() returns this value) against the value of length. If it is less, there might be insufficient space on disk, for example.

Parameters:
filepfile to write into.
bufbuffer containing the data to be written.
lengthamount of data to write to filep, in bytes.
Returns:
number of bytes written to filep. If the file was not opened for writing, it returns -1. If an error occurs while writing, it returns the number of bytes successfully written.

References FileImpl::fwrite().

Referenced by SDK_API_TSfopen().

tsapi TSReturnCode TSHandleMLocRelease ( TSMBuffer  bufp,
TSMLoc  parent,
TSMLoc  mloc 
)

Releases the TSMLoc mloc created from the TSMLoc parent.

If there is no parent TSMLoc, use TS_NULL_MLOC.

Parameters:
bufpmarshal buffer containing the TSMLoc handle to be released.
parentlocation of the parent object from which the handle was created.
mloclocation of the handle to be released.

References TS_NULL_MLOC, TS_SUCCESS, sdk_assert, sdk_sanity_check_mbuffer(), HdrHeapObjImpl::m_type, HDR_HEAP_OBJ_URL, HDR_HEAP_OBJ_HTTP_HEADER, HDR_HEAP_OBJ_MIME_HEADER, HDR_HEAP_OBJ_FIELD_SDK_HANDLE, sdk_sanity_check_field_handle(), TS_ERROR, sdk_free_field_handle(), and ink_release_assert.

Referenced by SDK_API_TSUrl(), SDK_API_TSHttpHdr(), SDK_API_TSMimeHdrField(), SDK_API_TSHttpHdrParse(), SDK_API_TSMimeHdrParse(), SDK_API_TSUrlParse(), cache_hook_handler(), transform_hook_handler(), and get_request_id().

tsapi TSAction TSHostLookup ( TSCont  contp,
const char *  hostname,
size_t  namelen 
)
tsapi struct sockaddr const* TSHostLookupResultAddrGet ( TSHostLookupResult  lookup_result) [read]
tsapi TSReturnCode TSHttpAltInfoCachedReqGet ( TSHttpAltInfo  infop,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi TSReturnCode TSHttpAltInfoCachedRespGet ( TSHttpAltInfo  infop,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi TSReturnCode TSHttpAltInfoClientReqGet ( TSHttpAltInfo  infop,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi void TSHttpAltInfoQualitySet ( TSHttpAltInfo  infop,
float  quality 
)
tsapi TSReturnCode TSHttpArgIndexLookup ( int  arg_idx,
const char **  name,
const char **  description 
)
tsapi TSReturnCode TSHttpArgIndexNameLookup ( const char *  name,
int *  arg_idx,
const char **  description 
)
tsapi TSReturnCode TSHttpArgIndexReserve ( const char *  name,
const char *  description,
int *  arg_idx 
)
tsapi TSReturnCode TSHttpCacheReenable ( TSCacheTxn  txnp,
const TSEvent  event,
const void *  data,
const uint64_t  size 
)
tsapi TSVConn TSHttpConnect ( struct sockaddr const *  addr)

Allows the plugin to initiate an http connection.

The TSVConn the plugin receives as the result of successful operates identically to one created through TSNetConnect. Aside from allowing the plugin to set the client ip and port for logging, the functionality of TSHttpConnect() is identical to connecting to localhost on the proxy port with TSNetConnect(). TSHttpConnect() is more efficient than TSNetConnect() to localhost since it avoids the overhead of passing the data through the operating system.

Parameters:
log_ipip address (in network byte order) that connection will be logged as coming from.
log_portport (in network byte order) that connection will be logged as coming from.
vcwill be set to point to the new TSVConn on success.

Referenced by FetchSM::httpConnect(), SDK_API_TSHttpConnectIntercept(), and SDK_API_TSHttpConnectServerIntercept().

tsapi TSVConn TSHttpConnectTransparent ( struct sockaddr const *  client_addr,
struct sockaddr const *  server_addr 
)

Allows the plugin to initiate a transparent http connection.

This operates identically to TSHttpConnect except that it is treated as an intercepted transparent connection by the session and transaction state machines.

Parameters:
client_addrthe address that the resulting connection will be seen as coming from
server_addrthe address that the resulting connection will be seen as attempting to connect to when intercepted
vcwill be set to point to the new TSVConn on success.
tsapi int TSHttpCurrentActiveClientConnectionsGet ( void  )
tsapi int TSHttpCurrentCacheConnectionsGet ( void  )
tsapi int TSHttpCurrentClientConnectionsGet ( void  )
tsapi int TSHttpCurrentIdleClientConnectionsGet ( void  )
tsapi int TSHttpCurrentServerConnectionsGet ( void  )
tsapi TSReturnCode TSHttpHdrClone ( TSMBuffer  dest_bufp,
TSMBuffer  src_bufp,
TSMLoc  src_hdr,
TSMLoc locp 
)
tsapi TSReturnCode TSHttpHdrCopy ( TSMBuffer  dest_bufp,
TSMLoc  dest_offset,
TSMBuffer  src_bufp,
TSMLoc  src_offset 
)

Copies the contents of the HTTP header located at src_loc within src_bufp to the HTTP header located at dest_loc within dest_bufp.

TSHttpHdrCopy() works correctly even if src_bufp and dest_bufp point to different marshal buffers. Make sure that you create the destination HTTP header before copying into it.

Note: TSHttpHdrCopy() appends the port number to the domain of the URL portion of the header. For example, a copy of http://www.example.com appears as http://www.example.com:80 in the destination buffer.

Parameters:
dest_bufpmarshal buffer to contain the copied header.
dest_offsetlocation of the copied header.
src_bufpmarshal buffer containing the source header.
src_offsetlocation of the source header.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_http_hdr_handle(), isWriteable(), TS_ERROR, HdrHeapObjImpl::m_type, HDR_HEAP_OBJ_HTTP_HEADER, TSHttpHdrTypeSet(), HTTPHdrImpl::m_polarity, and http_hdr_copy_onto().

Referenced by SDK_API_TSHttpHdr().

tsapi TSMLoc TSHttpHdrCreate ( TSMBuffer  bufp)
tsapi void TSHttpHdrDestroy ( TSMBuffer  bufp,
TSMLoc  offset 
)

Destroys the HTTP header located at hdr_loc within the marshal buffer bufp.

Do not forget to release the handle hdr_loc with a call to TSHandleMLocRelease().

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, and sdk_sanity_check_http_hdr_handle().

Referenced by SDK_API_TSHttpHdr().

tsapi int TSHttpHdrLengthGet ( TSMBuffer  bufp,
TSMLoc  offset 
)
tsapi const char* TSHttpHdrMethodGet ( TSMBuffer  bufp,
TSMLoc  offset,
int *  length 
)
tsapi TSReturnCode TSHttpHdrMethodSet ( TSMBuffer  bufp,
TSMLoc  offset,
const char *  value,
int  length 
)
tsapi TSParseResult TSHttpHdrParseReq ( TSHttpParser  parser,
TSMBuffer  bufp,
TSMLoc  offset,
const char **  start,
const char *  end 
)

Parses an HTTP request header.

The HTTP header must have already been created, and must reside inside the marshal buffer bufp. The start argument points to the current position of the string buffer being parsed. The end argument points to one byte after the end of the buffer to be parsed. On return, TSHttpHdrParseReq() modifies start to point past the last character parsed.

It is possible to parse an HTTP request header a single byte at a time using repeated calls to TSHttpHdrParseReq(). As long as an error does not occur, the TSHttpHdrParseReq() function will consume that single byte and ask for more.

Parameters:
parserparses the HTTP header.
bufpmarshal buffer containing the HTTP header to be parsed.
offsetlocation of the HTTP header within bufp.
startboth an input and output. On input, it points to the current position of the string buffer being parsed. On return, start is modified to point past the last character parsed.
endpoints to one byte after the end of the buffer to be parsed.
Returns:
status of the parse:
  • TS_PARSE_ERROR means there was a parsing error.
  • TS_PARSE_DONE means that the end of the header was reached (the parser encountered a "\r\n\r\n" pattern).
  • TS_PARSE_CONT means that parsing of the header stopped because the parser reached the end of the buffer (large headers can span multiple buffers).

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_http_hdr_handle(), sdk_sanity_check_null_ptr(), isWriteable(), TS_PARSE_ERROR, SET_HTTP_HDR, ink_assert, HTTPHdr::m_http, HdrHeapObjImpl::m_type, HDR_HEAP_OBJ_HTTP_HEADER, TSHttpHdrTypeSet(), TS_HTTP_TYPE_REQUEST, and HTTPHdr::parse_req().

Referenced by SDK_API_TSHttpHdrParse().

tsapi TSParseResult TSHttpHdrParseResp ( TSHttpParser  parser,
TSMBuffer  bufp,
TSMLoc  offset,
const char **  start,
const char *  end 
)
tsapi void TSHttpHdrPrint ( TSMBuffer  bufp,
TSMLoc  offset,
TSIOBuffer  iobufp 
)
tsapi const char* TSHttpHdrReasonGet ( TSMBuffer  bufp,
TSMLoc  offset,
int *  length 
)
tsapi const char* TSHttpHdrReasonLookup ( TSHttpStatus  status)

References http_hdr_reason_lookup().

Referenced by SDK_API_TSHttpHdr().

tsapi TSReturnCode TSHttpHdrReasonSet ( TSMBuffer  bufp,
TSMLoc  offset,
const char *  value,
int  length 
)
tsapi TSHttpStatus TSHttpHdrStatusGet ( TSMBuffer  bufp,
TSMLoc  offset 
)
tsapi TSReturnCode TSHttpHdrStatusSet ( TSMBuffer  bufp,
TSMLoc  offset,
TSHttpStatus  status 
)
tsapi TSHttpType TSHttpHdrTypeGet ( TSMBuffer  bufp,
TSMLoc  offset 
)
tsapi TSReturnCode TSHttpHdrTypeSet ( TSMBuffer  bufp,
TSMLoc  offset,
TSHttpType  type 
)
tsapi TSReturnCode TSHttpHdrUrlGet ( TSMBuffer  bufp,
TSMLoc  offset,
TSMLoc locp 
)
tsapi TSReturnCode TSHttpHdrUrlSet ( TSMBuffer  bufp,
TSMLoc  offset,
TSMLoc  url 
)
tsapi int TSHttpHdrVersionGet ( TSMBuffer  bufp,
TSMLoc  offset 
)
tsapi TSReturnCode TSHttpHdrVersionSet ( TSMBuffer  bufp,
TSMLoc  offset,
int  ver 
)
tsapi void TSHttpHookAdd ( TSHttpHookID  id,
TSCont  contp 
)
tsapi TSReturnCode TSHttpIsInternalRequest ( TSHttpTxn  txnp)
tsapi void TSHttpParserClear ( TSHttpParser  parser)
tsapi TSHttpParser TSHttpParserCreate ( void  )

References ats_malloc(), and http_parser_init().

Referenced by SDK_API_TSHttpHdrParse().

tsapi void TSHttpParserDestroy ( TSHttpParser  parser)
tsapi TSAction TSHttpSchedule ( TSCont  contp,
TSHttpTxn  txnp,
TSHRTime  timeout 
)
tsapi void* TSHttpSsnArgGet ( TSHttpSsn  ssnp,
int  arg_idx 
)
tsapi void TSHttpSsnArgSet ( TSHttpSsn  ssnp,
int  arg_idx,
void *  arg 
)
tsapi struct sockaddr const* TSHttpSsnClientAddrGet ( TSHttpSsn  ssnp) [read]
tsapi TSReturnCode TSHttpSsnClientFdGet ( TSHttpSsn  ssnp,
int *  fdp 
)
tsapi int TSHttpSsnDebugGet ( TSHttpSsn  ssnp,
int *  on 
)

Returns the transaction specific debugging flag for this client session.

Parameters:
txnpClient session to check.
Returns:
1 if enabled, 0 otherwise.
tsapi void TSHttpSsnDebugSet ( TSHttpSsn  ssnp,
int  on 
)

Set the session specific debugging flag for this client session.

When turned on, internal debug messeges related to this session and all transactions in the session will be written even if the debug tag isn't on.

Parameters:
ssnpClient session to change.
onset to 1 to turn on, 0 to turn off.

References sdk_assert, sdk_sanity_check_http_ssn(), TS_SUCCESS, and on.

tsapi void TSHttpSsnHookAdd ( TSHttpSsn  ssnp,
TSHttpHookID  id,
TSCont  contp 
)
tsapi struct sockaddr const* TSHttpSsnIncomingAddrGet ( TSHttpSsn  ssnp) [read]
tsapi void TSHttpSsnReenable ( TSHttpSsn  ssnp,
TSEvent  event 
)
tsapi int TSHttpSsnTransactionCount ( TSHttpSsn  ssnp)
tsapi TSReturnCode TSHttpTxnAborted ( TSHttpTxn  txnp)

Check if transaction was aborted (due client/server errors etc.)

Returns:
1 if transaction was aborted

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, HttpSM::t_state, HttpTransact::State::squid_codes, SQUID_LOG_ERR_CLIENT_ABORT, SQUID_LOG_TCP_SWAPFAIL, HttpTransact::State::current, HttpTransact::ABORTED, and TS_ERROR.

tsapi void TSHttpTxnActiveTimeoutSet ( TSHttpTxn  txnp,
int  timeout 
)

timeout is in msec overrides as proxy.config.http.transaction_active_timeout_out

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, and HttpTransact::State::api_txn_active_timeout_value.

tsapi void* TSHttpTxnArgGet ( TSHttpTxn  txnp,
int  arg_idx 
)
tsapi void TSHttpTxnArgSet ( TSHttpTxn  txnp,
int  arg_idx,
void *  arg 
)
tsapi int TSHttpTxnBackgroundFillStarted ( TSHttpTxn  txnp)
tsapi TSReturnCode TSHttpTxnCachedReqGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi TSReturnCode TSHttpTxnCachedRespGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi TSReturnCode TSHttpTxnCachedRespModifiableGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi TSReturnCode TSHttpTxnCachedUrlSet ( TSHttpTxn  txnp,
TSMBuffer  bufp,
TSMLoc  obj 
)
tsapi TSReturnCode TSHttpTxnCacheLookupStatusGet ( TSHttpTxn  txnp,
int *  lookup_status 
)
tsapi TSReturnCode TSHttpTxnCacheLookupStatusSet ( TSHttpTxn  txnp,
int  cachelookup 
)
tsapi TSReturnCode TSHttpTxnCacheLookupUrlGet ( TSHttpTxn  txnp,
TSMBuffer  bufp,
TSMLoc  obj 
)
tsapi struct sockaddr const* TSHttpTxnClientAddrGet ( TSHttpTxn  txnp) [read]

Get client address for transaction txnp.

Retrieves the socket address of the remote client that has connected to Traffic Server for transaction txnp. The return structure is the generic socket address storage in order to be address-family agnostic. The user of this function can then go on to do the approriate thing with the type specified in the ss_family field of the structure whether that be for IPv4, IPv6, or any other address family.

Returns:
Client address for connection to client in transaction txnp.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, TSHttpTxnSsnGet(), and TSHttpSsnClientAddrGet().

Referenced by checkHttpTxnClientIPGet(), and checkHttpTxnClientAddrGet().

tsapi TSReturnCode TSHttpTxnClientDataGet ( TSHttpTxn  txnp,
const char **  bufp,
int *  len 
)
tsapi TSReturnCode TSHttpTxnClientFdGet ( TSHttpTxn  txnp,
int *  fdp 
)
tsapi TSReturnCode TSHttpTxnClientPacketMarkSet ( TSHttpTxn  txnp,
int  mark 
)

Change packet firewall mark for the client side connection.

Note:
The change takes effect immediately
Returns:
TS_SUCCESS if the client connection was modified

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, HttpSM::ua_session, TS_ERROR, HttpClientSession::get_netvc(), NetVConnection::options, NetVCOptions::packet_mark, and NetVConnection::apply_options().

tsapi TSReturnCode TSHttpTxnClientPacketTosSet ( TSHttpTxn  txnp,
int  tos 
)

Change packet TOS for the client side connection.

Note:
The change takes effect immediately
TOS is deprecated and replaced by DSCP, this is still used to set DSCP however the first 2 bits of this value will be ignored as they now belong to the ECN field.
Returns:
TS_SUCCESS if the client connection was modified

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, HttpSM::ua_session, TS_ERROR, HttpClientSession::get_netvc(), NetVConnection::options, NetVCOptions::packet_tos, and NetVConnection::apply_options().

tsapi int64_t TSHttpTxnClientReqBodyBytesGet ( TSHttpTxn  txnp)
tsapi TSReturnCode TSHttpTxnClientReqGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi int TSHttpTxnClientReqHdrBytesGet ( TSHttpTxn  txnp)
tsapi int64_t TSHttpTxnClientRespBodyBytesGet ( TSHttpTxn  txnp)
tsapi TSReturnCode TSHttpTxnClientRespGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi int TSHttpTxnClientRespHdrBytesGet ( TSHttpTxn  txnp)
tsapi TSReturnCode TSHttpTxnConfigFind ( const char *  name,
int  length,
TSOverridableConfigKey conf,
TSRecordDataType type 
)

References sdk_assert, sdk_sanity_check_null_ptr(), TS_SUCCESS, TS_CONFIG_NULL, TS_RECORDDATATYPE_INT, TS_CONFIG_HTTP_CACHE_HTTP, TS_CONFIG_HTTP_CACHE_FUZZ_TIME, TS_CONFIG_HTTP_CHUNKING_ENABLED, TS_CONFIG_NET_SOCK_PACKET_TOS_OUT, TS_CONFIG_HTTP_CACHE_MAX_STALE_AGE, TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME, TS_CONFIG_HTTP_RESPONSE_SERVER_STR, TS_RECORDDATATYPE_STRING, TS_CONFIG_HTTP_KEEP_ALIVE_POST_OUT, TS_CONFIG_NET_SOCK_OPTION_FLAG_OUT, TS_CONFIG_NET_SOCK_PACKET_MARK_OUT, TS_CONFIG_HTTP_SERVER_TCP_INIT_CWND, TS_CONFIG_HTTP_SEND_HTTP11_REQUESTS, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROM, TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_IN, TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS, TS_CONFIG_HTTP_SHARE_SERVER_SESSIONS, TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME, TS_CONFIG_URL_REMAP_PRISTINE_HOST_HDR, TS_CONFIG_HTTP_INSERT_REQUEST_VIA_STR, TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS, TS_CONFIG_HTTP_CACHE_REQUIRED_HEADERS, TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUT, TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY, TS_CONFIG_HTTP_RESPONSE_SERVER_ENABLED, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIE, TS_CONFIG_HTTP_INSERT_RESPONSE_VIA_STR, TS_CONFIG_HTTP_NEGATIVE_CACHING_ENABLED, TS_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATE, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERER, TS_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUT, TS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUT, TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT, TS_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIME, TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP, TS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IP, TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD, TS_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATION, TS_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENT, TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIES, TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHE, TS_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHE, TS_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHE, TS_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIME, TS_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIME, TS_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FOR, TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES, TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT, TS_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIME, TS_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIME, TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT, TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGE, TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUT, TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT, TS_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIES, TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_IN, TS_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMIC, TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_IN, TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUT, TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUT, TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD, TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVER, and TS_ERROR.

Referenced by SDK_API_OVERRIDABLE_CONFIGS().

tsapi TSReturnCode TSHttpTxnConfigFloatGet ( TSHttpTxn  txnp,
TSOverridableConfigKey  conf,
TSMgmtFloat value 
)
tsapi TSReturnCode TSHttpTxnConfigFloatSet ( TSHttpTxn  txnp,
TSOverridableConfigKey  conf,
TSMgmtFloat  value 
)
tsapi TSReturnCode TSHttpTxnConfigIntGet ( TSHttpTxn  txnp,
TSOverridableConfigKey  conf,
TSMgmtInt value 
)
tsapi TSReturnCode TSHttpTxnConfigIntSet ( TSHttpTxn  txnp,
TSOverridableConfigKey  conf,
TSMgmtInt  value 
)
tsapi TSReturnCode TSHttpTxnConfigStringGet ( TSHttpTxn  txnp,
TSOverridableConfigKey  conf,
const char **  value,
int *  length 
)
tsapi TSReturnCode TSHttpTxnConfigStringSet ( TSHttpTxn  txnp,
TSOverridableConfigKey  conf,
const char *  value,
int  length 
)
tsapi void TSHttpTxnConnectTimeoutSet ( TSHttpTxn  txnp,
int  timeout 
)

timeout is in msec overrides as proxy.config.http.connect_attempts_timeout

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, and HttpTransact::State::api_txn_connect_timeout_value.

tsapi int TSHttpTxnDebugGet ( TSHttpTxn  txnp)

Returns the transaction specific debugging flag for this transaction.

Parameters:
txnptransaction to check.
Returns:
1 if enabled, 0 otherwise.

References sdk_assert, sdk_sanity_check_txn(), and TS_SUCCESS.

tsapi void TSHttpTxnDebugSet ( TSHttpTxn  txnp,
int  on 
)

Set the transaction specific debugging flag for this transaction.

When turned on, internal debug messeges related to this transaction will be written even if the debug tag isn't on.

Parameters:
txnptransaction to change.
onset to 1 to turn on, 0 to turn off.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, and on.

tsapi void TSHttpTxnDNSTimeoutSet ( TSHttpTxn  txnp,
int  timeout 
)

timeout is in msec overrides as proxy.config.dns.lookup_timeout

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, and HttpTransact::State::api_txn_dns_timeout_value.

tsapi char* TSHttpTxnEffectiveUrlStringGet ( TSHttpTxn  txnp,
int *  length 
)

Get the effective URL for the transaction.

The effective URL is the URL taking in to account both the explicit URL in the request and the HOST field.

A possibly non-null terminated string is returned.

Note:
The returned string is allocated and must be freed by the caller after use with TSfree.
Parameters:
lengthString length return, may be NULL.

References sdk_assert, TS_SUCCESS, sdk_sanity_check_txn(), sdk_sanity_check_null_ptr(), HttpSM::t_state, and HttpTransact::State::hdr_info.

tsapi void TSHttpTxnErrorBodySet ( TSHttpTxn  txnp,
char *  buf,
int  buflength,
char *  mimetype 
)
tsapi TSReturnCode TSHttpTxnFollowRedirect ( TSHttpTxn  txnp,
int  on 
)
tsapi int TSHttpTxnGetMaxHttpRetBodySize ( void  )
tsapi void TSHttpTxnHookAdd ( TSHttpTxn  txnp,
TSHttpHookID  id,
TSCont  contp 
)
tsapi struct sockaddr const* TSHttpTxnIncomingAddrGet ( TSHttpTxn  txnp) [read]

Get the incoming address.

Note:
The pointer is valid only for the current callback. Clients that need to keep the value across callbacks must maintain their own storage.
Returns:
Local address of the client connection for transaction txnp.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, TSHttpTxnSsnGet(), and TSHttpSsnIncomingAddrGet().

Referenced by checkHttpTxnIncomingAddrGet().

tsapi void TSHttpTxnIntercept ( TSCont  contp,
TSHttpTxn  txnp 
)

Allows a plugin take over the servicing of the request as though it was the origin server.

contp will be sent TS_EVENT_NET_ACCEPT. The edata passed with TS_NET_EVENT_ACCEPT is an TSVConn just as it would be for a normal accept. The plugin must act as if it is an http server and read the http request and body off the TSVConn and send an http response header and body.

TSHttpTxnIntercept() must be called be called from only TS_HTTP_READ_REQUEST_HOOK. Using TSHttpTxnIntercept will bypass the Traffic Server cache. If response sent by the plugin should be cached, use TSHttpTxnServerIntercept() instead. TSHttpTxnIntercept() primary use is allow plugins to serve data about their functioning directly.

TSHttpTxnIntercept() must only be called once per transaction.

Parameters:
contpcontinuation called to handle the interception.
txnptransaction to be intercepted.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, sdk_sanity_check_continuation(), sdk_sanity_check_null_ptr(), Continuation::mutex, HttpSM::plugin_tunnel_type, HTTP_PLUGIN_AS_INTERCEPT, HttpSM::plugin_tunnel, PluginVCCore::alloc(), and PluginVCCore::set_accept_cont().

Referenced by cont_test_handler().

tsapi TSReturnCode TSHttpTxnMilestoneGet ( TSHttpTxn  txnp,
TSMilestonesType  milestone,
TSHRTime time 
)

Return the particular milestone timer for the transaction.

If 0 is returned, it means the transaction has not yet reached that milestone. Asking for an "unknown" milestone is an error.

Parameters:
txnpthe transaction pointer
milestonethe requested milstone timer was created.
timea pointer to a TSHRTime where we will store the timer
Returns:
TS_SUCCESS if the milestone is supported, TS_ERROR otherwise

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, sdk_sanity_check_null_ptr(), TS_MILESTONE_UA_BEGIN, HttpSM::milestones, TransactionMilestones::ua_begin, TS_MILESTONE_UA_READ_HEADER_DONE, TransactionMilestones::ua_read_header_done, TS_MILESTONE_UA_BEGIN_WRITE, TransactionMilestones::ua_begin_write, TS_MILESTONE_UA_CLOSE, TransactionMilestones::ua_close, TS_MILESTONE_SERVER_FIRST_CONNECT, TransactionMilestones::server_first_connect, TS_MILESTONE_SERVER_CONNECT, TransactionMilestones::server_connect, TS_MILESTONE_SERVER_CONNECT_END, TransactionMilestones::server_connect_end, TS_MILESTONE_SERVER_BEGIN_WRITE, TransactionMilestones::server_begin_write, TS_MILESTONE_SERVER_FIRST_READ, TransactionMilestones::server_first_read, TS_MILESTONE_SERVER_READ_HEADER_DONE, TransactionMilestones::server_read_header_done, TS_MILESTONE_SERVER_CLOSE, TransactionMilestones::server_close, TS_MILESTONE_CACHE_OPEN_READ_BEGIN, TransactionMilestones::cache_open_read_begin, TS_MILESTONE_CACHE_OPEN_READ_END, TransactionMilestones::cache_open_read_end, TS_MILESTONE_CACHE_OPEN_WRITE_BEGIN, TransactionMilestones::cache_open_write_begin, TS_MILESTONE_CACHE_OPEN_WRITE_END, TransactionMilestones::cache_open_write_end, TS_MILESTONE_DNS_LOOKUP_BEGIN, TransactionMilestones::dns_lookup_begin, TS_MILESTONE_DNS_LOOKUP_END, TransactionMilestones::dns_lookup_end, TS_MILESTONE_SM_START, TransactionMilestones::sm_start, TS_MILESTONE_SM_FINISH, TransactionMilestones::sm_finish, and TS_ERROR.

tsapi struct sockaddr const* TSHttpTxnNextHopAddrGet ( TSHttpTxn  txnp) [read]

Get the next hop address.

Note:
The pointer is valid only for the current callback. Clients that need to keep the value across callbacks must maintain their own storage.
Returns:
The address of the next hop for transaction txnp.

Return zero if the server structure is not yet constructed.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, HttpSM::t_state, and HttpTransact::State::current.

Referenced by checkHttpTxnNextHopIPGet().

tsapi void TSHttpTxnNoActivityTimeoutSet ( TSHttpTxn  txnp,
int  timeout 
)

timeout is in msec overrides as proxy.config.http.transaction_no_activity_timeout_out

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, and HttpTransact::State::api_txn_no_activity_timeout_value.

tsapi TSReturnCode TSHttpTxnOutgoingAddrSet ( TSHttpTxn  txnp,
struct sockaddr const *  addr 
)
tsapi TSReturnCode TSHttpTxnOutgoingTransparencySet ( TSHttpTxn  txnp,
int  flag 
)
tsapi TSReturnCode TSHttpTxnParentProxyGet ( TSHttpTxn  txnp,
char **  hostname,
int *  port 
)

Retrieves the parent proxy hostname and port, if parent proxying is enabled.

If parent proxying is not enabled, TSHttpTxnParentProxyGet() sets hostname to NULL and port to -1.

Parameters:
txnpHTTP transaction whose parent proxy to get.
hostnameof the parent proxy.
portparent proxy's port.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, HttpSM::t_state, HttpTransact::State::api_info, _HttpApiInfo::parent_proxy_name, and _HttpApiInfo::parent_proxy_port.

Referenced by checkHttpTxnParentProxy().

tsapi void TSHttpTxnParentProxySet ( TSHttpTxn  txnp,
char *  hostname,
int  port 
)

Sets the parent proxy name and port.

The string hostname is copied into the TSHttpTxn; you can modify or delete the string after calling TSHttpTxnParentProxySet().

Parameters:
txnpHTTP transaction whose parent proxy to set.
hostnameparent proxy host name string.
portparent proxy port to set.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, sdk_sanity_check_null_ptr(), HttpSM::t_state, HttpTransact::State::api_info, _HttpApiInfo::parent_proxy_name, HttpTransact::State::arena, Arena::str_store(), and _HttpApiInfo::parent_proxy_port.

Referenced by checkHttpTxnParentProxy().

tsapi TSReturnCode TSHttpTxnPristineUrlGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc url_loc 
)
tsapi TSReturnCode TSHttpTxnPrivateSessionSet ( TSHttpTxn  txnp,
int  private_session 
)
tsapi int64_t TSHttpTxnPushedRespBodyBytesGet ( TSHttpTxn  txnp)
tsapi int TSHttpTxnPushedRespHdrBytesGet ( TSHttpTxn  txnp)
tsapi void TSHttpTxnReenable ( TSHttpTxn  txnp,
TSEvent  event 
)

Notifies the HTTP transaction txnp that the plugin is finished processing the current hook.

The plugin tells the transaction to either continue (TS_EVENT_HTTP_CONTINUE) or stop (TS_EVENT_HTTP_ERROR).

You must always reenable the HTTP transaction after the processing of each transaction event. However, never reenable twice. Reenabling twice is a serious error.

Parameters:
txnptransaction to be reenabled.
eventtells the transaction how to continue:
  • TS_EVENT_HTTP_CONTINUE, which means that the transaction should continue.
  • TS_EVENT_HTTP_ERROR which terminates the transaction and sends an error to the client if no response has already been sent.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, this_ethread(), EThread::tt, REGULAR, eventProcessor, EventProcessor::schedule_imm(), NEW, ET_NET, MUTEX_TRY_LOCK, Continuation::mutex, and HttpSM::state_api_callback().

Referenced by mytest_handler(), ssn_handler(), cache_hook_handler(), transform_hook_handler(), altinfo_hook_handler(), cont_test_handler(), and PrefetchPlugin().

tsapi void TSHttpTxnReqCacheableSet ( TSHttpTxn  txnp,
int  flag 
)
tsapi void TSHttpTxnRespCacheableSet ( TSHttpTxn  txnp,
int  flag 
)
tsapi struct sockaddr const* TSHttpTxnServerAddrGet ( TSHttpTxn  txnp) [read]

Get the origin server address.

Note:
The pointer is valid only for the current callback. Clients that need to keep the value across callbacks must maintain their own storage.
Returns:
The address of the origin server for transaction txnp.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, HttpSM::t_state, and HttpTransact::State::server_info.

Referenced by checkHttpTxnServerIPGet().

tsapi TSReturnCode TSHttpTxnServerAddrSet ( TSHttpTxn  txnp,
struct sockaddr const *  addr 
)

Set the origin server address.

This must be invoked before the origin server address is looked up. If called no lookup is done, the address addr is used instead.

Returns:
TS_SUCCESS if the origin server address is set, TS_ERROR otherwise.
Parameters:
addrAddress for origin server.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, ats_ip_copy(), HttpSM::t_state, HttpTransact::State::server_info, HttpTransact::State::api_server_addr_set, and TS_ERROR.

tsapi void TSHttpTxnServerIntercept ( TSCont  contp,
TSHttpTxn  txnp 
)

Allows a plugin take over the servicing of the request as though it was the origin server.

In the event a request needs to be made to the server for transaction txnp, contp will be sent TS_EVENT_NET_ACCEPT. The edata passed with TS_NET_EVENT_ACCEPT is an TSVConn just as it would be for a normal accept. The plugin must act as if it is an http server and read the http request and body off the TSVConn and send an http response header and body.

TSHttpTxnInterceptServer() must be not be called after the connection to the server has taken place. The last hook last hook in that TSHttpTxnIntercept() can be called from is TS_HTTP_READ_CACHE_HDR_HOOK. If a connection to the server is not necessary, contp is not called.

The reponse from the plugin is cached subject to standard and configured http caching rules. Should the plugin wish the response not be cached, the plugin must use appropriate http response headers to prevent caching. The primary purpose of TSHttpTxnInterceptServer() is allow plugins to provide gateways to other protocols or to allow to plugin to it's own transport for the next hop to the server. TSHttpTxnInterceptServer() overrides parent cache configuration.

TSHttpTxnInterceptServer() must only be called once per transaction.

Parameters:
contpcontinuation called to handle the interception
txnptransaction to be intercepted.

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, sdk_sanity_check_continuation(), sdk_sanity_check_null_ptr(), Continuation::mutex, HttpSM::plugin_tunnel_type, HTTP_PLUGIN_AS_SERVER, HttpSM::plugin_tunnel, PluginVCCore::alloc(), and PluginVCCore::set_accept_cont().

Referenced by cont_test_handler().

tsapi TSReturnCode TSHttpTxnServerPacketMarkSet ( TSHttpTxn  txnp,
int  mark 
)

Change packet firewall mark for the server side connection.

Note:
The change takes effect immediately, if no OS connection has been made, then this sets the mark that will be used IF an OS connection is established
Returns:
TS_SUCCESS if the (future?) server connection was modified

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, HttpSM::ua_session, HttpClientSession::get_server_session(), HttpServerSession::get_netvc(), NetVConnection::options, NetVCOptions::packet_mark, NetVConnection::apply_options(), TSHttpTxnConfigIntSet(), and TS_CONFIG_NET_SOCK_PACKET_MARK_OUT.

tsapi TSReturnCode TSHttpTxnServerPacketTosSet ( TSHttpTxn  txnp,
int  tos 
)

Change packet TOS for the server side connection.

Note:
The change takes effect immediately, if no OS connection has been made, then this sets the mark that will be used IF an OS connection is established
TOS is deprecated and replaced by DSCP, this is still used to set DSCP however the first 2 bits of this value will be ignored as they now belong to the ECN field.
Returns:
TS_SUCCESS if the (future?) server connection was modified

References sdk_assert, sdk_sanity_check_txn(), TS_SUCCESS, HttpSM::ua_session, HttpClientSession::get_server_session(), HttpServerSession::get_netvc(), NetVConnection::options, NetVCOptions::packet_tos, NetVConnection::apply_options(), TSHttpTxnConfigIntSet(), and TS_CONFIG_NET_SOCK_PACKET_TOS_OUT.

tsapi int64_t TSHttpTxnServerReqBodyBytesGet ( TSHttpTxn  txnp)
tsapi TSReturnCode TSHttpTxnServerReqGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi int TSHttpTxnServerReqHdrBytesGet ( TSHttpTxn  txnp)
tsapi int64_t TSHttpTxnServerRespBodyBytesGet ( TSHttpTxn  txnp)
tsapi TSReturnCode TSHttpTxnServerRespGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi int TSHttpTxnServerRespHdrBytesGet ( TSHttpTxn  txnp)
tsapi TSServerState TSHttpTxnServerStateGet ( TSHttpTxn  txnp)
tsapi void TSHttpTxnSetHttpRetBody ( TSHttpTxn  txnp,
const char *  body_msg,
int  plain_msg 
)
tsapi void TSHttpTxnSetHttpRetStatus ( TSHttpTxn  txnp,
TSHttpStatus  http_retstatus 
)
tsapi TSHttpSsn TSHttpTxnSsnGet ( TSHttpTxn  txnp)
tsapi void TSHttpTxnTransformedRespCache ( TSHttpTxn  txnp,
int  on 
)
tsapi TSReturnCode TSHttpTxnTransformRespGet ( TSHttpTxn  txnp,
TSMBuffer bufp,
TSMLoc offset 
)
tsapi void TSHttpTxnUntransformedRespCache ( TSHttpTxn  txnp,
int  on 
)
tsapi const char* TSInstallDirGet ( void  )

Gets the path of the directory in which Traffic Server is installed.

Use this function to specify the location of files that the plugin uses.

Returns:
pointer to Traffic Server install directory.

References system_root_dir.

Referenced by SDK_API_TSPluginDirGet(), and SDK_API_TSfopen().

tsapi TSIOBufferBlock TSIOBufferBlockNext ( TSIOBufferBlock  blockp)
tsapi int64_t TSIOBufferBlockReadAvail ( TSIOBufferBlock  blockp,
TSIOBufferReader  readerp 
)
tsapi const char* TSIOBufferBlockReadStart ( TSIOBufferBlock  blockp,
TSIOBufferReader  readerp,
int64_t *  avail 
)
tsapi int64_t TSIOBufferBlockWriteAvail ( TSIOBufferBlock  blockp)
tsapi char* TSIOBufferBlockWriteStart ( TSIOBufferBlock  blockp,
int64_t *  avail 
)
tsapi int64_t TSIOBufferCopy ( TSIOBuffer  bufp,
TSIOBufferReader  readerp,
int64_t  length,
int64_t  offset 
)
tsapi TSIOBuffer TSIOBufferCreate ( void  )
tsapi void TSIOBufferDestroy ( TSIOBuffer  bufp)
tsapi void TSIOBufferProduce ( TSIOBuffer  bufp,
int64_t  nbytes 
)
tsapi TSIOBufferReader TSIOBufferReaderAlloc ( TSIOBuffer  bufp)
tsapi int64_t TSIOBufferReaderAvail ( TSIOBufferReader  readerp)
tsapi TSIOBufferReader TSIOBufferReaderClone ( TSIOBufferReader  readerp)
tsapi void TSIOBufferReaderConsume ( TSIOBufferReader  readerp,
int64_t  nbytes 
)
tsapi void TSIOBufferReaderFree ( TSIOBufferReader  readerp)
tsapi TSIOBufferBlock TSIOBufferReaderStart ( TSIOBufferReader  readerp)
tsapi TSIOBuffer TSIOBufferSizedCreate ( TSIOBufferSizeIndex  index)

Creates a new TSIOBuffer of the specified size.

With this function, you can create smaller buffers than the 32K buffer created by TSIOBufferCreate(). In some situations using smaller buffers can improve performance.

Parameters:
indexsize of the new TSIOBuffer to be created.
newTSIOBuffer of the specified size.

References sdk_assert, TS_IOBUFFER_SIZE_INDEX_128, TS_IOBUFFER_SIZE_INDEX_32K, new_MIOBuffer, sdk_sanity_check_iocore_structure(), and TS_SUCCESS.

Referenced by SDK_API_TSIOBufferProduce(), SDK_API_TSIOBufferReaderConsume(), SDK_API_TSIOBufferReaderClone(), SDK_API_TSIOBufferStart(), and SDK_API_TSIOBufferCopy().

tsapi TSIOBufferBlock TSIOBufferStart ( TSIOBuffer  bufp)
tsapi int64_t TSIOBufferWaterMarkGet ( TSIOBuffer  bufp)

The watermark of an TSIOBuffer is the minimum number of bytes of data that have to be in the buffer before calling back any continuation that has initiated a read operation on this buffer.

TSIOBufferWaterMarkGet() will provide the size of the watermark, in bytes, for a specified TSIOBuffer.

Parameters:
bufpbuffer whose watermark the function gets.

References sdk_assert, sdk_sanity_check_iocore_structure(), TS_SUCCESS, and MIOBuffer::water_mark.

Referenced by SDK_API_TSIOBufferCreate().

tsapi void TSIOBufferWaterMarkSet ( TSIOBuffer  bufp,
int64_t  water_mark 
)

The watermark of an TSIOBuffer is the minimum number of bytes of data that have to be in the buffer before calling back any continuation that has initiated a read operation on this buffer.

As a writer feeds data into the TSIOBuffer, no readers are called back until the amount of data reaches the watermark. Setting a watermark can improve performance because it avoids frequent callbacks to read small amounts of data. TSIOBufferWaterMarkSet() assigns a watermark to a particular TSIOBuffer.

Parameters:
bufpbuffer whose water mark the function sets.
water_markwatermark setting, as a number of bytes.

References sdk_assert, sdk_sanity_check_iocore_structure(), TS_SUCCESS, and MIOBuffer::water_mark.

Referenced by SDK_API_TSIOBufferCreate().

tsapi int64_t TSIOBufferWrite ( TSIOBuffer  bufp,
const void *  buf,
int64_t  length 
)

Writes length bytes of data contained in the string buf to the TSIOBuffer bufp.

Returns the number of bytes of data successfully written to the TSIOBuffer.

Parameters:
bufpis the TSIOBuffer to write into.
bufstring to write into the TSIOBuffer.
lengthof the string buf.
Returns:
length of data successfully copied into the buffer, in bytes.

References sdk_assert, sdk_sanity_check_iocore_structure(), TS_SUCCESS, sdk_sanity_check_null_ptr(), and MIOBuffer::write().

Referenced by SDK_API_TSIOBufferCopy(), SDK_API_TSIOBufferBlockReadAvail(), and SDK_API_TSIOBufferBlockNext().

tsapi int TSIsDebugTagSet ( const char *  t)
tsapi TSMBuffer TSMBufferCreate ( void  )
tsapi TSReturnCode TSMBufferDestroy ( TSMBuffer  bufp)

Ignores the reference count and destroys the marshal buffer bufp.

The internal data buffer associated with the marshal buffer is also destroyed if the marshal buffer allocated it.

Parameters:
bufpmarshal buffer to be destroyed.

References isWriteable(), TS_ERROR, sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, HdrHeapSDKHandle::m_heap, and HdrHeap::destroy().

Referenced by SDK_API_TSUrl(), SDK_API_TSHttpHdr(), SDK_API_TSMimeHdrField(), SDK_API_TSHttpHdrParse(), SDK_API_TSMimeHdrParse(), and SDK_API_TSUrlParse().

tsapi TSReturnCode TSMgmtCounterGet ( const char *  var_name,
TSMgmtCounter result 
)
tsapi TSReturnCode TSMgmtFloatGet ( const char *  var_name,
TSMgmtFloat result 
)
tsapi TSReturnCode TSMgmtIntCreate ( TSRecordType  rec_type,
const char *  name,
TSMgmtInt  data_default,
TSRecordUpdateType  update_type,
TSRecordCheckType  check_type,
const char *  check_regex,
TSRecordAccessType  access_type 
)
tsapi TSReturnCode TSMgmtIntGet ( const char *  var_name,
TSMgmtInt result 
)
tsapi TSReturnCode TSMgmtStringCreate ( TSRecordType  rec_type,
const char *  name,
const TSMgmtString  data_default,
TSRecordUpdateType  update_type,
TSRecordCheckType  check_type,
const char *  check_regex,
TSRecordAccessType  access_type 
)
tsapi TSReturnCode TSMgmtStringGet ( const char *  var_name,
TSMgmtString result 
)
tsapi void TSMgmtUpdateRegister ( TSCont  contp,
const char *  plugin_name 
)
tsapi TSReturnCode TSMimeHdrClone ( TSMBuffer  dest_bufp,
TSMBuffer  src_bufp,
TSMLoc  src_hdr,
TSMLoc locp 
)

Copies a specified MIME header to a specified marshal buffer, and returns the location of the copied MIME header within the destination marshal buffer.

Unlike TSMimeHdrCopy(), you do not have to create the destination MIME header before cloning. Release the returned TSMLoc handle with a call to TSHandleMLocRelease().

Parameters:
dest_bufpdestination marshal buffer.
src_bufpsource marshal buffer.
src_hdrlocation of the source MIME header.
locpwhere to store the location of the copied MIME header.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), sdk_sanity_check_null_ptr(), isWriteable(), TS_ERROR, _hdr_mloc_to_mime_hdr_impl(), and mime_hdr_clone().

tsapi TSReturnCode TSMimeHdrCopy ( TSMBuffer  dest_bufp,
TSMLoc  dest_offset,
TSMBuffer  src_bufp,
TSMLoc  src_offset 
)

Copies the contents of the MIME header located at src_loc within src_bufp to the MIME header located at dest_loc within dest_bufp.

TSMimeHdrCopy() works correctly even if src_bufp and dest_bufp point to different marshal buffers. Important: you must create the destination MIME header before copying into it--use TSMimeHdrCreate().

Parameters:
dest_bufpis the destination marshal buffer.
dest_offset
src_bufpis the source marshal buffer.
src_offset

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), isWriteable(), TS_ERROR, _hdr_mloc_to_mime_hdr_impl(), mime_hdr_fields_clear(), and mime_hdr_copy_onto().

Referenced by SDK_API_TSMimeHdrParse().

tsapi TSReturnCode TSMimeHdrCreate ( TSMBuffer  bufp,
TSMLoc locp 
)

Creates a new MIME header within bufp.

Release with a call to TSHandleMLocRelease().

Parameters:
bufpmarshal buffer to contain the new MIME header.
locpbuffer pointer to contain the MLoc

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_null_ptr(), isWriteable(), TS_ERROR, and mime_hdr_create().

Referenced by SDK_API_TSMimeHdrField(), and SDK_API_TSMimeHdrParse().

tsapi TSReturnCode TSMimeHdrDestroy ( TSMBuffer  bufp,
TSMLoc  offset 
)

Destroys the MIME header located at hdr_loc within bufp.

Parameters:
bufpmarshal buffer containing the MIME header to destroy.
offsetlocation of the MIME header.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), isWriteable(), TS_ERROR, _hdr_mloc_to_mime_hdr_impl(), and mime_hdr_destroy().

Referenced by SDK_API_TSMimeHdrField(), SDK_API_TSHttpHdrParse(), and SDK_API_TSMimeHdrParse().

tsapi TSReturnCode TSMimeHdrFieldAppend ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)

Returns the TSMLoc location of a specified MIME field from within the MIME header located at hdr.

The retrieved_str parameter specifies which field to retrieve. For each MIME field in the MIME header, a pointer comparison is done between the field name and retrieved_str. This is a much quicker retrieval function than TSMimeHdrFieldFind() since it obviates the need for a string comparison. However, retrieved_str must be one of the predefined field names of the form TS_MIME_FIELD_XXX for the call to succeed. Release the returned TSMLoc handle with a call to TSHandleMLocRelease().

Parameters:
bufpmarshal buffer containing the MIME field.
hdrlocation of the MIME header containing the field.
retrieved_strspecifies the field to retrieve. Must be one of the predefined field names of the form TS_MIME_FIELD_XXX.
Returns:
location of the requested MIME field. If the requested field cannot be found, returns 0.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), sdk_sanity_check_field_handle(), isWriteable(), TS_ERROR, _hdr_mloc_to_mime_hdr_impl(), MIMEFieldSDKHandle::mh, mime_field_create(), memcpy, MIMEFieldSDKHandle::field_ptr, ink_assert, MIMEField::m_ptr_name, and mime_hdr_field_attach().

Referenced by SDK_API_TSMimeHdrField(), and SDK_API_TSMimeHdrParse().

tsapi TSReturnCode TSMimeHdrFieldClone ( TSMBuffer  dest_bufp,
TSMLoc  dest_hdr,
TSMBuffer  src_bufp,
TSMLoc  src_hdr,
TSMLoc  src_field,
TSMLoc locp 
)
tsapi TSReturnCode TSMimeHdrFieldCopy ( TSMBuffer  dest_bufp,
TSMLoc  dest_hdr,
TSMLoc  dest_field,
TSMBuffer  src_bufp,
TSMLoc  src_hdr,
TSMLoc  src_field 
)
tsapi TSReturnCode TSMimeHdrFieldCopyValues ( TSMBuffer  dest_bufp,
TSMLoc  dest_hdr,
TSMLoc  dest_field,
TSMBuffer  src_bufp,
TSMLoc  src_hdr,
TSMLoc  src_field 
)
tsapi TSReturnCode TSMimeHdrFieldCreate ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc locp 
)
tsapi TSReturnCode TSMimeHdrFieldCreateNamed ( TSMBuffer  bufp,
TSMLoc  mh_mloc,
const char *  name,
int  name_len,
TSMLoc locp 
)
tsapi TSReturnCode TSMimeHdrFieldDestroy ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)

Destroys the MIME field located at field within bufp.

You must release the TSMLoc field with a call to TSHandleMLocRelease().

Parameters:
bufpcontains the MIME field to be destroyed.
hdrlocation of the parent header containing the field to be destroyed. This could be the location of a MIME header or HTTP header.
fieldlocation of the field to be destroyed.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), sdk_sanity_check_field_handle(), isWriteable(), TS_ERROR, MIMEFieldSDKHandle::mh, ink_release_assert, _hdr_mloc_to_mime_hdr_impl(), ink_assert, mime_hdr_field_delete(), and MIMEFieldSDKHandle::field_ptr.

Referenced by SDK_API_TSMimeHdrField().

tsapi TSMLoc TSMimeHdrFieldFind ( TSMBuffer  bufp,
TSMLoc  hdr,
const char *  name,
int  length 
)

Retrieves the TSMLoc location of a specfied MIME field from within the MIME header located at hdr.

The name and length parameters specify which field to retrieve. For each MIME field in the MIME header, a case insensitive string comparison is done between the field name and name. If TSMimeHdrFieldFind() cannot find the requested field, it returns TS_NULL_MLOC. Release the returned TSMLoc handle with a call to TSHandleMLocRelease().

Parameters:
bufpmarshal buffer containing the MIME header field to find.
hdrlocation of the MIME header containing the field.
nameof the field to retrieve.
lengthstring length of the string name. If length is -1, then name is assumed to be null-terminated.
Returns:
location of the requested MIME field. If the field could not be found, returns TS_NULL_MLOC.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), sdk_sanity_check_null_ptr(), _hdr_mloc_to_mime_hdr_impl(), mime_hdr_field_find(), TS_NULL_MLOC, sdk_alloc_field_handle(), and MIMEFieldSDKHandle::field_ptr.

Referenced by SDK_API_TSMimeHdrField(), SDK_API_TSMimeHdrParse(), transform_hook_handler(), and get_request_id().

tsapi TSMLoc TSMimeHdrFieldGet ( TSMBuffer  bufp,
TSMLoc  hdr,
int  idx 
)

Retrieves the location of a specified MIME field within the MIME header located at hdr_loc within bufp.

The idx parameter specifies which field to retrieve. The fields are numbered from 0 to TSMimeHdrFieldsCount(bufp, hdr_loc) - 1. If idx does not lie within that range then TSMimeHdrFieldGet returns 0. Release the returned handle with a call to TSHandleMLocRelease.

Parameters:
bufpmarshal buffer containing the MIME header.
hdrlocation of the MIME header.
idxindex of the field to get with base at 0.
Returns:
location of the specified MIME field.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), _hdr_mloc_to_mime_hdr_impl(), mime_hdr_field_get(), TS_NULL_MLOC, sdk_alloc_field_handle(), and MIMEFieldSDKHandle::field_ptr.

Referenced by SDK_API_TSMimeHdrField(), and SDK_API_TSMimeHdrParse().

tsapi int TSMimeHdrFieldLengthGet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)
tsapi const char* TSMimeHdrFieldNameGet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int *  length 
)
tsapi TSReturnCode TSMimeHdrFieldNameSet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
const char *  name,
int  length 
)
tsapi TSMLoc TSMimeHdrFieldNext ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)
tsapi TSMLoc TSMimeHdrFieldNextDup ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)
tsapi TSReturnCode TSMimeHdrFieldRemove ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)

Removes the MIME field located at field within bufp from the header located at hdr within bufp.

If the specified field cannot be found in the list of fields associated with the header then nothing is done.

Note: removing the field does not destroy the field, it only detaches the field, hiding it from the printed output. The field can be reattached with a call to TSMimeHdrFieldAppend(). If you do not use the detached field you should destroy it with a call to TSMimeHdrFieldDestroy() and release the handle field with a call to TSHandleMLocRelease().

Parameters:
bufpcontains the MIME field to remove.
hdrlocation of the header containing the MIME field to be removed. This header could be an HTTP header or MIME header.
fieldis the location of the field to remove.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), sdk_sanity_check_field_handle(), isWriteable(), TS_ERROR, MIMEFieldSDKHandle::mh, _hdr_mloc_to_mime_hdr_impl(), ink_assert, mime_hdr_field_detach(), and MIMEFieldSDKHandle::field_ptr.

Referenced by SDK_API_TSMimeHdrParse().

tsapi TSReturnCode TSMimeHdrFieldsClear ( TSMBuffer  bufp,
TSMLoc  offset 
)

Removes and destroys all the MIME fields within the MIME header located at hdr_loc within the marshal buffer bufp.

Parameters:
bufpmarshal buffer containing the MIME header.
offsetlocation of the MIME header.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), isWriteable(), TS_ERROR, _hdr_mloc_to_mime_hdr_impl(), and mime_hdr_fields_clear().

Referenced by SDK_API_TSMimeHdrField().

tsapi int TSMimeHdrFieldsCount ( TSMBuffer  bufp,
TSMLoc  offset 
)

Returns a count of the number of MIME fields within the MIME header located at hdr_loc within the marshal buffer bufp.

Parameters:
bufpmarshal buffer containing the MIME header.
offsetlocation of the MIME header within bufp.
Returns:
number of MIME fields within the MIME header located at hdr_loc.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), _hdr_mloc_to_mime_hdr_impl(), and mime_hdr_fields_count().

Referenced by SDK_API_TSMimeHdrField().

tsapi TSReturnCode TSMimeHdrFieldValueAppend ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx,
const char *  value,
int  length 
)
tsapi time_t TSMimeHdrFieldValueDateGet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)
tsapi TSReturnCode TSMimeHdrFieldValueDateInsert ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
time_t  value 
)
tsapi TSReturnCode TSMimeHdrFieldValueDateSet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
time_t  value 
)
tsapi TSReturnCode TSMimeHdrFieldValueDelete ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx 
)
tsapi int64_t TSMimeHdrFieldValueInt64Get ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx 
)
tsapi TSReturnCode TSMimeHdrFieldValueInt64Set ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx,
int64_t  value 
)
tsapi int TSMimeHdrFieldValueIntGet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx 
)
tsapi TSReturnCode TSMimeHdrFieldValueIntInsert ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx,
int  value 
)
tsapi TSReturnCode TSMimeHdrFieldValueIntSet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx,
int  value 
)
tsapi TSReturnCode TSMimeHdrFieldValuesClear ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)

Modified the string value passed from an empty string ("") to NULL. An empty string is also considered to be a token. The correct value of the field after this function should be NULL.

References sdk_assert, sdk_sanity_check_mbuffer(), TS_SUCCESS, sdk_sanity_check_mime_hdr_handle(), sdk_sanity_check_http_hdr_handle(), sdk_sanity_check_field_handle(), isWriteable(), TS_ERROR, mime_field_value_set(), MIMEFieldSDKHandle::mh, and MIMEFieldSDKHandle::field_ptr.

Referenced by TSMimeHdrFieldValueDateInsert(), and SDK_API_TSMimeHdrField().

tsapi int TSMimeHdrFieldValuesCount ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field 
)
tsapi const char* TSMimeHdrFieldValueStringGet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx,
int *  value_len_ptr 
)
tsapi TSReturnCode TSMimeHdrFieldValueStringInsert ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx,
const char *  value,
int  length 
)
tsapi TSReturnCode TSMimeHdrFieldValueStringSet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,
int  idx,
const char *  value,
int  length 
)
tsapi unsigned int TSMimeHdrFieldValueUintGet ( TSMBuffer  bufp,
TSMLoc  hdr,
TSMLoc  field,