summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/packetview.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/packetview.h2
-rw-r--r--noncore/net/wellenreiter/gui/statwindow.h2
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h22
4 files changed, 13 insertions, 15 deletions
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp
index 8312e71..e0e626c 100644
--- a/noncore/net/wellenreiter/gui/packetview.cpp
+++ b/noncore/net/wellenreiter/gui/packetview.cpp
@@ -1,71 +1,69 @@
/**********************************************************************
** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
**
** 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 "packetview.h"
/* OPIE */
#include <opie2/opcap.h>
/* QT */
#include <qtextview.h>
#include <qspinbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlist.h>
using namespace Opie::Net;
-using namespace Opie::Net;
-using namespace Opie::Net;
PacketView::PacketView( QWidget * parent, const char * name, WFlags f )
:QFrame( parent, name, f )
{
_number = new QSpinBox( this );
_number->setPrefix( "Packet # " );
_label = new QLabel( this );
_label->setText( "eth0 2004/03/08 - 00:00:21" );
_list = new QLabel( this );
_hex = new QTextView( this );
QVBoxLayout* vb = new QVBoxLayout( this, 2, 2 );
QHBoxLayout* hb = new QHBoxLayout( vb, 2 );
hb->addWidget( _label );
hb->addWidget( _number );
vb->addWidget( _list );
vb->addWidget( _hex );
_packets.setAutoDelete( true );
_list->setText( "<b>[ 802.11 [ LLC [ IP [ UDP [ DHCP ] ] ] ] ]</b>" );
};
void PacketView::add( OPacket* p )
{
_packets.append( p );
};
const QString PacketView::getLog() const
{
}
void PacketView::clear()
{
_packets.clear();
_number->setMinValue( 0 );
_number->setMaxValue( 0 );
_label->setText( "---" );
_list->setText( " <b>-- no Packet available --</b> " );
_hex->setText( " <i>-- no Packet available --</i> " );
}
diff --git a/noncore/net/wellenreiter/gui/packetview.h b/noncore/net/wellenreiter/gui/packetview.h
index 1ac19bb..938aa19 100644
--- a/noncore/net/wellenreiter/gui/packetview.h
+++ b/noncore/net/wellenreiter/gui/packetview.h
@@ -1,49 +1,49 @@
/**********************************************************************
** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
**
** 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 PACKETVIEW_H
#define PACKETVIEW_H
#include <qlist.h>
#include <qframe.h>
class QString;
class QSpinBox;
class QLabel;
class QTextView;
-namespace Opie {namespace Net {class Opie::Net::OPacket;}}
+namespace Opie {namespace Net {class OPacket;}}
class PacketView: public QFrame
{
public:
PacketView( QWidget * parent = 0, const char * name = "PacketView", WFlags f = 0 );
void add( Opie::Net::OPacket* p );
const QString getLog() const;
void clear();
protected:
QSpinBox* _number;
QLabel* _label;
QLabel* _list;
QTextView* _hex;
QList<Opie::Net::OPacket> _packets;
};
#endif
diff --git a/noncore/net/wellenreiter/gui/statwindow.h b/noncore/net/wellenreiter/gui/statwindow.h
index e11247b..c514146 100644
--- a/noncore/net/wellenreiter/gui/statwindow.h
+++ b/noncore/net/wellenreiter/gui/statwindow.h
@@ -1,43 +1,43 @@
/**********************************************************************
** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
**
** 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;
-namespace Opie {namespace Ui {class Opie::Ui::OListView;}}
+namespace Opie {namespace Ui {class OListView;}}
class MStatWindow: public QVBox
{
Q_OBJECT
public:
MStatWindow( QWidget * parent = 0, const char * name = "MStatWindow", WFlags f = 0 );
void log( QString text );
const QString getLog() const;
void clear();
void updateCounter( const QString&, int );
protected:
Opie::Ui::OListView* table;
};
#endif
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index 83299c9..f609ef4 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -1,83 +1,83 @@
/**********************************************************************
** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
**
** 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 WELLENREITER_H
#define WELLENREITER_H
#include "wellenreiterbase.h"
#ifdef QWS
#include <opie2/odevice.h>
#endif
class QTimerEvent;
class QPixmap;
-namespace Opie {namespace Net {class Opie::Net::OPacket;}}
-namespace Opie {namespace Net {class Opie::Net::OWaveLanManagementPacket;}}
-namespace Opie {namespace Net {class Opie::Net::OWaveLanControlPacket;}}
-namespace Opie {namespace Net {class Opie::Net::OWaveLanDataPacket;}}
-namespace Opie {namespace Net {class Opie::Net::OEthernetPacket;}}
-namespace Opie {namespace Net {class Opie::Net::OARPPacket;}}
-namespace Opie {namespace Net {class Opie::Net::OMacAddress;}}
-namespace Opie {namespace Net {class Opie::Net::OIPPacket;}}
-namespace Opie {namespace Net {class Opie::Net::OPacket;}}
-namespace Opie {namespace Net {class Opie::Net::OWirelessNetworkInterface;}}
-namespace Opie {namespace Net {class Opie::Net::OPacketCapturer;}}
+namespace Opie {namespace Net {class OPacket;}}
+namespace Opie {namespace Net {class OWaveLanManagementPacket;}}
+namespace Opie {namespace Net {class OWaveLanControlPacket;}}
+namespace Opie {namespace Net {class OWaveLanDataPacket;}}
+namespace Opie {namespace Net {class OEthernetPacket;}}
+namespace Opie {namespace Net {class OARPPacket;}}
+namespace Opie {namespace Net {class OMacAddress;}}
+namespace Opie {namespace Net {class OIPPacket;}}
+namespace Opie {namespace Net {class OPacket;}}
+namespace Opie {namespace Net {class OWirelessNetworkInterface;}}
+namespace Opie {namespace Net {class OPacketCapturer;}}
class PacketView;
class WellenreiterConfigWindow;
class MLogWindow;
class GPS;
class Wellenreiter : public WellenreiterBase {
Q_OBJECT
public:
Wellenreiter( QWidget* parent = 0 );
~Wellenreiter();
void setConfigWindow( WellenreiterConfigWindow* cw );
MScanListView* netView() const { return netview; };
MLogWindow* logWindow() const { return logwindow; };
PacketView* hexWindow() const { return hexwindow; };
bool isDaemonRunning() const { return sniffing; };
QString captureFileName() const { return dumpname; };
public:
bool sniffing;
protected:
virtual void timerEvent( QTimerEvent* );
public slots:
void initialTimer();
void channelHopped(int);
void receivePacket(Opie::Net::OPacket*);
void startClicked();
void stopClicked();
void joinNetwork(const QString&,const QString&,int,const QString&);
signals:
void startedSniffing();
void stoppedSniffing();
private:
void handleManagementFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
void handleManagementFrameBeacon( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
void handleManagementFrameProbeRequest( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
void handleManagementFrameProbeResponse( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
void handleControlFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanControlPacket* control );
void handleWlanData( Opie::Net::OPacket* p, Opie::Net::OWaveLanDataPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
void handleEthernetData( Opie::Net::OPacket* p, Opie::Net::OEthernetPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
void handleARPData( Opie::Net::OPacket* p, Opie::Net::OARPPacket* arp, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );