[snip]
> Does that mean that, in fact, all the GUI code is in
> gtk/gtk_stats_tree.c, with no GUI code in any of the taps that use it,
> and that it might be possible to write a *Tethereal* implementation of
> the "stats_tree" code, and that taps that use this mechanism could not
> only be GUI-independent (all a particular GUI would need would be an
> implementation of the "stats_tree" code?
[snip]
As promissed a while ago,
The new implemenation of the counters tree.
Now it is an API for dissectors.
stats_tree.patch is made of few files:
ROOT/epan/stats_tree.c -- the common code for the stats_tree
ROOT/epan/stats_tree.h -- the API for dissectors
ROOT/epan/stats_tree_priv.h -- the API for implementations
ROOT/gtk/stats_tree_stat.c -- the GTK implementation
ROOT/tap-stats_tree.c -- the tethereal implementation
in eth_udp_stats_tree.patch you'll find the stats_tree code used
by packet-eth and packet-udp, others to come soon.
There are still some isues to fix:
- a very poor GTK1 implementation that uses a textbox to output the
same text that the text tap uses is there but the code has never been
compiled (I tried to setup a gtk1 environment but failed)
- a crash when closing the window which I have not figured out how it does:
Program received signal EXC_BAD_ACCESS, Could not access memory.
0x00016d38 in window_destroy (win=0x0) at ui_util.c:524
524 if(!GTK_WIDGET_NO_WINDOW(win) && GTK_WIDGET_VISIBLE(win)) {
(gdb) bt 5
#0 0x00016d38 in window_destroy (win=0x0) at ui_util.c:524
#1 0x00063e98 in free_gtk_tree (st=0x20b39c0) at stats_tree_stat.c:163
#2 0x006f52ec in g_closure_invoke ()
#3 0x0070a4cc in signal_emit_unlocked_R ()
#4 0x00709704 in g_signal_emit_valist ()
(More stack frames follow...)
So far I have not being able to figure out why it crashes.
Luis
Attachment:
stats_tree.patch
Description: Binary data
Attachment:
eth_udp_stats_tree.patch
Description: Binary data