使用 GQOS 为 c 中的特定套接字设置 DIFFSERV/DSCP

发布于 2024-08-19 22:42:12 字数 548 浏览 1 评论 0原文

我需要设置从 Windows XP 中的特定 (tcp) 套接字发送的数据包的 DSCP 字段。

看来 GQOS API 应该满足此目的(请参阅 http: //blogs.msdn.com/wndp/archive/2006/07/05/657196.aspx),但我真的,真的找不到任何工作示例或弄清楚如何自己使用它。

如果你们中有人可以分享一个可行的例子,我将非常感激。

但是,以下解决方法是不可接受的:

  1. 使用 QOS2 api - 它仅在 Vista 及更高版本上可用(我将在那里使用它)
  2. 使用 TC api - 它不特定于给定套接字(它尝试将传出数据包与过滤器)并且需要管理员权限才能使用 3.
  3. 将 SetSockOpt 与 IP_TOS 一起使用 - 它在 XP 中已弃用,不适用于设置 DSCP 字段,并且需要更改注册表。

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文