How to set QoS level for UDP packet sent using WSK

Hi,

I have been sending UDP packets using the WSK framework and wish to set the QoS level but have been unable to find out how.
I’ve noticed that the WskSendTo function accepts a ControlInfo parameter but have not found any examples or details about how to use it.

Thanks
Nik

I don’t the answer to this, and for that matter, I don’t really know much about WSK in the big picture, but I believe that QoS has been ‘depreciated’ (http://blogs.msdn.com/wndp/archive/2007/10/09/introduction-to-windows-qos-traffic-control.aspx), and that there are best as I can tell very few examples of using WSK at all, so it wouldn’t be the weirdest thing if there aren’t any for QoS in particular. I imagine you have already, but if not, there is one example in the WDK, though as I recall it doesn’t use WskSendTo either.

As I said, this really isn’t my thing, so hopefully someone will be along shortly with better information.

Good luck,

mm

Thanks for your reply MM.
I had a look in the WDK but didn’t find any examples showing how to use QoS. I found some NDIS driver examples mentioning QoS, but they weren’t too helpful.

If there isn’t any WSK examples, how does one set QoS settings for a UDP packet using TDI?

Thanks
Nik

I managed to get QoS working and thought I’d record it here in case someone else wants to try it.
My actual goal was to control the QoS bits of an 802.11 frame which is possible by manually setting the DSCP bits in the IP header of your packet. To do this I needed to call WskSocket with SOCK_RAW and IPPROTO_UDP as the type and protocol, then call WskControlSocket with WskSetOption, IP_HDRINCL and IPPROTO_IP with a value of TRUE.
After that, any call to WskSendTo must have the header and the payload in the MDL, so I wrote a few helper functions that create correct IP and UDP headers and append the data at the end.

I have found that all the parameters need to be correct for the packet to be sent otherwise it seems to be ignored.

Hope that helps,
Nik