[Qt-interest] Advice on widget displaying network packets
Giacomo S.
giacomo.strangolino at elettra.trieste.it
Wed Jan 5 08:58:14 CET 2011
Il giorno mar, 04/01/2011 alle 09.01 -0800, BRM ha scritto:
> ----- Original Message ----
>
> > From: Giacomo S. <giacomo.strangolino at elettra.trieste.it>
> > I need an advice before starting to implement an application aimed at
> > displaying information about network packets.
> >
> > On heavy network traffic, much information has to be displayed and
> > updated.
>
> I would highly advise using a multi-threaded approach:
Of course it will be!
>
> 1. A thread to interact with the network - keep it simple, just read it off the
> network and generate a signal with the data.
> 2. A thread to parse out the data you want to display - get the network data and
> then generate signals with the individual
>
> 3. the main thread to display the information
>
> Keeps it nice and clean and helps keep the network traffic out of the way of the
> GUI thread - so it's always responsive.
>
> Displaying it in the GUI thread is a different issue - but you could easily
> queue it up in a buffer for a controlled update versus just trying to stuff it
> into the GUI on every signal.
Yes, this also can be applied, I was just wondering which display view
would be good to display thousands of entries... will a tree view be
fast enough when it comes to scrolling, selecting, expanding items?
For instance, I could group into a unique parent all the connections
between the same ip addresses...
The problem is how to represent the information in a fast-browseable
view...
many thanks
>
>
> > A typical piece of information might contain the following info:
> >
> > - net device
> > - protocol (tcp,udp,icmp..)
> > - source/dest ip ports
> > - connection status (SYN,ACK,..., TIME WAIT)
> >
> > Currently, I am using a konsole to display such information. Each packet
> > is described by a line like the following:
> >
> > [OK 8]OUT: [eth0] |TCP| 140.105.5.83:http-->192.168.205.64:ms-sql-s |A|
> > TIME WAIT[natural rule]
> >
> > but I would like to implement another view for the purpose.
> >
>
> Seems like you are doing something similar to Wireshark
> (http://www.wireshark.org/) - so you might want to hop over and see what they
> do to manage the GUI updating.
>
> HTH,
>
> Ben
More information about the Qt-interest-old
mailing list