GNOME Bugzilla – Bug 667858
Add support for setting Type Of Service on IP sockets
Last modified: 2012-12-12 09:50:03 UTC
See summary, this can be done on Unix with setsockopt() and IP_TOS/IPV6_TCLASS
...and this should of course not be used for the "old" TOS but for DSCP (RFC 2474) and ECN (RFC 3168).
There was discussion in bug 623187 about how much we want to expose random sockopts, because there are a more-or-less infinite number of them, and we can't wrap them all... Between that bug and bug 626589, I decided the goal should be have GSocket methods for things that "lots" of programs would need, and just make it easy to use setsockopt() directly if you need to set a more obscure option. Alas, I don't really have a good sense of which options are needed by "lots" of programs and which aren't. :-} Copying at least what GNet implements probably makes sense. Since the last discussion in 623187 I was thinking about maybe also having a GSocket wrapper specifically for int-valued sockopts (which is 90% of them really). Eg, it would cover IP_TOS, IP_MULTICAST_LOOP, SO_BROADCAST, etc.
duping this to 623187, which now has a patch for g_socket_set_option() *** This bug has been marked as a duplicate of bug 623187 ***