views:

280

answers:

0

I need to set the DSCP field of packets sent from a specific (tcp) socket in windows XP.

It seems that the GQOS API should serve this purpose (see http://blogs.msdn.com/wndp/archive/2006/07/05/657196.aspx) but I really, really, can't find any working example or figure how to use it on my own.

I would be very grateful if anyone of you have a working example he/she could share.

However, the following workarounds are not acceptable:

  1. Using the QOS2 api - it's only available on Vista and up (and I'll use it there)
  2. Using the TC api - it's not specific to a given socket (it tries to match outgoing packets to a filter) and requires admin rights to use 3.
  3. Using SetSockOpt with IP_TOS - it's deprecated in XP, was not meant for setting the DSCP field and requires changing the registery.

Thanks!