Ethereal-dev: Re: [Ethereal-dev] referencing specific tcp protocol data

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Mon, 25 Mar 2002 12:58:38 -0800
On Mon, Mar 25, 2002 at 12:18:50PM +0000, Phil Williams wrote:
> 1. Firstly test if a packet is tcp, as I will have to loop through the
>    whole capture file.
>    - does pfd within the frame_data struct tell me what protocol a packet is

No.

> Looking at the code, it seems that protocol specific data is stored in
> some tree like structure, which I can't seem to grasp.

Well, unfortunately, that tree structure is the one that tells you
whether a frame includes TCP.

> 2. I want to be able to get access to the sequence number and the header
>    length of a tcp packet,

That's also in said tree structure.

>    as well as the length of the whole packet.

"The whole packet" as in "the frame being examined", or as in "the TCP
payload", or what?