MCPcopy Create free account
hub / github.com/apache/trafficserver / TSHttpTxnTypeGet

Function TSHttpTxnTypeGet

src/api/InkAPI.cc:9020–9036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9018}
9019
9020TSTxnType
9021TSHttpTxnTypeGet(TSHttpTxn txnp)
9022{
9023 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
9024 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
9025 TSTxnType retval = TS_TXN_TYPE_UNKNOWN;
9026 if (sm != nullptr) {
9027 if (sm->t_state.transparent_passthrough) {
9028 retval = TS_TXN_TYPE_TR_PASS_TUNNEL;
9029 } else if (sm->t_state.client_info.port_attribute == HttpProxyPort::TRANSPORT_BLIND_TUNNEL) {
9030 retval = TS_TXN_TYPE_EXPLICIT_TUNNEL;
9031 } else {
9032 retval = TS_TXN_TYPE_HTTP;
9033 }
9034 }
9035 return retval;
9036}

Callers 2

tunnelStartFunction · 0.85
transactionStartFunction · 0.85

Calls 1

sdk_sanity_check_txnFunction · 0.85

Tested by

no test coverage detected