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 字节时会被丢弃.我该如何找出原因?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:UDP 数据包在特定 PC 中小于 12 字节时会被丢弃.我

基础教程推荐