Reputation: 583
could you help me?
So problem is QOS On IPV6 socket when it connect to IPV4 server
I can't set transport options on package
self.socket = socket(PF_INET6, SOCK_DGRAM, 0); // Create UDP Socket
int on = 1;
setsockopt(self.socket, SOL_SOCKET, SO_NOSIGPIPE, (void *)&on, sizeof(int));
int off = 0;
setsockopt(self.socket, IPPROTO_IPV6, IPV6_V6ONLY, (void *)(&off), sizeof(off)); // Disable IPV6 Only
int option = 46;
// set QOS option
setsockopt(self.socket, IPPROTO_IP, IP_TOS, (void *)(&option),sizeof(option)); // IPV4
setsockopt(self.socket, IPPROTO_IPV6, IPV6_TCLASS, (void *)(&option),sizeof(option)); //IPV6
But when i see packages to IPV4 DSCP is 0
Upvotes: 0
Views: 890
Reputation: 9978
It seems like your kernel doesn't implement the mapping of IPv6 TCLASS to IPv4 DSCP.
The V6ONLY=0 option is mostly a hack to allow servers to accept both IPv4 and IPv6 connections on a single socket. I'm not surprised that only the bare minimum of options is implemented.
Your best option is probably to contact the kernel developers to see if they want to implement the mapping...
Upvotes: 2