79362977

Date: 2025-01-16 20:25:14
Score: 0.5
Natty:
Report link

Setting the DSCP on a socket can be done like this: socket_.set_option(boost::asio::detail::socket_option::integer<IPPROTO_IP, IP_TOS>(value << 2))

(Note the left shift to set the 6 most significant bits and clears the ecn bits.

For verifying whether the socket sets the correct DSCP values I suggest you use Wireshark or if you need to test programmatically something like pcap or bpf.

Reasons:
  • No code block (0.5):
Posted by: Ruurd Adema