Setting DIFFSERV/DSCP with GQOS for specific socket in c
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.
开发者_JAVA技巧I would be very grateful if anyone of you have a working example he/she could share.
However, the following workarounds are not acceptable:
- Using the QOS2 api - it's only available on Vista and up (and I'll use it there)
- 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.
- Using SetSockOpt with IP_TOS - it's deprecated in XP, was not meant for setting the DSCP field and requires changing the registery.
Thanks!
精彩评论