summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp6
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp3
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp5
-rw-r--r--noncore/net/wellenreiter/gui/packetview.cpp3
-rw-r--r--noncore/net/wellenreiter/gui/packetview.h6
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp6
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.h26
-rw-r--r--noncore/net/wellenreiter/gui/statwindow.cpp3
-rw-r--r--noncore/net/wellenreiter/gui/statwindow.h4
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp10
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h56
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.cpp3
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.h2
13 files changed, 84 insertions, 49 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 95b03d0..da39113 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -34,24 +34,30 @@ using namespace Opie;
34#include <qlineedit.h> 34#include <qlineedit.h>
35#include <qlayout.h> 35#include <qlayout.h>
36#include <qmap.h> 36#include <qmap.h>
37#include <qpushbutton.h> 37#include <qpushbutton.h>
38#include <qtabwidget.h> 38#include <qtabwidget.h>
39#include <qtoolbutton.h> 39#include <qtoolbutton.h>
40#include <qspinbox.h> 40#include <qspinbox.h>
41#include <qtextstream.h> 41#include <qtextstream.h>
42 42
43/* POSIX */ 43/* POSIX */
44#include <assert.h> 44#include <assert.h>
45 45
46using namespace Opie::Core;
47using namespace Opie::Net;
48using namespace Opie::Core;
49using namespace Opie::Net;
50using namespace Opie::Core;
51using namespace Opie::Net;
46WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; 52WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0;
47 53
48WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) 54WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f )
49 :WellenreiterConfigBase( parent, name, true, f ) 55 :WellenreiterConfigBase( parent, name, true, f )
50{ 56{
51 _devicetype[ "cisco" ] = DEVTYPE_CISCO; 57 _devicetype[ "cisco" ] = DEVTYPE_CISCO;
52 _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; 58 _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG;
53 _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; 59 _devicetype[ "hostap" ] = DEVTYPE_HOSTAP;
54 _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; 60 _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO;
55 _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; 61 _devicetype[ "<manual>" ] = DEVTYPE_MANUAL;
56 _devicetype[ "<file>" ] = DEVTYPE_FILE; 62 _devicetype[ "<file>" ] = DEVTYPE_FILE;
57 63
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp
index 7dcc583..6bbc39b 100644
--- a/noncore/net/wellenreiter/gui/main.cpp
+++ b/noncore/net/wellenreiter/gui/main.cpp
@@ -20,24 +20,27 @@
20#else 20#else
21#include <qapplication.h> 21#include <qapplication.h>
22#endif 22#endif
23 23
24#include <qmessagebox.h> 24#include <qmessagebox.h>
25#include <qstringlist.h> 25#include <qstringlist.h>
26 26
27#include <errno.h> 27#include <errno.h>
28#include <signal.h> 28#include <signal.h>
29#include <string.h> 29#include <string.h>
30#include <unistd.h> 30#include <unistd.h>
31 31
32using namespace Opie::Core;
33using namespace Opie::Core;
34using namespace Opie::Core;
32int main( int argc, char **argv ) 35int main( int argc, char **argv )
33{ 36{
34 #ifdef QWS 37 #ifdef QWS
35 OApplication a( argc, argv, "Wellenreiter II" ); 38 OApplication a( argc, argv, "Wellenreiter II" );
36 #else 39 #else
37 QApplication a( argc, argv ); 40 QApplication a( argc, argv );
38 #endif 41 #endif
39 WellenreiterMainWindow* w = new WellenreiterMainWindow(); 42 WellenreiterMainWindow* w = new WellenreiterMainWindow();
40 #ifdef QWS 43 #ifdef QWS
41 a.showMainWidget( w ); 44 a.showMainWidget( w );
42 #else 45 #else
43 a.setMainWidget( w ); 46 a.setMainWidget( w );
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index 5cc0daf..7add6cd 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -42,24 +42,29 @@
42#ifdef QWS 42#ifdef QWS
43#include <qpe/resource.h> 43#include <qpe/resource.h>
44#include <opie2/ofiledialog.h> 44#include <opie2/ofiledialog.h>
45using namespace Opie; 45using namespace Opie;
46#else 46#else
47#include "resource.h" 47#include "resource.h"
48#include <qapplication.h> 48#include <qapplication.h>
49#include <qfiledialog.h> 49#include <qfiledialog.h>
50#endif 50#endif
51 51
52#include <unistd.h> 52#include <unistd.h>
53 53
54using namespace Opie::Ui;
55using namespace Opie::Net;
56using namespace Opie::Ui;
57using namespace Opie::Net;
58using namespace Opie::Net;
54WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) 59WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f )
55 :QMainWindow( parent, name, f ) 60 :QMainWindow( parent, name, f )
56{ 61{
57 cw = new WellenreiterConfigWindow( this ); 62 cw = new WellenreiterConfigWindow( this );
58 mw = new Wellenreiter( this ); 63 mw = new Wellenreiter( this );
59 mw->setConfigWindow( cw ); 64 mw->setConfigWindow( cw );
60 setCentralWidget( mw ); 65 setCentralWidget( mw );
61 66
62 // setup application icon 67 // setup application icon
63 68
64 setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) ); 69 setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) );
65 #ifndef QWS 70 #ifndef QWS
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp
index ef5d020..8312e71 100644
--- a/noncore/net/wellenreiter/gui/packetview.cpp
+++ b/noncore/net/wellenreiter/gui/packetview.cpp
@@ -16,24 +16,27 @@
16#include "packetview.h" 16#include "packetview.h"
17 17
18/* OPIE */ 18/* OPIE */
19#include <opie2/opcap.h> 19#include <opie2/opcap.h>
20 20
21/* QT */ 21/* QT */
22#include <qtextview.h> 22#include <qtextview.h>
23#include <qspinbox.h> 23#include <qspinbox.h>
24#include <qlabel.h> 24#include <qlabel.h>
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qlist.h> 26#include <qlist.h>
27 27
28using namespace Opie::Net;
29using namespace Opie::Net;
30using namespace Opie::Net;
28PacketView::PacketView( QWidget * parent, const char * name, WFlags f ) 31PacketView::PacketView( QWidget * parent, const char * name, WFlags f )
29 :QFrame( parent, name, f ) 32 :QFrame( parent, name, f )
30{ 33{
31 _number = new QSpinBox( this ); 34 _number = new QSpinBox( this );
32 _number->setPrefix( "Packet # " ); 35 _number->setPrefix( "Packet # " );
33 _label = new QLabel( this ); 36 _label = new QLabel( this );
34 _label->setText( "eth0 2004/03/08 - 00:00:21" ); 37 _label->setText( "eth0 2004/03/08 - 00:00:21" );
35 _list = new QLabel( this ); 38 _list = new QLabel( this );
36 _hex = new QTextView( this ); 39 _hex = new QTextView( this );
37 40
38 QVBoxLayout* vb = new QVBoxLayout( this, 2, 2 ); 41 QVBoxLayout* vb = new QVBoxLayout( this, 2, 2 );
39 QHBoxLayout* hb = new QHBoxLayout( vb, 2 ); 42 QHBoxLayout* hb = new QHBoxLayout( vb, 2 );
diff --git a/noncore/net/wellenreiter/gui/packetview.h b/noncore/net/wellenreiter/gui/packetview.h
index b5f2b26..1ac19bb 100644
--- a/noncore/net/wellenreiter/gui/packetview.h
+++ b/noncore/net/wellenreiter/gui/packetview.h
@@ -14,36 +14,36 @@
14**********************************************************************/ 14**********************************************************************/
15 15
16#ifndef PACKETVIEW_H 16#ifndef PACKETVIEW_H
17#define PACKETVIEW_H 17#define PACKETVIEW_H
18 18
19#include <qlist.h> 19#include <qlist.h>
20#include <qframe.h> 20#include <qframe.h>
21 21
22class QString; 22class QString;
23class QSpinBox; 23class QSpinBox;
24class QLabel; 24class QLabel;
25class QTextView; 25class QTextView;
26class OPacket; 26namespace Opie {namespace Net {class Opie::Net::OPacket;}}
27 27
28class PacketView: public QFrame 28class PacketView: public QFrame
29{ 29{
30 30
31 public: 31 public:
32 PacketView( QWidget * parent = 0, const char * name = "PacketView", WFlags f = 0 ); 32 PacketView( QWidget * parent = 0, const char * name = "PacketView", WFlags f = 0 );
33 33
34 void add( OPacket* p ); 34 void add( Opie::Net::OPacket* p );
35 const QString getLog() const; 35 const QString getLog() const;
36 void clear(); 36 void clear();
37 37
38 protected: 38 protected:
39 39
40 QSpinBox* _number; 40 QSpinBox* _number;
41 QLabel* _label; 41 QLabel* _label;
42 QLabel* _list; 42 QLabel* _list;
43 QTextView* _hex; 43 QTextView* _hex;
44 QList<OPacket> _packets; 44 QList<Opie::Net::OPacket> _packets;
45 45
46}; 46};
47 47
48#endif 48#endif
49 49
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index 6005818..3b7120a 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -37,24 +37,30 @@ const int col_type = 0;
37const int col_essid = 0; 37const int col_essid = 0;
38const int col_sig = 1; 38const int col_sig = 1;
39const int col_ap = 2; 39const int col_ap = 2;
40const int col_channel = 3; 40const int col_channel = 3;
41const int col_wep = 4; 41const int col_wep = 4;
42const int col_traffic = 5; 42const int col_traffic = 5;
43const int col_ip = 6; 43const int col_ip = 6;
44const int col_manuf = 7; 44const int col_manuf = 7;
45const int col_firstseen = 8; 45const int col_firstseen = 8;
46const int col_lastseen = 9; 46const int col_lastseen = 9;
47const int col_location = 10; 47const int col_location = 10;
48 48
49using namespace Opie::Net;
50using namespace Opie::Ui;
51using namespace Opie::Net;
52using namespace Opie::Ui;
53using namespace Opie::Ui;
54using namespace Opie::Net;
49MScanListView::MScanListView( QWidget* parent, const char* name ) 55MScanListView::MScanListView( QWidget* parent, const char* name )
50 :OListView( parent, name ) 56 :OListView( parent, name )
51{ 57{
52 setFrameShape( QListView::StyledPanel ); 58 setFrameShape( QListView::StyledPanel );
53 setFrameShadow( QListView::Sunken ); 59 setFrameShadow( QListView::Sunken );
54 60
55 addColumn( tr( "Net/Station" ) ); 61 addColumn( tr( "Net/Station" ) );
56 setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); 62 setColumnAlignment( col_essid, AlignLeft || AlignVCenter );
57 addColumn( tr( "#" ) ); 63 addColumn( tr( "#" ) );
58 setColumnAlignment( col_sig, AlignCenter ); 64 setColumnAlignment( col_sig, AlignCenter );
59 addColumn( tr( "MAC" ) ); 65 addColumn( tr( "MAC" ) );
60 setColumnAlignment( col_ap, AlignCenter ); 66 setColumnAlignment( col_ap, AlignCenter );
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h
index ab870c2..6a80f70 100644
--- a/noncore/net/wellenreiter/gui/scanlist.h
+++ b/noncore/net/wellenreiter/gui/scanlist.h
@@ -19,61 +19,61 @@
19#include "gps.h" 19#include "gps.h"
20 20
21/* OPIE */ 21/* OPIE */
22#include <opie2/olistview.h> 22#include <opie2/olistview.h>
23#include <opie2/onetutils.h> 23#include <opie2/onetutils.h>
24 24
25/* QT */ 25/* QT */
26#include <qtextstream.h> 26#include <qtextstream.h>
27 27
28class QString; 28class QString;
29class MScanListItem; 29class MScanListItem;
30 30
31class MScanListView: public OListView 31class MScanListView: public Opie::Ui::OListView
32{ 32{
33 Q_OBJECT 33 Q_OBJECT
34 34
35 public: 35 public:
36 MScanListView( QWidget* parent = 0, const char* name = 0 ); 36 MScanListView( QWidget* parent = 0, const char* name = 0 );
37 virtual ~MScanListView(); 37 virtual ~MScanListView();
38 38
39 virtual OListViewItem* childFactory(); 39 virtual Opie::Ui::OListViewItem* childFactory();
40 virtual void serializeTo( QDataStream& s ) const; 40 virtual void serializeTo( QDataStream& s ) const;
41 virtual void serializeFrom( QDataStream& s ); 41 virtual void serializeFrom( QDataStream& s );
42 42
43 public slots: 43 public slots:
44 void addNewItem( const QString& type, const QString&, const OMacAddress&, bool, int, int, const GpsLocation&, bool = false ); 44 void addNewItem( const QString& type, const QString&, const Opie::Net::OMacAddress&, bool, int, int, const GpsLocation&, bool = false );
45 void addService( const QString& name, const OMacAddress& macaddr, const QString& ip ); 45 void addService( const QString& name, const Opie::Net::OMacAddress& macaddr, const QString& ip );
46 46
47 void fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); 47 void fromDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
48 void toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); 48 void toDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
49 void WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ); 49 void WDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& viaFrom, const Opie::Net::OMacAddress& viaTo );
50 void IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); 50 void IBSStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
51 51
52 void identify( const OMacAddress&, const QString& ipaddr ); 52 void identify( const Opie::Net::OMacAddress&, const QString& ipaddr );
53 53
54 void contextMenuRequested( QListViewItem* item, const QPoint&, int ); 54 void contextMenuRequested( QListViewItem* item, const QPoint&, int );
55 55
56 signals: 56 signals:
57 void rightButtonClicked(QListViewItem*,const QPoint&,int); 57 void rightButtonClicked(QListViewItem*,const QPoint&,int);
58 void joinNetwork( const QString&, const QString&, int, const QString& ); 58 void joinNetwork( const QString&, const QString&, int, const QString& );
59 59
60 protected: 60 protected:
61 void addIfNotExisting( MScanListItem* parent, const OMacAddress& addr, const QString& type = "station" ); 61 void addIfNotExisting( MScanListItem* parent, const Opie::Net::OMacAddress& addr, const QString& type = "station" );
62 62
63}; 63};
64 64
65//****************************** MScanListItem **************************************************************** 65//****************************** MScanListItem ****************************************************************
66 66
67class MScanListItem: public OListViewItem 67class MScanListItem: public Opie::Ui::OListViewItem
68{ 68{
69 public: 69 public:
70 MScanListItem::MScanListItem( QListView* parent, 70 MScanListItem::MScanListItem( QListView* parent,
71 const QString& type = "unknown", 71 const QString& type = "unknown",
72 const QString& essid = "unknown", 72 const QString& essid = "unknown",
73 const QString& macaddr = "unknown", 73 const QString& macaddr = "unknown",
74 bool wep = false, 74 bool wep = false,
75 int channel = 0, 75 int channel = 0,
76 int signal = 0, 76 int signal = 0,
77 bool probed = false ); 77 bool probed = false );
78 78
79 MScanListItem::MScanListItem( QListViewItem* parent, 79 MScanListItem::MScanListItem( QListViewItem* parent,
@@ -97,44 +97,44 @@ class MScanListItem: public OListViewItem
97 const QString& macaddr() { return _macaddr; }; 97 const QString& macaddr() { return _macaddr; };
98 bool wep() { return _wep; }; 98 bool wep() { return _wep; };
99 int channel() { return _channel; }; 99 int channel() { return _channel; };
100 int signal() { return _signal; }; 100 int signal() { return _signal; };
101 int beacons() { return _beacons; }; 101 int beacons() { return _beacons; };
102 102
103 void setSignal( int signal ) { /* TODO */ }; 103 void setSignal( int signal ) { /* TODO */ };
104 void receivedBeacon(); 104 void receivedBeacon();
105 105
106 void setManufacturer( const QString& manufacturer ); 106 void setManufacturer( const QString& manufacturer );
107 void setLocation( const QString& location ); 107 void setLocation( const QString& location );
108 108
109 virtual OListViewItem* childFactory(); 109 virtual Opie::Ui::OListViewItem* childFactory();
110 virtual void serializeTo( QDataStream& s ) const; 110 virtual void serializeTo( QDataStream& s ) const;
111 virtual void serializeFrom( QDataStream& s ); 111 virtual void serializeFrom( QDataStream& s );
112 112
113 private: 113 private:
114 QString _type; 114 QString _type;
115 QString _essid; 115 QString _essid;
116 QString _macaddr; 116 QString _macaddr;
117 bool _wep; 117 bool _wep;
118 int _channel; 118 int _channel;
119 int _signal; 119 int _signal;
120 int _beacons; 120 int _beacons;
121 121
122}; 122};
123 123
124//****************************** MScanListViewFactory **************************************************************** 124//****************************** MScanListViewFactory ****************************************************************
125 125
126/* 126/*
127 127
128class MScanListViewFactory : public OListViewFactory 128class MScanListViewFactory : public Opie::Ui::OListViewFactory
129{ 129{
130public: 130public:
131 virtual QListView* listViewFactory(); 131 virtual QListView* listViewFactory();
132 virtual QListViewItem* listViewItemFactory( QListView* lv ); 132 virtual QListViewItem* listViewItemFactory( QListView* lv );
133 virtual QListViewItem* listViewItemFactory( QListViewItem* lvi ); 133 virtual QListViewItem* listViewItemFactory( QListViewItem* lvi );
134 virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text ); 134 virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text );
135 virtual void setCustomData( int depth, QListViewItem* lvi, const QString& text ); 135 virtual void setCustomData( int depth, QListViewItem* lvi, const QString& text );
136} 136}
137*/ 137*/
138 138
139#endif 139#endif
140 140
diff --git a/noncore/net/wellenreiter/gui/statwindow.cpp b/noncore/net/wellenreiter/gui/statwindow.cpp
index 48e4847..e3c6bbe 100644
--- a/noncore/net/wellenreiter/gui/statwindow.cpp
+++ b/noncore/net/wellenreiter/gui/statwindow.cpp
@@ -7,24 +7,27 @@
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#include "statwindow.h" 16#include "statwindow.h"
17#include <opie2/olistview.h> 17#include <opie2/olistview.h>
18 18
19using namespace Opie::Ui;
20using namespace Opie::Ui;
21using namespace Opie::Ui;
19MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f ) 22MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f )
20 :QVBox( parent, name, f ) 23 :QVBox( parent, name, f )
21{ 24{
22 table = new OListView( this ); 25 table = new OListView( this );
23 table->addColumn( tr( "Protocol" ) ); 26 table->addColumn( tr( "Protocol" ) );
24 table->addColumn( tr( "Count" ) ); 27 table->addColumn( tr( "Count" ) );
25 table->setItemMargin( 2 ); 28 table->setItemMargin( 2 );
26}; 29};
27 30
28 31
29void MStatWindow::updateCounter( const QString& protocol, int counter ) 32void MStatWindow::updateCounter( const QString& protocol, int counter )
30{ 33{
diff --git a/noncore/net/wellenreiter/gui/statwindow.h b/noncore/net/wellenreiter/gui/statwindow.h
index b9057e7..e11247b 100644
--- a/noncore/net/wellenreiter/gui/statwindow.h
+++ b/noncore/net/wellenreiter/gui/statwindow.h
@@ -10,34 +10,34 @@
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#ifndef STATWINDOW_H 16#ifndef STATWINDOW_H
17#define STATWINDOW_H 17#define STATWINDOW_H
18 18
19#include <qvbox.h> 19#include <qvbox.h>
20 20
21class QString; 21class QString;
22class OListView; 22namespace Opie {namespace Ui {class Opie::Ui::OListView;}}
23 23
24class MStatWindow: public QVBox 24class MStatWindow: public QVBox
25{ 25{
26 Q_OBJECT 26 Q_OBJECT
27 27
28 public: 28 public:
29 MStatWindow( QWidget * parent = 0, const char * name = "MStatWindow", WFlags f = 0 ); 29 MStatWindow( QWidget * parent = 0, const char * name = "MStatWindow", WFlags f = 0 );
30 30
31 void log( QString text ); 31 void log( QString text );
32 const QString getLog() const; 32 const QString getLog() const;
33 void clear(); 33 void clear();
34 34
35 void updateCounter( const QString&, int ); 35 void updateCounter( const QString&, int );
36 36
37 protected: 37 protected:
38 OListView* table; 38 Opie::Ui::OListView* table;
39 39
40}; 40};
41 41
42#endif 42#endif
43 43
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index ce416e5..e8d9de7 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -52,24 +52,30 @@ using namespace Opie;
52#include <qtoolbutton.h> 52#include <qtoolbutton.h>
53#include <qmainwindow.h> 53#include <qmainwindow.h>
54 54
55// Standard 55// Standard
56 56
57#include <assert.h> 57#include <assert.h>
58#include <errno.h> 58#include <errno.h>
59#include <unistd.h> 59#include <unistd.h>
60#include <string.h> 60#include <string.h>
61#include <sys/types.h> 61#include <sys/types.h>
62#include <stdlib.h> 62#include <stdlib.h>
63 63
64using namespace Opie::Core;
65using namespace Opie::Net;
66using namespace Opie::Net;
67using namespace Opie::Core;
68using namespace Opie::Net;
69using namespace Opie::Core;
64Wellenreiter::Wellenreiter( QWidget* parent ) 70Wellenreiter::Wellenreiter( QWidget* parent )
65 : WellenreiterBase( parent, 0, 0 ), 71 : WellenreiterBase( parent, 0, 0 ),
66 sniffing( false ), iface( 0 ), configwindow( 0 ) 72 sniffing( false ), iface( 0 ), configwindow( 0 )
67{ 73{
68 74
69 logwindow->log( "(i) Wellenreiter has been started." ); 75 logwindow->log( "(i) Wellenreiter has been started." );
70 76
71 // 77 //
72 // detect operating system 78 // detect operating system
73 // 79 //
74 80
75 #ifdef QWS 81 #ifdef QWS
@@ -437,25 +443,25 @@ void Wellenreiter::receivePacket( OPacket* p )
437 handleIPData( p, ip, source, dest ); 443 handleIPData( p, ip, source, dest );
438 } 444 }
439 445
440 //handleNotification( p ); 446 //handleNotification( p );
441 447
442} 448}
443 449
444 450
445void Wellenreiter::stopClicked() 451void Wellenreiter::stopClicked()
446{ 452{
447 if ( iface ) 453 if ( iface )
448 { 454 {
449 disconnect( SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); 455 disconnect( SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) );
450 disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); 456 disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
451 iface->setChannelHopping(); // stop hopping channels 457 iface->setChannelHopping(); // stop hopping channels
452 } 458 }
453 else 459 else
454 killTimers(); 460 killTimers();
455 461
456 pcap->close(); 462 pcap->close();
457 sniffing = false; 463 sniffing = false;
458 464
459 if ( iface ) 465 if ( iface )
460 { 466 {
461 // switch off monitor mode 467 // switch off monitor mode
@@ -602,25 +608,25 @@ void Wellenreiter::startClicked()
602 pcap->setBlocking( false ); 608 pcap->setBlocking( false );
603 609
604 // start channel hopper 610 // start channel hopper
605 if ( cardtype != DEVTYPE_FILE ) 611 if ( cardtype != DEVTYPE_FILE )
606 { 612 {
607 logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) ); 613 logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) );
608 iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window 614 iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window
609 } 615 }
610 616
611 if ( cardtype != DEVTYPE_FILE ) 617 if ( cardtype != DEVTYPE_FILE )
612 { 618 {
613 // connect socket notifier and start channel hopper 619 // connect socket notifier and start channel hopper
614 connect( pcap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) ); 620 connect( pcap, SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) );
615 connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); 621 connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
616 } 622 }
617 else 623 else
618 { 624 {
619 // start timer for reading packets 625 // start timer for reading packets
620 startTimer( 100 ); 626 startTimer( 100 );
621 } 627 }
622 628
623 logwindow->log( "(i) Started Scanning." ); 629 logwindow->log( "(i) Started Scanning." );
624 sniffing = true; 630 sniffing = true;
625 631
626 #ifdef QWS 632 #ifdef QWS
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index d02813b..83299c9 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -9,39 +9,39 @@
9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11** 11**
12**********************************************************************/ 12**********************************************************************/
13 13
14#ifndef WELLENREITER_H 14#ifndef WELLENREITER_H
15#define WELLENREITER_H 15#define WELLENREITER_H
16 16
17#include "wellenreiterbase.h" 17#include "wellenreiterbase.h"
18 18
19#ifdef QWS 19#ifdef QWS
20#include <opie2/odevice.h> 20#include <opie2/odevice.h>
21using namespace Opie;
22#endif 21#endif
23 22
24class QTimerEvent; 23class QTimerEvent;
25class QPixmap; 24class QPixmap;
26class OPacket; 25namespace Opie {namespace Net {class Opie::Net::OPacket;}}
27class OWaveLanManagementPacket; 26namespace Opie {namespace Net {class Opie::Net::OWaveLanManagementPacket;}}
28class OWaveLanControlPacket; 27namespace Opie {namespace Net {class Opie::Net::OWaveLanControlPacket;}}
29class OWaveLanDataPacket; 28namespace Opie {namespace Net {class Opie::Net::OWaveLanDataPacket;}}
30class OEthernetPacket; 29namespace Opie {namespace Net {class Opie::Net::OEthernetPacket;}}
31class OARPPacket; 30namespace Opie {namespace Net {class Opie::Net::OARPPacket;}}
32class OMacAddress; 31namespace Opie {namespace Net {class Opie::Net::OMacAddress;}}
33class OIPPacket; 32namespace Opie {namespace Net {class Opie::Net::OIPPacket;}}
34class OPacketCapturer; 33namespace Opie {namespace Net {class Opie::Net::OPacket;}}
35class OWirelessNetworkInterface; 34namespace Opie {namespace Net {class Opie::Net::OWirelessNetworkInterface;}}
35namespace Opie {namespace Net {class Opie::Net::OPacketCapturer;}}
36class PacketView; 36class PacketView;
37class WellenreiterConfigWindow; 37class WellenreiterConfigWindow;
38class MLogWindow; 38class MLogWindow;
39class GPS; 39class GPS;
40 40
41class Wellenreiter : public WellenreiterBase { 41class Wellenreiter : public WellenreiterBase {
42 Q_OBJECT 42 Q_OBJECT
43 43
44 public: 44 public:
45 Wellenreiter( QWidget* parent = 0 ); 45 Wellenreiter( QWidget* parent = 0 );
46 ~Wellenreiter(); 46 ~Wellenreiter();
47 47
@@ -53,55 +53,55 @@ class Wellenreiter : public WellenreiterBase {
53 QString captureFileName() const { return dumpname; }; 53 QString captureFileName() const { return dumpname; };
54 54
55 public: 55 public:
56 bool sniffing; 56 bool sniffing;
57 57
58 protected: 58 protected:
59 virtual void timerEvent( QTimerEvent* ); 59 virtual void timerEvent( QTimerEvent* );
60 60
61 public slots: 61 public slots:
62 void initialTimer(); 62 void initialTimer();
63 63
64 void channelHopped(int); 64 void channelHopped(int);
65 void receivePacket(OPacket*); 65 void receivePacket(Opie::Net::OPacket*);
66 void startClicked(); 66 void startClicked();
67 void stopClicked(); 67 void stopClicked();
68 68
69 void joinNetwork(const QString&,const QString&,int,const QString&); 69 void joinNetwork(const QString&,const QString&,int,const QString&);
70 70
71 signals: 71 signals:
72 void startedSniffing(); 72 void startedSniffing();
73 void stoppedSniffing(); 73 void stoppedSniffing();
74 74
75 private: 75 private:
76 void handleManagementFrame( OPacket* p, OWaveLanManagementPacket* ); 76 void handleManagementFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
77 void handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPacket* ); 77 void handleManagementFrameBeacon( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
78 void handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* ); 78 void handleManagementFrameProbeRequest( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
79 void handleManagementFrameProbeResponse( OPacket* p, OWaveLanManagementPacket* ); 79 void handleManagementFrameProbeResponse( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
80 void handleControlFrame( OPacket* p, OWaveLanControlPacket* control ); 80 void handleControlFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanControlPacket* control );
81 void handleWlanData( OPacket* p, OWaveLanDataPacket* data, OMacAddress& from, OMacAddress& to ); 81 void handleWlanData( Opie::Net::OPacket* p, Opie::Net::OWaveLanDataPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
82 void handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAddress& from, OMacAddress& to ); 82 void handleEthernetData( Opie::Net::OPacket* p, Opie::Net::OEthernetPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
83 void handleARPData( OPacket* p, OARPPacket* arp, OMacAddress& from, OMacAddress& to ); 83 void handleARPData( Opie::Net::OPacket* p, Opie::Net::OARPPacket* arp, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
84 void handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& from, OMacAddress& to ); 84 void handleIPData( Opie::Net::OPacket* p, Opie::Net::OIPPacket* ip, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
85 void handleNotification( OPacket* p ); 85 void handleNotification( Opie::Net::OPacket* p );
86 void doAction( const QString& action, const QString& protocol, OPacket* p ); 86 void doAction( const QString& action, const QString& protocol, Opie::Net::OPacket* p );
87 QObject* childIfToParse( OPacket* p, const QString& protocol ); 87 QObject* childIfToParse( Opie::Net::OPacket* p, const QString& protocol );
88 bool checkDumpPacket( OPacket* p ); 88 bool checkDumpPacket( Opie::Net::OPacket* p );
89 89
90 private: 90 private:
91 #ifdef QWS 91 #ifdef QWS
92 OSystem _system; // Opie Operating System identifier 92 Opie::Core::OSystem _system; // Opie Operating System identifier
93 #endif 93 #endif
94 94
95 QString dumpname; 95 QString dumpname;
96 OWirelessNetworkInterface* iface; 96 Opie::Net::OWirelessNetworkInterface* iface;
97 OPacketCapturer* pcap; 97 Opie::Net::OPacketCapturer* pcap;
98 WellenreiterConfigWindow* configwindow; 98 WellenreiterConfigWindow* configwindow;
99 GPS* gps; 99 GPS* gps;
100 100
101 //void readConfig(); 101 //void readConfig();
102 //void writeConfig(); 102 //void writeConfig();
103}; 103};
104 104
105 105
106 106
107#endif 107#endif
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
index 3d0595d..f035e89 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
@@ -29,24 +29,27 @@
29#include <opie2/otabwidget.h> 29#include <opie2/otabwidget.h>
30using namespace Opie; 30using namespace Opie;
31#else 31#else
32#include "resource.h" 32#include "resource.h"
33#include <qtabwidget.h> 33#include <qtabwidget.h>
34#endif 34#endif
35 35
36 36
37/* 37/*
38 * Constructs a WellenreiterBase which is a child of 'parent', with the 38 * Constructs a WellenreiterBase which is a child of 'parent', with the
39 * name 'name' and widget flags set to 'f' 39 * name 'name' and widget flags set to 'f'
40 */ 40 */
41using namespace Opie::Ui;
42using namespace Opie::Ui;
43using namespace Opie::Ui;
41WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) 44WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl )
42 : QWidget( parent, name, fl ) 45 : QWidget( parent, name, fl )
43{ 46{
44 //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); 47 //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) );
45 //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); 48 //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) );
46 //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); 49 //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) );
47 //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); 50 //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) );
48 51
49 if ( !name ) 52 if ( !name )
50 setName( "WellenreiterBase" ); 53 setName( "WellenreiterBase" );
51 resize( 191, 294 ); 54 resize( 191, 294 );
52#ifdef QWS 55#ifdef QWS
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.h b/noncore/net/wellenreiter/gui/wellenreiterbase.h
index 126aad2..e40b699 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.h
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.h
@@ -37,25 +37,25 @@ using namespace Opie;
37class QTabWidget; 37class QTabWidget;
38#endif 38#endif
39 39
40class WellenreiterBase : public QWidget 40class WellenreiterBase : public QWidget
41{ 41{
42 Q_OBJECT 42 Q_OBJECT
43 43
44public: 44public:
45 WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 45 WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
46 ~WellenreiterBase(); 46 ~WellenreiterBase();
47 47
48#ifdef QWS 48#ifdef QWS
49 OTabWidget* TabWidget; 49 Opie::Ui::OTabWidget* TabWidget;
50#else 50#else
51 QTabWidget* TabWidget; 51 QTabWidget* TabWidget;
52#endif 52#endif
53 QWidget* ap; 53 QWidget* ap;
54 MScanListView* netview; 54 MScanListView* netview;
55 MLogWindow* logwindow; 55 MLogWindow* logwindow;
56 PacketView* hexwindow; 56 PacketView* hexwindow;
57 MStatWindow* statwindow; 57 MStatWindow* statwindow;
58 MGraphWindow* graphwindow; 58 MGraphWindow* graphwindow;
59 QWidget* about; 59 QWidget* about;
60 QLabel* PixmapLabel1_3_2; 60 QLabel* PixmapLabel1_3_2;
61 QLabel* TextLabel1_4_2; 61 QLabel* TextLabel1_4_2;