Ethereal-dev: [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: Phil Williams <csypbw@xxxxxxxxxxxxxxxx>
Date: Mon, 25 Mar 2002 12:18:50 +0000 (GMT)
Hi

Quite a simple question I hope, I am trying to get to grips with the
source of this excellent tool.

For any packets I capture that are TCP, I wish to:

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
   and if so, and what value indicates tcp?

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

2. I want to be able to get access to the sequence number and the header
   length of a tcp packet, as well as the length of the whole packet.
   (Obviously after I have determined that it is TCP)

Thanks in advance.

-- 
Phil Williams