Ethereal-dev: Re: [Ethereal-dev] Checking for new capture/loaded file from user code?

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

From: "Lars Ruoff" <lars.ruoff@xxxxxxxxxxxxxxxxxx>
Date: Mon, 15 Dec 2003 11:13:32 +0100
Well, I have my fast RTP Analysis architecture ready.
That means that pointers to all RTP frames are stored in a global list in
order to analyse only the frames of the selected RTP stream.
This list is calculated when the RTP Streams or -Analysis dialog boxes get
opened for the first time. The calculation needs a complete redissection of
all frames.
Now the question is:
1 - should the list be recalculated each time we open the dialog box?
(Annoying for frequent uses, but allows to release the memory when the
dialog box is closed)
or
2 - keep it in memory and recalculate it only when its content changes?
(This needs we have to tell somehow *when* the content has changed)

Lars Ruoff

----- Original Message ----- 
From: "Guy Harris" <guy@xxxxxxxxxxxx>
To: "Lars Ruoff" <lars.ruoff@xxxxxxxxxxxxxxxxxx>
Cc: "Ethereal-Dev" <Ethereal-dev@xxxxxxxxxxxx>
Sent: Monday, December 15, 2003 10:35 AM
Subject: Re: [Ethereal-dev] Checking for new capture/loaded file from user
code?


> On Mon, Dec 15, 2003 at 10:27:16AM +0100, Lars Ruoff wrote:
> > Is there a way of finding out if the another capture file has been
loaded or
> > another capture has been run from looking at the global cfile variable?
> > I.e. are there any members of the capture_file struct that are
garantueed to
> > be different for each new capture/loaded file?
>
> Not really.  "filename" is *likely* to be different, but somebody could
> conceivably, for example, close a capture file, copy a new file on top
> if it (from another machine, for example), and then open that file
> again.
>
> What problem are you trying to solve?  There might be a better way to
> solve it.