python (windows) 丢弃 UDP 数据包?

发布于 2025-01-18 14:02:55 字数 1171 浏览 1 评论 0原文

我在这里看到了与其他人相同的事情:

Windows,UDP 数据包默默丢弃

< a href="https://stackoverflow.com/questions/54634889/python-dropping-udp-packet-that-wireshark-sees">Python 丢弃 WireShark 的 UDP 数据包看到

(Windows 10,Python 3.6) - 在我的例子中,我正在与设备交谈(运行LWiP的嵌入式系统) 我向它发送一系列命令(大约N = 100),每个命令都有一个UDP响应,命令往往很短,大多小于20字节,响应大小相同,但有些很大(1200字节)

有时Python不会收到响应 UDP 数据包 - 是的,我知道 UDP 不可靠{flame: ON,请不要跟我一起去那里,flame: OFF}

  1. 我在工作实验室的专用网络上,有最小的 交通。
  2. 在windows盒子上(通过wireshark)我看到了响应
  3. 但是-python没有看到响应。
  4. 该死的系统今天早上工作了,今天下午就不行了。
  5. 这种情况以前发生过,然后就消失了 - 然后它决定“F-you”今天是星期四,今天不起作用,只是因为......
  6. 我无法改变 5 人年的开发在这一点上,很多东西会变更、嵌入式代码、现场设备、测试自动化、验证脚本——大量的Python——这将是一个没有人会接受的历史性的努力水平。

我需要这种丢弃的原因更加可靠或更容易理解,而不是无缘无故地丢弃数据包。我没有简单的方法来调试为什么我的 pythons 脚本会这样做(我假设它是 python,我无法证明这一点。

在 Linux 上 - 我可以这样做 - 在 Linux 上我会使用 STRACE() 并跟踪系统调用,并查看输出日志中的返回值 - 但这是 Windows,没有 strace()

有关该问题的更多信息:

我与 LWip STACK 交谈,在循环中我向它发送一个查询,给我数据项 X 到 Y,设备响应,然后我请求下一个范围 - 根据查询的内容,在返回空列表之前有 2 到 3 个循环,

然后它突然说:“不,不会发送该数据包”。 我需要明白为什么:-(

I am seeing the same thing as others here:

Windows, UDP packets silently dropped

And

Python dropping UDP packet that WireShark sees

(Windows 10, Python 3.6) - in my case I am talking to a device (Embedded system running LWiP)
I send it a series of commands (about N=100), each command has a UDP response, commands tend to be short, mostly lessthen 20 bytes, responses are the same size, but some are huge (1200 bytes)

Occasionally Python does not receive a response UDP packet - yea, I know UDP is not reliable {flame: ON, please dont go ther with me, flame: OFF}

  1. I'm on a private network in a lab at work, there is minimal traffic.
  2. On the windows box (via wireshark) I see the response
  3. BUT - python does not see the response.
  4. The damn system worked this morning, and does not this afternoon.
  5. This has happened before, and it goes away - and then it decides 'F-you' it is thursday, It does not work today, just because ...
  6. I cannot change 5 man years of development at this point, lots of stuff would change, embedded code, fielded devices, test automation, validation scripts - tons and tons of Python - that would be a historic level of effort that nobody will accept.

I need the reason for this drop to be far more reliable or understandable, and not drop packets for no damn reason. I have no simple means to debug why my pythons script does this (and I assume it is python, I can't prove this.

on Linux - I could do that - on Linux I would use STRACE() and trace the system calls, and see the return values in the output log - but this is windows, there is no strace()

More about the issue:

I talk to a LWip STACK, In a loop I send it a query, give me data items X to Y, the device responds, then I ask for the next range - depending on what is being queried, there are 2 to 3 loops before it responds with an empty list.

Then it suddenly says: "Nope not going to deliver that packet"
I need to understand why :-(

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

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

发布评论

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