summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/docs/specification23
1 files changed, 22 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/docs/specification b/noncore/net/wellenreiter/docs/specification
index d833451..0766ef4 100644
--- a/noncore/net/wellenreiter/docs/specification
+++ b/noncore/net/wellenreiter/docs/specification
@@ -24,62 +24,83 @@ It discovers Access Points and Ad-Hoc networks and displays all available
information about them so that you can simply join unencrypted network
(without access restrictions) with the given informations.
For the latest version of wellenreiter look at:
http://wellenreiter.sourceforge.net.
-[ Overview
The software is divided into 2 sections, the daemon and the GUI.
The daemon does the active sniffing, analying stuff etc.pp. and
sends the informations to the GUI which displays the results.
-[ Configuration
The configuration is done by both, the GUI and the daemon so that the
GUI only provides the graphical interface to the configuration library
of the daemon. That means that the daemon loads the config file on
startup and sends the informations to the GUI. The GUI contains an option
"configure" where the settings can be changed. They will be sent to the
daemon which actually changes the configuration file.
The configuration file is placed in /usr/local/etc/wellenreiter.conf.
The whole content of this file cannot be specified yet.
+OPIE specific: Opie contains a bunch of high-level configuration classes,
+which are used by most Opie applications. It should be discussed whether
+to use this structure / API (preferred) or use a proprietary one.
+
-[ Interaction GUI<->daemon
The GUI and the daemon will talk actively with eachother, meaning that
everyside who has informations for the other part will send it and not
wait for the other part to poll.
For example the sniffing function of the daemon is startet when a
"start_sniff" from the GUI arrived. And when the daemon found a network
it will be directly send to the GUI to be able to sniff in realtime.
-[ Communication GUI<->daemon
-Not yet specified.
+The GUI and the daemon run as threads within one process, where the GUI
+thread will be the main thread. Both the daemon and the GUI thread are
+(mostly) "free-running". Once the GUI thread is started and has finished
+its initializations, it jumps into the Qt event loop ( QApplication::exec() ).
+
+If the daemon thread is actively working and -
+for instance - has acquired interesting data for the GUI thread to display,
+it calls a special reentrant method of the GUI thread ( QApplication::postEvent )
+either transmitting the whole data structure or saying "Hey, there's interesting data
+for you", which the GUI thread then retrieves.
+To enable a free running daemon thread to actually receive messages from the
+GUI thread, it's useful to to include a non-blocking check-for-messages-function
+within the daemon main loop <since it is waiting for messages from a GUI thread,
+this function has not be called very often>. If applicable, the daemon thread must
+not call this function but only monitor some guarded variables from time to time
+which the GUI thread can modify to alter the behaviour of the daemon thread.
+
+IMHO this is a much more leightweight design than to use a proprietary udp-socket protocol.
-[ Setting card modes
One of the most interesting parts is the switching of the wirelesscards to
different channels, to monitor mode and so on. In the older versions this
actions were done by the calling of external programs, that is now obsolete.
We will use the API of the wireless drivers to set it up.
-[ Sniffing
The sniffing will be done by capturing and analyzing all packets using the
pcap library. The sniffer itself will be a function of the daemon which will
probably be threaded so that this function is non-blocking.
If a packet is found the sniffer sends it to an analyzer function which
analyzes the packets, strips the results and sends it to the GUI.
-[ Logging
The GUI should not need to log that much so it logs to STDERR. The daemon
will be able to run in foreground and log to STDERR and syslog but normally
it will only log to syslog (INFO/ERR).