ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Conversation and TCP reassembly

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Thu, 31 Jul 2008 19:37:07 +0200
Hi,

Guard creating a new conversation (conversation_new) by first checking if such conversation already exists (find_conversation). Then try to get the protocol data before creating and adding a new protocol data structure.

Thanx,
Jaap

Jens Steinhauser wrote:
Hi,

I wrote a dissector for a protocol that runs atop of UDP and TCP. It
uses conversations to save information from "Configuration Frames" that
is needed to dissect the "Data Frames" later on. I also used the method
with 'tcp_dissect_pdus()' to handle segmented PDUs.

Everything works fine, except in the case when the frame that sets up
the conversation is segmented. Then the dissector is only called at the
first run for this frame (the output from "tshark -V" looks good, I also
used gdb to prove this), but not when I click the packet list to view
the details for this frame. The "Reassembled TCP" tab is missing and the
details pane only lists the "Frame, Ethernet, IP, and TCP" trees.

When I comment out the two lines:

conversation = conversation_new(pinfo->fd->num, ...);
conversation_add_proto_data(conversation, ...);

in the dissector, the dissector gets called every time I click the
packet list and the tree for my protocol is shown (consequently, the
dissection for the "Data Frames" isn't possible).

Has anyone also had such a problem when using conversations and TCP
reassembly at the same time?

Regards,
Jens