UDP 数据包在特定 PC 中小于 12 字节时会被丢弃.我该如何找出原因?

UDP packets are dropped when its size is less than 12 byte in a certain PC. how do i figure it out the reason?(UDP 数据包在特定 PC 中小于 12 字节时会被丢弃.我该如何找出原因?)
本文介绍了UDP 数据包在特定 PC 中小于 12 字节时会被丢弃.我该如何找出原因?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个以前从未听说过的问题.

i've stuck in a problem that is never heard about before.

我正在制作一个在特定角色动作中使用 UDP 数据包的在线游戏.在我开发了 udp 模块之后,它似乎工作正常.虽然我们的大多数团队成员都没有问题,但是一个人,他是我的老板,告诉我那个模块有问题.

i'm making an online game which uses UDP packets in a certain character action. after i developed the udp module, it seems to work fine. though most of our team members have no problem, but a man, who is my boss, told me something is wrong for that module.

我调查了这个问题,最后我发现......在他的PC上,如果udp数据包大小小于12,数据包永远不会被传递到其他主机.

i have investigated the problem, and finally i found the fact that... on his PC, if udp packet size is less than 12, the packet is never have been delivered to the other host.

以下是一些附加信息:

  • 1~11字节的udp包被丢弃,12字节和12字节以上的包都OK.
  • 操作系统:Microsoft Windows Vista 商业版
  • NIC:Attansic L1 千兆以太网 10/100/1000Base-T 控制器
  • WSASendTo 返回 TRUE.
  • 回送 udp 数据包工作正常.

你如何看待这个问题?你怎么看......是什么导致了这个问题?下一步我该怎么办?

how do you think of this problem? and what do you think... what causes this problem? what should i do for the next step for the cause?

PS.我不想填充使所有数据包的长度达到 12 个字节.

PS. i don't want to padding which makes length of all the packets up to 12 bytes.

推荐答案

只是为了得到一个不明显的答案:可能 UDP 校验和卸载在该卡上被破坏,即数据包已发送,但被接收者丢弃?

Just to get one of the non-obvious answers in: maybe UDP checksum offload is broken on that card, i.e. the packets are sent, but dropped by the receiver?

您可以通过使用 Wireshark 查看接收到的数据包来检查这一点.

You can check for this by looking at the received packets using Wireshark.

这篇关于UDP 数据包在特定 PC 中小于 12 字节时会被丢弃.我该如何找出原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Rising edge interrupt triggering multiple times on STM32 Nucleo(在STM32 Nucleo上多次触发上升沿中断)
How to use va_list correctly in a sequence of wrapper functions calls?(如何在一系列包装函数调用中正确使用 va_list?)
OpenGL Perspective Projection Clipping Polygon with Vertex Outside Frustum = Wrong texture mapping?(OpenGL透视投影裁剪多边形,顶点在视锥外=错误的纹理映射?)
How does one properly deserialize a byte array back into an object in C++?(如何正确地将字节数组反序列化回 C++ 中的对象?)
What free tiniest flash file system could you advice for embedded system?(您可以为嵌入式系统推荐什么免费的最小闪存文件系统?)
Volatile member variables vs. volatile object?(易失性成员变量与易失性对象?)