UDP 数据包未被 Wireshark 捕获,但被 UDP 应用程序捕获 [英] UDP Packet not captured by Wireshark, but is captured by UDP application

查看:22
本文介绍了UDP 数据包未被 Wireshark 捕获,但被 UDP 应用程序捕获的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个设计和工作的应用程序在端口上接收 UDP 广播.该应用程序一直运行良好,但我想将应用程序接收到的数据包与 Wireshark 捕获进行比较.我正在努力确保以最小的数据丢失捕获尽可能多的数据包.

I have an application that is designed and working that is receiving UDP broadcasts on a port. The application has been working just fine, but I have wanted to compare the packets received by the application with a Wireshark capture. I'm trying to make sure that I'm capturing as many of the packets as possible with minimal data loss.

我最初以为我会运行 Wireshark 并将捕获的原始数据包与我们应用程序中显示的数据包进行比较.但是,当我运行 Wireshark 时,永远不会在该端口的 IP 层捕获数据包.我看到来自服务器的其他流量,但我从未看到此特定端口的 Wireshare 数据包.

I initially thought that I'd run Wireshark and compare the raw packets captured against the packets shown in our application. However, when I run Wireshark, the packets are never captured at the IP layer for that port. I see other traffic from the server, but I never see Wireshare packets for this specific port.

应用程序继续捕获数据就好了.当我查看 IP src/dest 字段时,src 看起来是正确的,10.12.10.42,但是目标 IP 地址是 0.0.0.0.我本来希望用 255.255.255.255 代替目标地址.

The application continues to capture the data just fine. When I look at the IP src/dest fields, the src looks correct, 10.12.10.42, however the destination IP address is 0.0.0.0. I would have expected something like 255.255.255.255 instead for the destination address.

我无权访问正在广播数据的应用程序,但我确实编写了一个快速示例 UDP 广播器和接收器,以确保我的期望是正确的.示例应用程序按预期工作.

I don't have access to the application that is broadcasting the data, but I did write a quick sample UDP broadcaster and receiver to make sure I my expectations were correct. the sample application worked as expected.

关于为什么 UDP 广播会被应用程序接收,但不会出现在 Wireshark 捕获中的任何想法?Wireshark 会忽略像 0.0.0.0 这样的地址而不捕获它吗?

Any ideas on why a UDP broadcast would be received by an application, but not show up in a Wireshark capture? Does Wireshark ignore an address like 0.0.0.0 and not capture it all?

推荐答案

Wireshark 仅捕获通过您正在侦听的接口的以太网帧.因此,不会捕获发往环回地址的数据包.我会检查你机器的路由表,看看数据包的实际去向.

Wireshark only captures Ethernet frames that are going through an interface you are listening on. Thus, packets destined on loopback addresses are not captured. I would check your machine's routing tables to see where packets are actually going.

这篇关于UDP 数据包未被 Wireshark 捕获,但被 UDP 应用程序捕获的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆