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

Function TSHttpTxnServerPacketMarkSet

src/api/InkAPI.cc:4777–4796  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4775}
4776
4777TSReturnCode
4778TSHttpTxnServerPacketMarkSet(TSHttpTxn txnp, int mark)
4779{
4780 sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS);
4781 HttpSM *sm = reinterpret_cast<HttpSM *>(txnp);
4782
4783 // change the mark on an active server session
4784 ProxyTransaction *ssn = sm->get_server_txn();
4785 if (nullptr != ssn) {
4786 NetVConnection *vc = ssn->get_netvc();
4787 if (vc != nullptr) {
4788 vc->options.packet_mark = static_cast<uint32_t>(mark);
4789 vc->apply_options();
4790 }
4791 }
4792
4793 // update the transactions mark config for future connections
4794 TSHttpTxnConfigIntSet(txnp, TS_CONFIG_NET_SOCK_PACKET_MARK_OUT, mark);
4795 return TS_SUCCESS;
4796}
4797
4798TSReturnCode
4799TSHttpTxnClientPacketDscpSet(TSHttpTxn txnp, int dscp)

Callers 2

SetMarkMethod · 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