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

Function TSHttpTxnClientPacketDscpSet

src/api/InkAPI.cc:4798–4815  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4796}
4797
4798TSReturnCode
4799TSHttpTxnClientPacketDscpSet(TSHttpTxn txnp, int dscp)
4800{
4801 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
4802 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
4803 if (nullptr == sm->get_ua_txn()) {
4804 return TS_ERROR;
4805 }
4806
4807 NetVConnection *vc = sm->get_ua_txn()->get_netvc();
4808 if (nullptr == vc) {
4809 return TS_ERROR;
4810 }
4811
4812 vc->options.packet_tos = static_cast<uint32_t>(dscp) << 2;
4813 vc->apply_options();
4814 return TS_SUCCESS;
4815}
4816
4817TSReturnCode
4818TSHttpTxnServerPacketDscpSet(TSHttpTxn txnp, int dscp)

Callers 3

execMethod · 0.85
SetDscpMethod · 0.85

Calls 4

sdk_sanity_check_txnFunction · 0.85
get_ua_txnMethod · 0.80
get_netvcMethod · 0.45
apply_optionsMethod · 0.45

Tested by

no test coverage detected