The short version: I am trying to set the IP_TOS field on the traffic my application is sending and even though setsockopt returns successfully and getsockopt returns the correct IP_TOS value, the traffic is untagged when leaving the Windows 10 box.
The longer version: I have an application that sends traffic that needs to have the IP_TOS field set and the IP_TOS value can be one in a range of values; it's an environment requirement so there is no way around it. The application also needs to be cross-platform (Windows 10 and Linux). Considering those requirements, we decided to just use boost asio and set the IP_TOS on the socket when it's created.
The Linux side works the way we want, socket is created, IP_TOS is set, data is sent, and tcpdump shows the data is correctly tagged on the send and receive sides.
The Windows side does everything except for actually tag the traffic. The socket is created, IP_TOS is set and read back to verify before sending, however wireshark/tcpdump shows that the traffic is not tagged at all (IP_TOS is 0). When we started to see issues with this, we created a simple test app using normal Windows TCP sockets, set and read IP_TOS using setsockopt and getsockopt and still had the same issues.
My google-fu can be weak at times, but information on Windows 10 support of IP_TOS seems rather sparse. I have one MSDN Doc say both to not use it (instead use the QoS API) but that it's supported in Windows 10 which I assumed meant it could be set. I also have an older support doc that says support has to be enabled, but I can't find a more recent document relevant to Windows 10. I did try the registry tweak, plus a second one (Do not use NLA) and that didn't help.
I'm at a bit of a loss now, so I'm hoping someone has dealt with this before and has a solution to setting IP_TOS on a socket. Really trying to avoid bringing in another API or making calls outside the application (netsh or group policy) to achieve something that should be simple.