Ethereal-dev: Re: [Ethereal-dev] TCP stream sequence

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

From: "Ronnie Sahlberg" <ronnie_sahlberg@xxxxxxxxxxxxxx>
Date: Wed, 5 May 2004 17:17:31 +1000
That is actually very very easy to do.

Please see the example in packet-kerberos.c   where it is using
the helper function   tcp_dissect_pdus().

Using this helper will make TCP automagically
1,  keep track of PDU boundaries so that it will even find PDUs starting in
the middle of a segment.
2, handle the case of PDUs spanning multiple segments (reassembly)
3, handle multiple PDUs in one segment

the TCP layer will do all the magic to keep track of TCP retransmissions,
out of order segments etc.


----- Original Message ----- 
From: "Stas Khirman"
Sent: Wednesday, May 05, 2004 4:18 PM
Subject: [Ethereal-dev] TCP stream sequence


> Sorry for maybe silly question.
>
> I'm writing dissector for binary TCP based protocol. Protocol is binary
> and every message has length and type field in the message header.
> Messages may be divided between few TCP frames. Corect parsing depends
> on my ability to parse all packets in correct order.
>
> 1.) How can I check if current TVB buffer is in correct sequence ( how
> can I access to tcp seq field?)
> 2.) How can I distinguish retransmitted buffers?
>
>
> Regards
> Stas
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev