ATS hook EVENT

2016-12-02  本文已影响0人  wanrui

# ATS hook EVENT

```c

/**

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

- TS_HTTP_RESPONSE_TRANSFORM_HOOK

- TS_HTTP_RESPONSE_CLIENT_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_RESPONSE_CLIENT_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_VCONN_PRE_ACCEPT_HOOK - Called before the SSL hand

shake starts.  No handshake data has been read or sent (from the

proxy) at this point

TS_HTTP_LAST_HOOK _must_ be the last element. Only right place

to insert a new element is just before TS_HTTP_LAST_HOOK.

*/

```

上一篇 下一篇

猜你喜欢

热点阅读