【发布时间】:2019-07-28 23:06:44
【问题描述】:
如何识别自定义 Wireshark 解析器中丢失的 UDP 帧?
我为CQS feed (reference page) 编写了一个自定义解析器。接收此提要时,我们的其中一个服务器出现故障。根据 Wireshark 的说法,某些 UDP 帧从未被接收到。我知道帧已发送,因为我们所有其他服务器都没有间隙。
一个 CQS 帧由多个消息组成,每个消息都有自己的序列号。我的自定义解析器向 Wireshark 提供以下数据:
cqs.frame_gaps - the number of gaps within a UDP frame (always zero)
cqs.frame_first_seq - the first sequence number in a UDP frame
cqs.frame_expected_seq - the first sequence number expected in the next UDP frame
cqs.frame_msg_count - the number of messages in this UDP frame
我尝试向我的解析器添加代码,该代码仅保存最后处理的序列号(作为本地静态),并在解析器处理 current_sequence != (previous_sequence + 1) 的帧时标记间隙。这不起作用,因为可以随机访问顺序调用解析器,具体取决于您在 GUI 中单击的位置。所以你可以处理第 10 帧,然后是第 15 帧,然后是第 11 帧,等等。
我的解剖器有什么方法可以知道它之前的帧(或后面的帧)是否丢失?
解析器是用 C 编写的。
【问题讨论】:
标签: c networking wireshark wireshark-dissector