> Hi, > > I notice that GTK+ 1.2.x has support for threads ... > > I often want to capture traffic and see the packet summaries as the packets > go by, as well as to analyse them later. It would seem that using a data > capture thread to capture packets and a display thread to display the > packets as they are captured would seem like an idea ... > > Any thoughts. As long as we have threads support in all the OSes on which we'd want to support Ethereal - and are willing to require that people install GTK+ 1.2[.x], if necessary - it's reasonable. Another alternative might be - at least when "wiretap" supports live packet capture - to have its live packet capture interface include "return the UNIX file descriptor for this capture stream" and "read a packet from the UNIX file descriptor for this capture stream", hand those file descriptors to GTK+ to select on in its main input loop, and if they're ready for input, read packets from them and process it. That might also be useful for reading from more than one network interface (something I could've used a couple of days ago). (Note that the ability to do "select()" on packet capture devices is probably necessary anyway to make a multi-thread scheme work with a purely userland thread package.) See the "Viewing packets while capturing..." thread at http://ethereal.zing.org/lists/ethereal-dev/199901/ for an earlier discussion of this.
Powered by MHonArc 2.6.10