f***@gmail.com
2012-06-06 08:06:31 UTC
Dear all,
for an application I am developing, I would like to set the ECN bits in outgoing UDP packets. As I understand, I could use setsockopt() to set the TOS byte in the IP header, but I read in "man 7 socket"
IP_TOS (since Linux 1.0)
Set or receive the Type-Of-Service (TOS) field
...
There are some standard TOS flags defined:
IPTOS_LOWDELAY ...
Other bits are invalid and shall be cleared
If I understand the man page correctly, the ECN bits (that are part of the TOS byte) cannot be set using setsockopt(). (Unfortunately I cannot test this right now).
Am I correct? Do you know about an alternative way to set the ECN bits? Is my only option to use raw sockets?
for an application I am developing, I would like to set the ECN bits in outgoing UDP packets. As I understand, I could use setsockopt() to set the TOS byte in the IP header, but I read in "man 7 socket"
IP_TOS (since Linux 1.0)
Set or receive the Type-Of-Service (TOS) field
...
There are some standard TOS flags defined:
IPTOS_LOWDELAY ...
Other bits are invalid and shall be cleared
If I understand the man page correctly, the ECN bits (that are part of the TOS byte) cannot be set using setsockopt(). (Unfortunately I cannot test this right now).
Am I correct? Do you know about an alternative way to set the ECN bits? Is my only option to use raw sockets?