> I have been wondering about demand loading like netmon does.
I suspect NetMon does this by having its equivalent of the GtkCList
widget draw an exposed row by calling the dissector to get the
information to display in the columns, and selecting a color based on
that.
The notion of CLists like that has been suggested by Havoc Pennington on
either the gtk or gtk-devel list, a while ago; if the GTK+ folk don't
get around to implementing such a widget, I'm tempted to try at some
point - I think it'd allow us to speed up the process of reading capture
files by a *lot*.
When we read the capture file, instead of dissecting frames, we just do
enough work to associate, with each frame, enough data to allow it to be
dissected later, using the stuff Richard Sharpe is in the process of
adding, and would build the display list by attaching to each row only a
pointer to the data structure for the frame.
When a row is to be displayed, the list widget would call back a
routine, specified when the list is created, passing it, among other
arguments, the pointer attached to the row; that routine would, in
Ethereal, do enough dissection to fill in the columns for that row, by
calling the link-level dissector (which would then call the others), and
would supply that data to its caller, along with supplying a color to
use for the row as well (which would require it to have the dissector
build a protocol tree, and then run a display filter on it).