开发者

Setting DIFFSERV/DSCP with GQOS for specific socket in c

开发者 https://www.devze.com 2022-12-18 10:12 出处:网络
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

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:

  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!

0

精彩评论

暂无评论...
验证码 换一张
取 消