I have a scenario where a client opens a TCP connection to a server after setting some IP TOS value ( setsockopt(.., IP_TOS, ..)
). On the server, I want to get the received TOS value and set it on the socket so that the received TOS is reflected back to the server-client packages.
Server-side issue, how can I get the TOS value received from the client? I can assume that the client will not change the TOS value during the whole session, therefore it is enough to get and set the default TOS value.
Configure IP_RECVTOS
and use supporting data for UDP, but not for TCP sockets. How can one achieve something like this in TCP sockets? getsockopt(2)
with SO_PRIORITY
or IP_TOS
returns the configured values ββon the local socket. Therefore, if I did locally setsockopt()
, then getsockopt()
reflects this value. It does not reflect what is received on the network.
SanjayT
source share