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

Function TSHttpTxnServerPacketDscpSet

src/api/InkAPI.cc:4817–4836  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4815}
4816
4817TSReturnCode
4818TSHttpTxnServerPacketDscpSet(TSHttpTxn txnp, int dscp)
4819{
4820 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
4821 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
4822
4823 // change the tos on an active server session
4824 ProxyTransaction *ssn = sm->get_server_txn();
4825 if (nullptr != ssn) {
4826 NetVConnection *vc = ssn->get_netvc();
4827 if (vc != nullptr) {
4828 vc->options.packet_tos = static_cast<uint32_t>(dscp) << 2;
4829 vc->apply_options();
4830 }
4831 }
4832
4833 // update the transactions mark config for future connections
4834 TSHttpTxnConfigIntSet(txnp, TS_CONFIG_NET_SOCK_PACKET_TOS_OUT, dscp << 2);
4835 return TS_SUCCESS;
4836}
4837
4838// Set the body, or, if you provide a null buffer, clear the body message
4839void

Callers 2

SetDscpMethod · 0.85

Calls 5

sdk_sanity_check_txnFunction · 0.85
TSHttpTxnConfigIntSetFunction · 0.85
get_server_txnMethod · 0.80
get_netvcMethod · 0.45
apply_optionsMethod · 0.45

Tested by

no test coverage detected