Wireshark-dev: Re: [Wireshark-dev] Using tcp_dissect pdus and fragment, segment reassembly
From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Fri, 26 Jan 2007 18:12:25 +0100 (CET)
Hi,

Checked in.

Thanx,
Jaap

On Fri, 26 Jan 2007, Graham Bloice wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Graham Bloice wrote:
> > I've been attempting to add tcp fragment reassembly using
> > tcp_dissect_pdus() to an existing dissector that already used the epan
> > reassembly code for an internal part of the protocol.
> >
> > However it seems that when I add the tcp_dissect_pdus() call then the
> > other reassembly stops working.  The call to fragment_add_seq_check()
> > never returns a non-null fragment_data pointer.
> >
> > I grep'd all the other dissectors and didn't find any using a
> > combination of both methods.
> >
> > Is there a problem with using both, or have I just gone wrong somewhere?
> >
>
> I've now resolved my issues with the combination of the two reassembly
> options, and the problem was down to errors in my dissector.
>
> In doing so, I ran across a couple of documentation issues:
>
> In the Developers Guide, Section 9.3, Example 9.17. Decompressing data
> packets for dissection
>
> The code calls tvb_set_free_cb() for the newly created next_tvb.  This
> is unnecessary as the call to tvb_set_child_real_data() adds next_tvb to
> the chained list of tvb, thus ensuring that next_tvb is correctly
> deleted.  In fact when I had the call in, Visual Studio kept breaking
> deep down in ntdll.dll, probably because of a double free every time the
> main tvb was deleted.
>
> In README.developer, para 2..2.7 The example conversation code doesn't
> assign the result of conversation_new() back into the conversation variable.
>
> I've attached patches for these two items.
>
> - --
> Regards,
>
> Graham Bloice
> Software Developer
> Trihedral UK Limited
> Tel: +44 (0)7002 874433
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFujSNcs4xxHO/MtURAhePAKCpo8vEg5zQq7wJ+t6u/qonrO8mHgCfSe85
> eSti+m46GPuNkkT7jqSaM8o=
> =MiNy
> -----END PGP SIGNATURE-----
>