Hi,
I have some QOS code in a product that is working fine. We’re
porting that code to using the socket support in ASIO and the QOS code doesn’t
seem to be working any longer. We’re using WinXP under both environments
and running our old code works fine but the new code has issues. Setting the
TOS bits via:
::setsockopt(mSocket.native(),
IPPROTO_IP, IP_TOS, (char *)(&uiTOS), sizeof(uiTOS))
Works fine, but setting the service type does not. We’re
making the following call:
DWORD dwBytesReturned = 0;
bool
bSuccess = (SOCKET_ERROR != ::WSAIoctl(
mSocket.native(),
SIO_SET_QOS,
(void *)reinterpret_cast<const BYTE *>(&tQOS),
sizeof(tQOS),
NULL,
0,
&dwBytesReturned,
NULL,
NULL
));
With values such as:
SocketAddress bytes: 0200fc22c0a863670000000000000000
===RX===
TokenRate: -1
TokenBucketSize: -1
PeakBandwidth: -1
Latency: -1
DelayVariation: -1
ServiceType: 6
MaxSduSize: -1
MinimumPolicedSize: -1
===TX===
TokenRate: 4600
TokenBucketSize: -1
PeakBandwidth: -1
Latency: -1
DelayVariation: -1
ServiceType: 2
MaxSduSize: -1
MinimumPolicedSize: -1
And it returns success, but the DSCP bits in the packets are
not being set. If we call SIO_GET_QOS afterwards we always get back the default:
SocketAddress bytes: <NULL>
===RX===
TokenRate: -1
TokenBucketSize: -1
PeakBandwidth: -1
Latency: -1
DelayVariation: -1
ServiceType: 1
MaxSduSize: -1
MinimumPolicedSize: -1
===TX===
TokenRate: -1
TokenBucketSize: -1
PeakBandwidth: -1
Latency: -1
DelayVariation: -1
ServiceType: 1
MaxSduSize: -1
MinimumPolicedSize: -1
Is there something different about the sockets
implementation used by ASIO that prevents the WSAIoctl() call from
working correctly?
Dominique
Lacerte
Senior
Software Engineer
CounterPath
Corporation
T
250.380.0584 x1368
M
250.595.1362