Ethereal-dev: Re: [Ethereal-dev] RFC framework for graphical extensions like the recent rate_
On Tue, Jun 25, 2002 at 08:14:46PM +1000, Ronnie Sahlberg wrote:
> I made up the following desireable requirements for these kind of
> extensions:
> 1, it would be nice if the graphical charts would be updated in
> semi-real-time, ie it would continously update while capturing packets.
That would probably be similar to what we do now for "Update list of
packets in real time" captures.
BTW, why should any of this mention graphs? I could imagine this also
being used for extensions with text output, such as "experts" that
recognize symptoms of various problems (although we might want to have
text-only ones separate, so they could just generate text column values;
that way, Tethereal could handle them as well, and just print the text
column values).
> The second parameter is a pointer to a function with an infinite loop where
> the low priority update graph functions are kept.
What would cause a graph to be updated other than either
1) the arrival of a new frame, which could just be handled by
the framehistogramevent callback;
2) some UI event, which would presumably just be handled by the
main GUI loop?
I.e., why would there need to be a low priority update loop in a
separate thread?
Is that intended to arrange that the graph only be updated in idle time?
You might be able to do that, at least with GTK+, by using the
"gtk_idle_add" routines, which arrange that a routine be called when the
event loop is idle; that would work if we added the capture process to
the input loop, which should just work on most UNIX platforms, should
work on Windows with a future WinPcap release (there's a bug in the
current version so that the event handle for a "pcap_t" isn't returned
correctly), and can probably be made to work on most versions of BSD
("select()" doesn't work correctly on BPF devices in many versions of
BSD, but a timeout handler in the main loop will work around that on
most BSDs, although I suspect more work would be needed in FreeBSD 4.4).