author | mickeyl <mickeyl> | 2004-03-05 21:39:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-03-05 21:39:40 (UTC) |
commit | a12943ccab6b39dda5cf8561efb10eeec856f13e (patch) (side-by-side diff) | |
tree | b22cd5c74bd4daad201eea5e485ea9856471d1f2 | |
parent | 8851dc992ab535bde6cb417cafc44658953f495d (diff) | |
download | opie-a12943ccab6b39dda5cf8561efb10eeec856f13e.zip opie-a12943ccab6b39dda5cf8561efb10eeec856f13e.tar.gz opie-a12943ccab6b39dda5cf8561efb10eeec856f13e.tar.bz2 |
change copyright notice
28 files changed, 175 insertions, 53 deletions
diff --git a/noncore/net/wellenreiter/ChangeLog b/noncore/net/wellenreiter/ChangeLog index 6c2e52b..fdc8aa7 100644 --- a/noncore/net/wellenreiter/ChangeLog +++ b/noncore/net/wellenreiter/ChangeLog @@ -1,36 +1,38 @@ 2004-??-?? Michael Lauer <mickey@Vanille.de> + * Added sanity check isPresent(interface) before starting the engine. + * Added a View submenu. Added actions to expand and collapse all items. * Switched to a (hopefully) more reliable method reading from gpsd. * Added parsing of named ProbeRequests. Display only-probed-yet SSIDs in a different network color. * Rewrote the simple actions on new {Network, Client, Station}. Besides playing a sound or blinking a LED, a user customizable script can now be executed, if something has been detected. This opens up many possibilities, i.e. a qcop to qpegps or exec'ing flite (speech). * Added decloaking of cloaked ESSIDs (length != 0, but essid[0] == \0). * Hided the 'Parse' Tab in the configuration window. Not functional now and may come later * Added parsing of control frames. Display stations sending them SSID "<unknown>" for now. * Added command line option "-nocheck" to skip non-root and dhcp tests. - * Improved the speed reading the manufacturer list. + * Improved the speed of and user feedback during reading the manufacturer list. * GPS coordinates are now presented in the DMS (as opposed to decimal) format. 2003-12-18 Michael Lauer <mickey@Vanille.de> * Released as Version 1.0.2 (Development Snapshot) * Added automatic uploading of capture files to "The Capture Dump" site at http://www.Vanille.de/projects/capturedump.spy * Initial reading of the manufacturer database happens now in background * Removed deprecated setMonitorMode() API ==> Use setMode( "monitor" ) now. The monitor mode now tries to use the standard IW_MODE_MONITOR first. If that doesn't work, it falls back to using the proprietary iwpriv commands 2003-11-30 Michael Lauer <mickey@Vanille.de> * Released as Version 1.0.1 (Development Snapshot) * Fixed ARP decoding for wired networks. Interestingly, 802.11 encapsulates these in IP packets, while wired ethernet just tags the type_of_protocol. * Added reading GPS data from a gps daemon. * Started preparations for utilizing Wellenreiter II in wired networks. * Implemented persistant configuration interface and retriggerable auto detection. * Added QCOP interface for talking to opie-networksettings. * Added parsing of DHCP packets and detecting DHCP servers. * Overhauled the configuration window and started with the customizable event system. * Added disabling the screensaver. diff --git a/noncore/net/wellenreiter/TODO b/noncore/net/wellenreiter/TODO index 01e731f..f3fd205 100644 --- a/noncore/net/wellenreiter/TODO +++ b/noncore/net/wellenreiter/TODO @@ -19,44 +19,42 @@ ENGINE - usb? - define packet structure in a metalanguage and generate the actual parsing code (hmmm) - pester the ethereal folks to settle for an application independant packet dissection framework... (unlikely) - adaptive hopping scheme ! - gather interface capabilities - enable sniffing in wired networks - fix autodetection (interface name) --------- UI --------- - display interface capabilities (or rewrite networksettings?) - distinguish wireless bridges (WDS traffic) -- expand/collapse all - - add configuration for scrollback buffer in hex window and log window - revamp hex window, make it more sophisticated than just a QMultiLineEdit - tree view - beep over headphone / customizable - count/display number of wireless networks / APs since last start/stop --------- FILES --------- - write kismet-like .network format and format to be importable into AutoRoute - implement beacon stripping (the first beacon is enough to detect a new network - further beacons just blow up the capture file) diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui index 469effe..113e783 100644 --- a/noncore/net/wellenreiter/gui/configbase.ui +++ b/noncore/net/wellenreiter/gui/configbase.ui @@ -1,72 +1,76 @@ <!DOCTYPE UI><UI> <class>WellenreiterConfigBase</class> <widget> <class>QDialog</class> <property stdset="1"> <name>name</name> <cstring>WellenreiterConfigBase</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>250</width> + <width>246</width> <height>371</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Wellenreiter II COnfiguration Dialog</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <grid> <property stdset="1"> <name>margin</name> <number>2</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget row="0" column="0" > <class>QTabWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> + <property> + <name>whatsThis</name> + <string></string> + </property> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> <name>title</name> <string>Interface</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> <number>6</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout7</cstring> @@ -206,61 +210,69 @@ <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout5</cstring> </property> <hbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QPushButton</class> <property stdset="1"> <name>name</name> <cstring>autodetect</cstring> </property> <property stdset="1"> <name>text</name> <string>Perform Autodetection</string> </property> + <property> + <name>whatsThis</name> + <string>Retrigger the autodetection algorithm</string> + </property> </widget> </hbox> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>prismHeader</cstring> </property> <property stdset="1"> <name>text</name> <string>Use additional PRISM header</string> </property> + <property> + <name>whatsThis</name> + <string>Use additional PRISM headers, if available.</string> + </property> </widget> <spacer> <property> <name>name</name> <cstring>Spacer4</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> <widget> <class>QLayoutWidget</class> @@ -270,48 +282,52 @@ </property> <hbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>hopChannels</cstring> </property> <property stdset="1"> <name>text</name> <string>Hop Channels</string> </property> <property stdset="1"> <name>checked</name> <bool>true</bool> </property> + <property> + <name>whatsThis</name> + <string>Check this, if you want to start a channel hopper.</string> + </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1</cstring> </property> <property stdset="1"> <name>text</name> <string>every</string> </property> </widget> <widget> <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>hopInterval</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>true</bool> </property> <property stdset="1"> <name>suffix</name> @@ -333,69 +349,77 @@ <name>value</name> <number>1000</number> </property> <property> <name>whatsThis</name> <string>Choose the channel hop interval.</string> </property> </widget> </hbox> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>adaptiveHopping</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>Use Adaptive(TM) Hop Scheme</string> </property> + <property> + <name>whatsThis</name> + <string>An adaptive hopping interval dynamically changes the channel hopping parameters to listen longer on channels where traffic comes in.</string> + </property> </widget> <widget> <class>QGroupBox</class> <property stdset="1"> <name>name</name> <cstring>GroupBox1</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>title</name> <string>Scan on channel</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> + <property> + <name>whatsThis</name> + <string>Check the channels which should be included in the channel hopping scheme. Note that due to the 802.11 channel overlay scheme you may receive data on neighbour channels of channels, even if they're not checked here.</string> + </property> <grid> <property stdset="1"> <name>margin</name> <number>4</number> </property> <property stdset="1"> <name>spacing</name> <number>2</number> </property> <widget row="1" column="1" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>channel6</cstring> </property> <property stdset="1"> <name>text</name> <string>6</string> </property> </widget> <widget row="1" column="3" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> @@ -583,99 +607,111 @@ <bool>false</bool> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>7</hsizetype> <vsizetype>7</vsizetype> </sizepolicy> </property> </widget> <widget row="1" column="0" rowspan="1" colspan="3" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>captureFileName</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>/tmp/capture</string> </property> + <property> + <name>whatsThis</name> + <string>Configure the name of the capture file.</string> + </property> </widget> <widget row="0" column="2" > <class>QToolButton</class> <property stdset="1"> <name>name</name> <cstring>getCaptureFileName</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>Browse</string> </property> + <property> + <name>whatsThis</name> + <string>Click to open a file requester to choose a capture file name.</string> + </property> </widget> <spacer row="0" column="1" > <property> <name>name</name> <cstring>Spacer2</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Horizontal</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> <widget row="0" column="0" > <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>writeCaptureFile</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>true</bool> </property> <property stdset="1"> <name>text</name> <string>Write Capture Files To</string> </property> + <property> + <name>whatsThis</name> + <string>Check this to write an ethereal compatible capture file.</string> + </property> </widget> </grid> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> <name>title</name> <string>Parse</string> </attribute> <grid> <property stdset="1"> <name>margin</name> <number>5</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget row="0" column="0" > <class>ProtocolListView</class> @@ -701,70 +737,82 @@ </property> <attribute> <name>title</name> <string>UI</string> </attribute> <vbox> <property stdset="1"> <name>margin</name> <number>5</number> </property> <property stdset="1"> <name>spacing</name> <number>3</number> </property> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>lookupVendor</cstring> </property> <property stdset="1"> <name>text</name> <string>Lookup MAC vendor names</string> </property> + <property> + <name>whatsThis</name> + <string>Check this to lookup MAC vendor names.</string> + </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>openTree</cstring> </property> <property stdset="1"> <name>text</name> <string>Open Tree On New Station</string> </property> + <property> + <name>whatsThis</name> + <string>Check this to automatically make a tree visible when a new station is detected.</string> + </property> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>disablePM</cstring> </property> <property stdset="1"> <name>text</name> <string>Disable Power Management</string> </property> + <property> + <name>whatsThis</name> + <string>Check this to disable power management while scanning.</string> + </property> </widget> <spacer> <property> <name>name</name> <cstring>Spacer3</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> <widget> <class>QGroupBox</class> @@ -860,59 +908,67 @@ </item> <item> <property> <name>text</name> <string>Blink LED</string> </property> </item> <item> <property> <name>text</name> <string>Run Script</string> </property> </item> <property stdset="1"> <name>name</name> <cstring>newClientAction</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>7</hsizetype> <vsizetype>0</vsizetype> </sizepolicy> </property> + <property> + <name>whatsThis</name> + <string>Choose an action to perform when a new wireless station is detected.</string> + </property> </widget> <widget row="3" column="0" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>newClientScript</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>true</bool> </property> + <property> + <name>whatsThis</name> + <string>The command line to execute when a script action is performed.</string> + </property> </widget> <widget row="2" column="0" > <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2</cstring> </property> <property stdset="1"> <name>text</name> <string>Wireless Station:</string> </property> </widget> <widget row="4" column="1" > <class>QComboBox</class> <item> <property> <name>text</name> <string><Ignore></string> </property> </item> <item> <property> <name>text</name> <string>Play Alarm</string> @@ -926,118 +982,134 @@ </item> <item> <property> <name>text</name> <string>Blink LED</string> </property> </item> <item> <property> <name>text</name> <string>Run Script</string> </property> </item> <property stdset="1"> <name>name</name> <cstring>newStationAction</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>7</hsizetype> <vsizetype>0</vsizetype> </sizepolicy> </property> + <property> + <name>whatsThis</name> + <string>Choose the action to perform when a new wired station is detected.</string> + </property> </widget> <widget row="0" column="1" > <class>QComboBox</class> <item> <property> <name>text</name> <string><Ignore></string> </property> </item> <item> <property> <name>text</name> <string>Play Alarm</string> </property> </item> <item> <property> <name>text</name> <string>Play Click</string> </property> </item> <item> <property> <name>text</name> <string>Blink LED</string> </property> </item> <item> <property> <name>text</name> <string>Run Script</string> </property> </item> <property stdset="1"> <name>name</name> <cstring>newNetworkAction</cstring> </property> <property stdset="1"> <name>sizePolicy</name> <sizepolicy> <hsizetype>7</hsizetype> <vsizetype>0</vsizetype> </sizepolicy> </property> <property stdset="1"> <name>editable</name> <bool>false</bool> </property> + <property> + <name>whatsThis</name> + <string>Choose an action to perform when a new network is detected.</string> + </property> </widget> <widget row="1" column="0" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>newNetworkScript</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>true</bool> </property> + <property> + <name>whatsThis</name> + <string>The command line to execute when a script action is performed.</string> + </property> </widget> <widget row="5" column="0" rowspan="1" colspan="2" > <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>newStationScript</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>true</bool> </property> + <property> + <name>whatsThis</name> + <string>Choose an action to perform when a new wireless station is detected.</string> + </property> </widget> </grid> </widget> </grid> </widget> </vbox> </widget> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>tab</cstring> </property> <attribute> <name>title</name> <string>Intrusion</string> </attribute> <grid> <property stdset="1"> <name>margin</name> <number>6</number> </property> <property stdset="1"> <name>spacing</name> @@ -1260,48 +1332,52 @@ <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout6</cstring> </property> <vbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>enableGPS</cstring> </property> <property stdset="1"> <name>text</name> <string>Enable GPS logging w/ gpsd</string> </property> + <property> + <name>whatsThis</name> + <string>Check this to log GPS coordinates.</string> + </property> </widget> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout1</cstring> </property> <hbox> <property stdset="1"> <name>margin</name> <number>0</number> </property> <property stdset="1"> <name>spacing</name> <number>6</number> </property> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1_4</cstring> </property> <property stdset="1"> <name>text</name> @@ -1311,110 +1387,126 @@ <widget> <class>QComboBox</class> <item> <property> <name>text</name> <string>localhost</string> </property> </item> <property stdset="1"> <name>name</name> <cstring>gpsdHost</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>editable</name> <bool>true</bool> </property> <property stdset="1"> <name>currentItem</name> <number>0</number> </property> + <property> + <name>whatsThis</name> + <string>Hostadress where the gps daemon listens on.</string> + </property> </widget> <widget> <class>QLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2_2</cstring> </property> <property stdset="1"> <name>text</name> <string>:</string> </property> </widget> <widget> <class>QSpinBox</class> <property stdset="1"> <name>name</name> <cstring>gpsdPort</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>maxValue</name> <number>65535</number> </property> <property stdset="1"> <name>minValue</name> <number>1024</number> </property> <property stdset="1"> <name>value</name> <number>2947</number> </property> + <property> + <name>whatsThis</name> + <string>Port number where the gps daemon listens on.</string> + </property> </widget> </hbox> </widget> <widget> <class>QCheckBox</class> <property stdset="1"> <name>name</name> <cstring>startGPS</cstring> </property> <property stdset="1"> <name>text</name> <string>Start gpsd on localhost</string> </property> + <property> + <name>whatsThis</name> + <string>Check to start the GPS daemon on localhost.</string> + </property> </widget> <widget> <class>QLineEdit</class> <property stdset="1"> <name>name</name> <cstring>commandGPS</cstring> </property> <property stdset="1"> <name>enabled</name> <bool>false</bool> </property> <property stdset="1"> <name>text</name> <string>gpsd -p /dev/ttyS3 -s 4800</string> </property> + <property> + <name>whatsThis</name> + <string>Command line to start the gps daemon.</string> + </property> </widget> <spacer> <property> <name>name</name> <cstring>Spacer4_2</cstring> </property> <property stdset="1"> <name>orientation</name> <enum>Vertical</enum> </property> <property stdset="1"> <name>sizeType</name> <enum>Expanding</enum> </property> <property> <name>sizeHint</name> <size> <width>20</width> <height>20</height> </size> </property> </spacer> </vbox> </widget> diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp index 48fe89c..95b03d0 100644 --- a/noncore/net/wellenreiter/gui/configwindow.cpp +++ b/noncore/net/wellenreiter/gui/configwindow.cpp @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ /* LOCAL */ #include "configwindow.h" #include "mainwindow.h" /* OPIE */ #include <opie2/onetwork.h> #ifdef QWS #include <opie2/oapplication.h> #include <opie2/oconfig.h> #include <opie2/odevice.h> using namespace Opie; #endif diff --git a/noncore/net/wellenreiter/gui/configwindow.h b/noncore/net/wellenreiter/gui/configwindow.h index d31d1e8..0a5b3bd 100644 --- a/noncore/net/wellenreiter/gui/configwindow.h +++ b/noncore/net/wellenreiter/gui/configwindow.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef WELLENREITERCONFIGWINDOW_H #define WELLENREITERCONFIGWINDOW_H #include "configbase.h" #include "gps.h" /* QT */ #include <qmap.h> #include <qcombobox.h> #include <qstring.h> const int DEVTYPE_SELECT = 0; const int DEVTYPE_CISCO = 1; diff --git a/noncore/net/wellenreiter/gui/gps.cpp b/noncore/net/wellenreiter/gui/gps.cpp index b845aa1..a47b4ec 100644 --- a/noncore/net/wellenreiter/gui/gps.cpp +++ b/noncore/net/wellenreiter/gui/gps.cpp @@ -1,28 +1,28 @@ /********************************************************************** ** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "gps.h" /* QT */ #include <qtextstream.h> /* STD */ #include <stdlib.h> #include <unistd.h> GPS::GPS( QObject* parent, const char * name ) :QObject( parent, name ) { qDebug( "GPS::GPS()" ); diff --git a/noncore/net/wellenreiter/gui/gps.h b/noncore/net/wellenreiter/gui/gps.h index cfe1cdb..5629fec 100644 --- a/noncore/net/wellenreiter/gui/gps.h +++ b/noncore/net/wellenreiter/gui/gps.h @@ -1,28 +1,28 @@ /********************************************************************** ** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef GPS_H #define GPS_H #include <qobject.h> #include <qsocket.h> class GpsLocation { public: GpsLocation( const float& lat, const float& lon ) : _latitude(lat), _longitude(lon) {}; ~GpsLocation() {}; float latitude() const { return _latitude; }; float longitude() const { return _longitude; }; diff --git a/noncore/net/wellenreiter/gui/graphwindow.cpp b/noncore/net/wellenreiter/gui/graphwindow.cpp index b116b91..b4174d3 100644 --- a/noncore/net/wellenreiter/gui/graphwindow.cpp +++ b/noncore/net/wellenreiter/gui/graphwindow.cpp @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "graphwindow.h" #include <qpainter.h> #include <qpixmap.h> #include <qtimer.h> MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f) :QWidget( parent, name,f ), _channels( channels ) { _values = new int[_channels]; _dirty = new bool[_channels]; for ( int i = 0; i < channels; ++i ) { _values[i] = 0; diff --git a/noncore/net/wellenreiter/gui/graphwindow.h b/noncore/net/wellenreiter/gui/graphwindow.h index 1e00ae7..fafcab1 100644 --- a/noncore/net/wellenreiter/gui/graphwindow.h +++ b/noncore/net/wellenreiter/gui/graphwindow.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef GRAPHWINDOW_H #define GRAPHWINDOW_H #include <qwidget.h> #include <qvbox.h> class MFrequencySpectrum : public QWidget { public: MFrequencySpectrum( int channels, QWidget* parent = 0, const char* name = "MFrequencySpectrum", WFlags f = 0 ); int value( int channel ) const { return _values[channel]; }; void setValue( int channel, int value ) { diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro index 7957d4c..cfb9873 100644 --- a/noncore/net/wellenreiter/gui/gui.pro +++ b/noncore/net/wellenreiter/gui/gui.pro @@ -1,47 +1,49 @@ DESTDIR = $(OPIEDIR)/bin TEMPLATE = app CONFIG = qt warn_on debug HEADERS = wellenreiterbase.h \ mainwindow.h \ wellenreiter.h \ scanlist.h \ logwindow.h \ hexwindow.h \ statwindow.h \ configwindow.h \ graphwindow.h \ + packetview.h \ protolistview.h \ gps.h SOURCES = main.cpp \ mainwindow.cpp \ wellenreiterbase.cpp \ wellenreiter.cpp \ scanlist.cpp \ logwindow.cpp \ hexwindow.cpp \ statwindow.cpp \ configwindow.cpp \ graphwindow.cpp \ + packetview.cpp \ protolistview.cpp \ gps.cpp INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include INTERFACES = configbase.ui TARGET = wellenreiter !contains( platform, x11 ) { message( qws ) include ( $(OPIEDIR)/include.pro ) LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2 } contains( platform, x11 ) { LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter SOURCES += resource.cpp HEADERS += resource.h DESTDIR = $(OPIEDIR)/output/bin } diff --git a/noncore/net/wellenreiter/gui/hexwindow.cpp b/noncore/net/wellenreiter/gui/hexwindow.cpp index 2f011ca..cbf3217 100644 --- a/noncore/net/wellenreiter/gui/hexwindow.cpp +++ b/noncore/net/wellenreiter/gui/hexwindow.cpp @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "hexwindow.h" #include <qmultilineedit.h> MHexWindow::MHexWindow( QWidget * parent, const char * name, WFlags f ) :QVBox( parent, name, f ) { ledit = new QMultiLineEdit( this ); ledit->setFont( QFont( "fixed", 10 ) ); ledit->setReadOnly( true ); }; void MHexWindow::log( const QString& text ) { diff --git a/noncore/net/wellenreiter/gui/hexwindow.h b/noncore/net/wellenreiter/gui/hexwindow.h index 3d4ec0f..71c6f25 100644 --- a/noncore/net/wellenreiter/gui/hexwindow.h +++ b/noncore/net/wellenreiter/gui/hexwindow.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef HEXWINDOW_H #define HEXWINDOW_H #include <qvbox.h> class QString; class QMultiLineEdit; class MHexWindow: public QVBox { public: MHexWindow( QWidget * parent = 0, const char * name = "MHexWindow", WFlags f = 0 ); diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp index 6078fa2..1c72cf4 100644 --- a/noncore/net/wellenreiter/gui/logwindow.cpp +++ b/noncore/net/wellenreiter/gui/logwindow.cpp @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "logwindow.h" #include <qmultilineedit.h> #include <qdatetime.h> MLogWindow* MLogWindow::_instance; MLogWindow::MLogWindow( QWidget * parent, const char * name, WFlags f ) :QVBox( parent, name, f ) { ledit = new QMultiLineEdit( this ); ledit->setReadOnly( true ); MLogWindow::_instance = this; diff --git a/noncore/net/wellenreiter/gui/logwindow.h b/noncore/net/wellenreiter/gui/logwindow.h index da8c274..7877003 100644 --- a/noncore/net/wellenreiter/gui/logwindow.h +++ b/noncore/net/wellenreiter/gui/logwindow.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef LOGWINDOW_H #define LOGWINDOW_H #include <qvbox.h> class QString; class QMultiLineEdit; class MLogWindow: public QVBox { public: MLogWindow( QWidget * parent = 0, const char * name = "MLogWindow", WFlags f = 0 ); diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index 8ef62e9..be7a528 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp @@ -1,28 +1,28 @@ /********************************************************************** ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "mainwindow.h" #ifdef QWS #include <opie2/oapplication.h> #include <opie2/oprocess.h> #else #include <qapplication.h> #endif #include <qmessagebox.h> #include <qstringlist.h> #include <errno.h> #include <signal.h> diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 95a8294..6f57a7f 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -1,167 +1,175 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "configwindow.h" #include "gps.h" #include "logwindow.h" #include "hexwindow.h" #include "mainwindow.h" #include "wellenreiter.h" #include "scanlist.h" #include <qcombobox.h> #include <qdatastream.h> #include <qfile.h> #include <qfileinfo.h> #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> #include <qiconset.h> #include <qmenubar.h> #include <qmessagebox.h> #include <qpopupmenu.h> #include <qpushbutton.h> #include <qstatusbar.h> #include <qspinbox.h> #include <qtextstream.h> #include <qtoolbutton.h> +#include <qwhatsthis.h> #ifdef QWS #include <qpe/resource.h> #include <opie2/ofiledialog.h> using namespace Opie; #else #include "resource.h" #include <qapplication.h> #include <qfiledialog.h> #endif #include <unistd.h> WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) :QMainWindow( parent, name, f ) { cw = new WellenreiterConfigWindow( this ); mw = new Wellenreiter( this ); mw->setConfigWindow( cw ); setCentralWidget( mw ); // setup application icon - #ifndef QWS setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) ); + #ifndef QWS setIconText( "Wellenreiter/X11" ); #endif // setup tool buttons startButton = new QToolButton( 0 ); + QWhatsThis::add( startButton, tr( "Click here to start scanning." ) ); #ifdef QWS startButton->setAutoRaise( true ); #endif startButton->setIconSet( Resource::loadIconSet( "wellenreiter/SearchIcon" ) ); startButton->setEnabled( false ); connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) ); stopButton = new QToolButton( 0 ); + QWhatsThis::add( stopButton, tr( "Click here to stop scanning." ) ); #ifdef QWS stopButton->setAutoRaise( true ); #endif stopButton->setIconSet( Resource::loadIconSet( "wellenreiter/CancelIcon" ) ); stopButton->setEnabled( false ); connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) ); QToolButton* d = new QToolButton( 0 ); + QWhatsThis::add( d, tr( "Click here to open the configure dialog." ) ), #ifdef QWS d->setAutoRaise( true ); #endif d->setIconSet( Resource::loadIconSet( "wellenreiter/SettingsIcon" ) ); connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); uploadButton = new QToolButton( 0 ); + QWhatsThis::add( uploadButton, tr( "Click here to upload a capture session." ) ); #ifdef QWS uploadButton->setAutoRaise( true ); #endif uploadButton->setIconSet( Resource::loadIconSet( "up" ) ); uploadButton->setEnabled( false ); //uploadButton->setEnabled( true ); // DEBUGGING connect( uploadButton, SIGNAL( clicked() ), this, SLOT( uploadSession() ) ); // setup menu bar int id; QMenuBar* mb = menuBar(); QPopupMenu* fileSave = new QPopupMenu( mb ); fileSave->insertItem( tr( "&Session..." ), this, SLOT( fileSaveSession() ) ); fileSave->insertItem( tr( "&Text Log..." ), this, SLOT( fileSaveLog() ) ); fileSave->insertItem( tr( "&Hex Log..." ), this, SLOT( fileSaveHex() ) ); QPopupMenu* fileLoad = new QPopupMenu( mb ); fileLoad->insertItem( tr( "&Session..." ), this, SLOT( fileLoadSession() ) ); //fileLoad->insertItem( "&Log", this, SLOT( fileLoadLog() ) ); QPopupMenu* file = new QPopupMenu( mb ); file->insertItem( tr( "&New" ), this, SLOT( fileNew() ) ); id = file->insertItem( tr( "&Load" ), fileLoad ); file->insertItem( tr( "&Save" ), fileSave ); file->insertSeparator(); uploadID = file->insertItem( tr( "&Upload Session" ), this, SLOT( uploadSession() ) ); file->insertSeparator(); file->insertItem( tr( "&Exit" ), qApp, SLOT( quit() ) ); - QPopupMenu* view = new QPopupMenu( mb ); - view->insertItem( tr( "&Configure..." ) ); - QPopupMenu* sniffer = new QPopupMenu( mb ); sniffer->insertItem( tr( "&Configure..." ), this, SLOT( showConfigure() ) ); sniffer->insertSeparator(); startID = sniffer->insertItem( tr( "&Start" ), mw, SLOT( startClicked() ) ); sniffer->setItemEnabled( startID, false ); stopID = sniffer->insertItem( tr( "Sto&p" ), mw, SLOT( stopClicked() ) ); sniffer->setItemEnabled( stopID, false ); + QPopupMenu* view = new QPopupMenu( mb ); + view->insertItem( tr( "&Expand All" ), this, SLOT( viewExpandAll() ) ); + view->insertItem( tr( "&Collapse All" ), this, SLOT( viewCollapseAll() ) ); + QPopupMenu* demo = new QPopupMenu( mb ); demo->insertItem( tr( "&Add something" ), this, SLOT( demoAddStations() ) ); //demo->insertItem( tr( "&Read from GPSd" ), this, SLOT( demoReadFromGps() ) ); id = mb->insertItem( tr( "&File" ), file ); - //id = mb->insertItem( tr( "&View" ), view ); + + id = mb->insertItem( tr( "&View" ), view ); //mb->setItemEnabled( id, false ); + id = mb->insertItem( tr( "&Sniffer" ), sniffer ); id = mb->insertItem( tr( "&Demo" ), demo ); mb->setItemEnabled( id, true ); mb->setItemEnabled( uploadID, false ); #ifdef QWS mb->insertItem( startButton ); mb->insertItem( stopButton ); mb->insertItem( uploadButton ); mb->insertItem( d ); #else // Qt3 changed the insertion order. It's now totally random :( mb->insertItem( d ); mb->insertItem( uploadButton ); mb->insertItem( stopButton ); mb->insertItem( startButton ); #endif updateToolButtonState(); // setup status bar (for now only on X11) #ifndef QWS statusBar()->message( tr( "Ready." ) ); @@ -532,24 +540,34 @@ void WellenreiterMainWindow::uploadSession() ::write ( sock, &ch, 1 ); } // write preambel ascii = preambel.latin1(); ascii_len = ::strlen( ascii ); ::write ( sock, ascii, ascii_len ); // done! ok = true; } } ::close ( sock ); } if ( ok ) QMessageBox::information( 0, tr( "Success" ), QString ( "<p>%1</p>" ).arg( tr( "Capture Dump was uploaded to %1" ) ).arg( CAP_hostname ) ); else QMessageBox::warning( 0, tr( "Error" ), QString ( "<p>%1</p>" ).arg ( tr( "Connection to %1 failed" ) ).arg( CAP_hostname ) ); } + +void WellenreiterMainWindow::viewExpandAll() +{ + mw->netView()->expand(); +} + +void WellenreiterMainWindow::viewCollapseAll() +{ + mw->netView()->collapse(); +} diff --git a/noncore/net/wellenreiter/gui/mainwindow.h b/noncore/net/wellenreiter/gui/mainwindow.h index a5cb7a5..9593241 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.h +++ b/noncore/net/wellenreiter/gui/mainwindow.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <qmainwindow.h> class Wellenreiter; class WellenreiterConfigWindow; class QIconSet; class QToolButton; class WellenreiterMainWindow: public QMainWindow { Q_OBJECT @@ -37,27 +37,30 @@ class WellenreiterMainWindow: public QMainWindow WellenreiterConfigWindow* cw; QToolButton* startButton; QToolButton* stopButton; QToolButton* uploadButton; int startID; int stopID; int uploadID; protected: virtual void closeEvent( QCloseEvent* ); void updateToolButtonState(); public slots: void showConfigure(); void demoAddStations(); void demoReadFromGps(); void fileSaveLog(); void fileSaveHex(); void fileSaveSession(); void fileLoadSession(); void fileNew(); void uploadSession(); void changedSniffingState(); + + void viewExpandAll(); + void viewCollapseAll(); }; #endif diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp index ed22bdd..635e174 100644 --- a/noncore/net/wellenreiter/gui/protolistview.cpp +++ b/noncore/net/wellenreiter/gui/protolistview.cpp @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ /* LOCAL */ #include "protolistview.h" #include <qcheckbox.h> #include <qcombobox.h> #include <qvbox.h> #include <qlabel.h> ProtocolListView::ProtocolListView( QWidget* parent, const char* name, WFlags f ) :QScrollView( parent, name, f ) { parse = ( QString( "parsePackets" ) == QString( name ) ); diff --git a/noncore/net/wellenreiter/gui/protolistview.h b/noncore/net/wellenreiter/gui/protolistview.h index 8b460cb..11f4375 100644 --- a/noncore/net/wellenreiter/gui/protolistview.h +++ b/noncore/net/wellenreiter/gui/protolistview.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef PROTOLISTVIEW_H #define PROTOLISTVIEW_H #include <qscrollview.h> #include <qdict.h> class QCheckBox; class QComboBox; class QVBox; class ProtocolListView : public QScrollView { public: diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp index 5e5ddc6..d98ef0b 100644 --- a/noncore/net/wellenreiter/gui/resource.cpp +++ b/noncore/net/wellenreiter/gui/resource.cpp @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "resource.h" #define PIXMAPPATH "/usr/local/share" #include <qiconset.h> namespace Resource { QPixmap loadPixmap( const QString& pix ) { QString filename; filename.sprintf( "%s/%s.png", (const char*) PIXMAPPATH, (const char*) pix ); diff --git a/noncore/net/wellenreiter/gui/resource.h b/noncore/net/wellenreiter/gui/resource.h index 8788c6e..85490b3 100644 --- a/noncore/net/wellenreiter/gui/resource.h +++ b/noncore/net/wellenreiter/gui/resource.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef RESOURCE_H #define RESOURCE_H #include <qstring.h> class QPixmap; class QIconSet; namespace Resource { QPixmap loadPixmap( const QString& ); QIconSet loadIconSet( const QString& ); } diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index c75f9b1..6005818 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -1,76 +1,75 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "scanlist.h" #include "configwindow.h" #include "logwindow.h" #include <assert.h> #include <qcursor.h> #include <qdatetime.h> #include <qpopupmenu.h> #include <qcheckbox.h> #ifdef QWS #include <qpe/qpeapplication.h> #endif #ifdef QWS #include <qpe/resource.h> #else #include "resource.h" #endif const int col_type = 0; const int col_essid = 0; const int col_sig = 1; const int col_ap = 2; const int col_channel = 3; const int col_wep = 4; const int col_traffic = 5; const int col_ip = 6; const int col_manuf = 7; const int col_firstseen = 8; const int col_lastseen = 9; const int col_location = 10; MScanListView::MScanListView( QWidget* parent, const char* name ) :OListView( parent, name ) { - setFrameShape( QListView::StyledPanel ); setFrameShadow( QListView::Sunken ); addColumn( tr( "Net/Station" ) ); setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); addColumn( tr( "#" ) ); setColumnAlignment( col_sig, AlignCenter ); addColumn( tr( "MAC" ) ); setColumnAlignment( col_ap, AlignCenter ); addColumn( tr( "Chn" ) ); setColumnAlignment( col_channel, AlignCenter ); addColumn( tr( "W" ) ); setColumnAlignment( col_wep, AlignCenter ); addColumn( tr( "T" ) ); setColumnAlignment( col_traffic, AlignCenter ); addColumn( tr( "IP" ) ); setColumnAlignment( col_ip, AlignCenter ); addColumn( tr( "Manufacturer" ) ); setColumnAlignment( col_manuf, AlignCenter ); addColumn( tr( "First Seen" ) ); setColumnAlignment( col_firstseen, AlignCenter ); addColumn( tr( "Last Seen" ) ); setColumnAlignment( col_lastseen, AlignCenter ); addColumn( tr( "Location" ) ); diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h index cbacdee..ab870c2 100644 --- a/noncore/net/wellenreiter/gui/scanlist.h +++ b/noncore/net/wellenreiter/gui/scanlist.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef SCANLIST_H #define SCANLIST_H #include "gps.h" /* OPIE */ #include <opie2/olistview.h> #include <opie2/onetutils.h> /* QT */ #include <qtextstream.h> class QString; diff --git a/noncore/net/wellenreiter/gui/statwindow.cpp b/noncore/net/wellenreiter/gui/statwindow.cpp index a9ae661..48e4847 100644 --- a/noncore/net/wellenreiter/gui/statwindow.cpp +++ b/noncore/net/wellenreiter/gui/statwindow.cpp @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #include "statwindow.h" #include <opie2/olistview.h> MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f ) :QVBox( parent, name, f ) { table = new OListView( this ); table->addColumn( tr( "Protocol" ) ); table->addColumn( tr( "Count" ) ); table->setItemMargin( 2 ); }; diff --git a/noncore/net/wellenreiter/gui/statwindow.h b/noncore/net/wellenreiter/gui/statwindow.h index 0ab4b50..b9057e7 100644 --- a/noncore/net/wellenreiter/gui/statwindow.h +++ b/noncore/net/wellenreiter/gui/statwindow.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef STATWINDOW_H #define STATWINDOW_H #include <qvbox.h> class QString; class OListView; class MStatWindow: public QVBox { Q_OBJECT public: diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index db68e5b..67e3940 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -491,49 +491,57 @@ void Wellenreiter::stopClicked() statwindow->updateCounter( it.key(), it.data() ); } void Wellenreiter::startClicked() { // get configuration from config window const QString& interface = configwindow->interfaceName->currentText(); const int cardtype = configwindow->driverType(); const int interval = configwindow->hoppingInterval(); if ( ( interface == "" ) || ( cardtype == 0 ) ) { QMessageBox::information( this, "Wellenreiter II", tr( "Your device is not\nproperly configured. Please reconfigure!" ) ); return; } // configure device ONetwork* net = ONetwork::instance(); // TODO: check if interface is wireless and support sniffing for non-wireless interfaces + if ( !net->isPresent( interface ) ) + { + QMessageBox::information( this, "Wellenreiter II", + tr( "The configured device (%1)\nis not available on this system\n. Please reconfigure!" ).arg( interface ) ); + return; + } + iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless! + assert( iface ); // bring device UP if ( cardtype != DEVTYPE_FILE ) { iface->setUp( true ); if ( !iface->isUp() ) { QMessageBox::warning( this, "Wellenreiter II", tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); return; } } // set monitor mode bool usePrism = configwindow->usePrismHeader(); switch ( cardtype ) { case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; default: assert( 0 ); // shouldn't reach this diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp index b8b6730..f57dba2 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ***********************************************************************/ #include "wellenreiterbase.h" #include <qlabel.h> #include <qlayout.h> #include "logwindow.h" #include "hexwindow.h" #include "scanlist.h" #include "statwindow.h" #include "graphwindow.h" #ifdef QWS #include <qpe/resource.h> diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.h b/noncore/net/wellenreiter/gui/wellenreiterbase.h index 2cc273e..5e00ddc 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.h +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.h @@ -1,28 +1,28 @@ /********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. +** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. ** -** This file is part of Opie Environment. +** This file is part of Wellenreiter II. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** **********************************************************************/ #ifndef WELLENREITERBASE_H #define WELLENREITERBASE_H #include <qvariant.h> #include <qwidget.h> class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QLabel; class MScanListView; class MScanListItem; class QPushButton; class MLogWindow; |