UDP原始数据在应用程序和wireshark中有所不同
我们正在开发一个应用程序来接收来自第三方应用程序的 UDP 广播。 Wireshark 显示 512 字节的数据包。每个数据包都有标头信息。下面是 8 个字节,wireshark 显示
01 00 5E 01 02 05 00 11
我已经创建了一个基于控制台的小型应用程序 C# 来侦听该特定端口。 下面是我得到的前 8 个字节。
04 20 00 01 00 00 04 59
有人可以解释一下吗?
We are developing a application to recieve UDP broadcast from a third party application.
Wireshark shows packets of 512 bytes. Each packet have header information. Below is 8 bytes as wireshark shows
01 00 5E 01 02 05 00 11
I have created a small consol based application C# to listen on that specific port.
Below is what i am geeting as first 8 bytes.
04 20 00 01 00 00 04 59
Can someone explain it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Wireshark 通常会显示整个数据包此处描述。您显示的前 4 个字节可能是端口号(256 和 24065 ...不确定这些在您的情况下是否有意义)。如果您的控制台应用程序正在执行相当于recvfrom的操作,它将包括有效负载部分,但不包括标头。
Wireshark typically shows the entire packet which is described here. The first 4 bytes you show might be the port numbers (256 and 24065 ... not sure if those make sense or not in your case). If your console application is doing something equivalent to a recvfrom, it will include the payload portion but not the header.
正如 Mark Wilkins 所说,Wireshark 显示整个数据包,直至并包括链路层标头。
要查看您感兴趣的数据,请按照下列步骤操作:
在窗口的中间框架中,应该有一堆行 - 第一行以“Frame”之类的内容开头。倒数第二个应该是“用户数据报协议”,最后一个应该是“数据”。单击最后一个,然后它应该在窗口底部框架中突出显示实际的 UDP 负载字节。
As Mark Wilkins says, Wireshark is showing the entire packet, up to and including the link layer headers.
To see the data you're interested in, follow these steps:
In the middle frame of the window, there should be a bunch of lines - the first one starts with something like "Frame". The second-last one should be "User Datagram Protocol", and the last one "Data". Click on the last one, and it should then highlight the actual UDP payload bytes in the bottom frame of the window.