Ethereal-dev: [Ethereal-dev] desegment TCP streams with unknown size

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

From: Dickson Law <dickson@xxxxxxxxxxxxx>
Date: Wed, 14 Sep 2005 20:34:15 +0800
Hi there I have a need to reassembly muitlple PDUs into something usable for dissection. The trouble is the target protocol does not compute the lenght of the message sent, but only a terminating byte 0x03 is used. I presume I would not be able to using the tcp_dissect_pdus functions as per README.developer but I am having problem understanding the alternative method described.

The code fragment I am trying to use:

      int offset=0;
/* Looking for 0x03*/

       len = tvb_find_guint8(tvb, offset, -1, 0x03);
       fprintf(stderr,"0x03 found at %d\n",len);
if ( len = -1 ) {
              /* get 1 more byte*/
               pinfo->desegment_offset = offset;
               pinfo->desegment_len = 1;
               return;
       }


what this gets me is it completely scrambled my dissectors, which has been working fine up till then.


Can anyone help?

thanks

dickson

---------------------------------------------------------

This e-mail contains information some or all of which may be confidential, proprietary and/or legally privileged.  If an addressing or transmission error has misdirected this e-mail, please notify the sender by replying to this e-mail.  If you are not the intended recipient you must not use, disclose, distribute, copy, print or rely on this e-mail.

---------------------------------------------------------