Ethereal-dev: Re: [Ethereal-dev] Allow subdissector reassemble TCP fragments...

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Wed, 19 Apr 2006 23:41:16 -0700
fabio matturro wrote:

To reassemble desegmented TCP packets  I set  'Allow subdissector
reassemble...'
To reassemble my_proto frags I set 'Reassemble my proto packets' in my_proto Prefererences.

...and either manually setting pinfo->desegment_offset and pinfo->desegment_len, or letting a routine such as tcp_dissect_pdus(), presumably.

With TCP, you do *NOT* do desegmentation the same way you do with other protocols, because TCP doesn't honor higher-level packet boundaries - it doesn't know anything about packet boundaries, it just supplies a byte stream service.

You don't do the desegmentation yourself.  You let the TCP dissector do it.

In your protocol, how is the length of a packet specified? Is there a length field in the header, or is there some "end of packet" indicator, or is the length inferred from a type field in the header, or what?