IcmpSendEcho 和设置 MTU 大小?

发布于 2024-08-17 15:26:01 字数 105 浏览 3 评论 0原文

有谁知道是否可以在发送 ICMP 回显数据包(使用 IcmpSendEcho)时调整 MTU?

我正在尝试使用 IcmpSendEcho() 函数在 Windows 下执行此操作。

Does anyone know if its possible to adjust the MTU while sending an ICMP echo packet (with IcmpSendEcho)?

I'm trying to do this under Windows using the IcmpSendEcho() function.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

や莫失莫忘 2024-08-24 15:26:01

最大传输单元 (MTU) 是网络子系统的一个属性,它不能即时更改。例如,典型以太网的最大 MTU 为 1,500 字节。

如果要调整请求的大小,则看起来好像 IcmpSendEcho() 是要发送的数据的大小。

如果您尝试实现路径 MTU 发现,这是调整大小的方法您的传出请求,以确定主机允许的最大 MTU 是多少。请注意,您还需要设置 DF(不分段)IPv4 header 位。

你想达到什么目的?

The maximum transmission unit (MTU) is a property of your network subsystem, it's not something that can be changed on the fly. Typical Ethernet, for instance, has a maximum MTU of 1,500 bytes.

If you want to adjust the size of the request, it looks as if the fourth argument to IcmpSendEcho() is the size of the data to send.

If you're trying to implement path MTU discovery this is the way to adjust the size of your outgoing request, to figure out what the maximum allowable MTU to a host is. Note that you also need to set the DF (don't fragment) IPv4 header bit.

What are you trying to achieve?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文