wireshark 中的 UDP[number] 含义

UDP[number] in wireshark meaning

我们添加UDP[50]时在wire shark数据过滤选项中,那么这个50是什么,是索引吗?我在 UDP[50] 处有十六进制值 93。在附加的屏幕截图中,值 93 位于 udp[50],但该索引的起点在哪里,就像 udp[0] 在哪里一样。 我想知道 wire shark 数据包下数据的起始索引。这是什么 UDP[这个号码]??

udp[x]开始于传输层(如UDP)的开头,从零开始。 UDP header 是 8 个字节,因此在过滤负载时需要考虑这 8 个字节。

举几个例子:

udp[0-1] == 0035 # Match bytes 0 to 1 (UDP source port)
udp[0:2] == 0035 # Match 2 bytes starting from 0 (same as above)

udp[8-10] == 5600:22 # Match bytes 8 to 10 (First 3 bytes of UDP payload)
udp[8:3] == 5600:22 # Matches 3 bytes starting from 8 (same as above)

如果您的负载被解码为数据,您也可以使用 data.data[x],这样您就不必将过滤器偏移 8。不过要小心,因为它不会匹配 Wireshark将 UDP 负载解码为其他协议。