Ethereal-dev: Re: [ethereal-dev] Want to add stuff to frame_data

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

From: Gilbert Ramirez <gram@xxxxxxxxxx>
Date: Fri, 28 Jan 2000 22:44:20 -0600
On Sat, Jan 29, 2000 at 01:33:39AM +1000, Richard Sharpe wrote:
> Hi,
> 
> I want to add a void *per_frame_info field to frame_data along with routins
> to set and retrieve this info so I can support stashing info along with a
> frame.
> 
> This will make many things better with protocols where you have to remember
> state between frames.
> 
> Since we do the summary pane all in one go, we get to see each frame, and
> we can stash things in an association, but this screws up when users are
> randomly selecting frames and going back and forth ...
> 
> So, the approach I was thinking of is as follows:
> 
> On any pass over a frame, we check to see if there is frame info stashed
> there, and if so, use that if we need to remember things about the frame,
> but if not, look in any association we have set up.
> 
> However, it seems that multiple layers may want to stash frame info for
> their own use, so it seems that what I want is a hash and routines like:
> 
>   void set_frame_info(frame_data *fd, gchar *protocol, void *proto_info);
> 
> and
> 
>   void *get_frame_info(frame_data *fd, gchar *protocol);
> 
> What say ye, oh assembled multitude?

Or perhaps a linked list of these frame state structs. The number of
protocols that need to store state is few, and I doubt there would
be many protocols doing so in a single frame, so the cost of looking
through a linked list would be negligible.

--gilbert