开发者

IcmpSendEcho and setting MTU size?

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

I'开发者_JAVA百科m trying to do this under Windows using the IcmpSendEcho() function.


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?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜