简体   繁体   English

C /确定接收到的UDP数据包的内容

[英]C / determining content of received UDP packet

When receiving a UDP packet, where I do not know neither content nor structure, how can I find out what the content is? 当我收到既不知道内容又不知道结构的UDP数据包时,如何找出内容是什么? Is that possible somehow? 有可能吗? Wireshark tells me the data is: 12:03:01:00:00:00:00:00:1f:44:fe:a2:07:e2:4c:28:00:15:e1:e0:00:80:12:61 Wireshark告诉我数据是: 12:03:01:00:00:00:00:00:1f:44:fe:a2:07:e2:4c:28:00:15:e1:e0:00:80:12:61

The question is just about the data itself, not header of lower layers. 问题仅在于数据本身,而不是较低层的标头。

Thanks in advance for your help. 在此先感谢您的帮助。

Wireshark shows UDP header. Wireshark显示UDP标头。 There is 2 port numbers. 有2个端口号。 Usually another port number is reserved for the used protocol (not always). 通常,另一个端口号是为使用的协议保留的(并非总是如此)。 You may look from the port reservation table which is the used protocol. 您可以从端口保留表中查看所使用的协议。

And if you are lucky, you find the protocol specification from Web and you can open the content of the packet. 如果幸运的话,您可以从Web找到协议规范,然后可以打开数据包的内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM