The GUI application is implemented using the Gimp Tool Kit (GTK) 1.2 and relies on GTK shared libraries to run and GTK development libraries and header-files to compile.
The internal design of the client is illustrated in figure 9.5. The client mainly has two event entities. The packet parser and the GUI event handler. The packet parser receives all OLSR traffic from olsrd and updates the local repositories which again triggers necessary updates of the GUI components. The GUI event handling is maintained by GTK where all GUI component events are registered as signals using the function:
guint
gtk_signal_connect(GtkObject *object,
const gchar *name,
GtkSignalFunc func,
gpointer func_data);
where the action name on the widget object triggers the function func.
Instead of running the GUI event loop and packet parsing in different threads, a timer function offered by the GTK library is used to poll for OLSR traffic from olsrd. The function that polls OLSR traffic is added as a GTK timeout using the function:
guint
gtk_timeout_add(guint32 interval,
GtkFunction function,
gpointer data);
The timeout of the local information repositories is also added as a timeout using this function.
Andreas 2004-07-29