Hi,
I'm trying to set the DSCP in the IPv4 header for outgoing UDP packets using C++ on Debian. I do the socket configuration with setsockopt and check it afterwards by reading the value back with getsockopt:
Code:
getsockopt(clientsocket, IPPROTO_IP, IP_TOS, &tos, sizeof(tos))
...
getsockopt(clientsocket, IPPROTO_IP, IP_TOS, &check_tos, &check_tos_len)
Afterwards, I'm sending a packet using sendto(). Nevertheless, if I check the outgoing UDP packet using wireshark it seems that the DSCP value is 0x00 (default).
What am I doing wrong? Is the DSCP reset by the operating system be default?
many thanks!