summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/README4
-rw-r--r--noncore/net/wellenreiter/gui/hexwindow.cpp13
-rw-r--r--noncore/net/wellenreiter/gui/hexwindow.h6
-rw-r--r--noncore/net/wellenreiter/gui/logwindow.cpp15
-rw-r--r--noncore/net/wellenreiter/gui/statwindow.cpp36
-rw-r--r--noncore/net/wellenreiter/gui/statwindow.h11
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp18
-rwxr-xr-xnoncore/net/wellenreiter/makedist.sh2
8 files changed, 47 insertions, 58 deletions
diff --git a/noncore/net/wellenreiter/README b/noncore/net/wellenreiter/README
index 291f1fe..ec621b9 100644
--- a/noncore/net/wellenreiter/README
+++ b/noncore/net/wellenreiter/README
@@ -1,33 +1,33 @@
/************************************************************************
/* W e l l e n r e i t e r I I
/* ===============================
/*
-/* Version: ALPHA-2-April
+/* Version: April BETA
/************************************************************************
----------------------------------------------------
-Release Notes for Opie-ALPHA Version April 2003
+Release Notes for Opie-Wellenreiter Version BETA April 2003
----------------------------------------------------
=====================
= Supported Devices
=====================
- HERMES chipset [ orinoco or hostap ], e.g. Lucent/Agere cards, ...
- PRISM2 chipset [ orinoco or hostap ], e.g. D-Link, Buffallo, ...
- SYMBOL/SPECTRUM chipset [ orinoco ], e.g. Symbol Spectrum 24, Socket Lowpower CF, ...
- CISCO chipset
- wlan-ng supported chipsets
=====================
= Build
=====================
To compile a standalone Wellenreiter for X11, you need Qt3 and the development
packages for Qt3, e.g. libqt3-devel.
* Set $QTDIR to the appropriate directory (e.g. /usr/lib/qt3)
* './build make'
* as root, './build install'
* Wellenreiter will be installed in /usr/local
diff --git a/noncore/net/wellenreiter/gui/hexwindow.cpp b/noncore/net/wellenreiter/gui/hexwindow.cpp
index 8b17285..2f011ca 100644
--- a/noncore/net/wellenreiter/gui/hexwindow.cpp
+++ b/noncore/net/wellenreiter/gui/hexwindow.cpp
@@ -1,45 +1,44 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** 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 ) );
-
- // FIXME: Set properties( font, read-only, etc...)
-
+ ledit->setReadOnly( true );
};
-void MHexWindow::log( QString text )
+void MHexWindow::log( const QString& text )
{
-
- ledit->append( text );
-
+ int col;
+ int row;
+ ledit->getCursorPosition( &col, &row );
+ ledit->insertAt( text, col, row );
};
const QString MHexWindow::getLog() const
{
return ledit->text();
}
void MHexWindow::clear()
{
ledit->clear();
}
diff --git a/noncore/net/wellenreiter/gui/hexwindow.h b/noncore/net/wellenreiter/gui/hexwindow.h
index f2f870c..3d4ec0f 100644
--- a/noncore/net/wellenreiter/gui/hexwindow.h
+++ b/noncore/net/wellenreiter/gui/hexwindow.h
@@ -5,36 +5,36 @@
**
** 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 );
-
- void log( QString text );
+
+ void log( const QString& text );
const QString getLog() const;
void clear();
-
+
protected:
QMultiLineEdit* ledit;
};
#endif
diff --git a/noncore/net/wellenreiter/gui/logwindow.cpp b/noncore/net/wellenreiter/gui/logwindow.cpp
index 55e2ccb..12f74fd 100644
--- a/noncore/net/wellenreiter/gui/logwindow.cpp
+++ b/noncore/net/wellenreiter/gui/logwindow.cpp
@@ -1,47 +1,50 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** 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( QWidget * parent, const char * name, WFlags f )
:QVBox( parent, name, f )
{
ledit = new QMultiLineEdit( this );
-
- // FIXME: Set properties( font, read-only, etc...)
-
+ ledit->setReadOnly( true );
}
+
void MLogWindow::log( QString text )
{
QTime time = QTime::currentTime();
QString line;
- line.sprintf( "[%s] %s", (const char*) time.toString(), (const char*) text );
- ledit->append( line );
+ line.sprintf( "[%s] %s\n", (const char*) time.toString(), (const char*) text );
+ int col;
+ int row;
+ ledit->getCursorPosition( &col, &row );
+ ledit->insertAt( line, col, row );
qDebug( line );
-
}
+
void MLogWindow::clear()
{
ledit->clear();
}
+
const QString MLogWindow::getLog() const
{
return ledit->text();
}
diff --git a/noncore/net/wellenreiter/gui/statwindow.cpp b/noncore/net/wellenreiter/gui/statwindow.cpp
index 07d34ef..2c8c774 100644
--- a/noncore/net/wellenreiter/gui/statwindow.cpp
+++ b/noncore/net/wellenreiter/gui/statwindow.cpp
@@ -1,45 +1,43 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** 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 <qmultilineedit.h>
+#include <opie2/olistview.h>
MStatWindow::MStatWindow( QWidget * parent, const char * name, WFlags f )
:QVBox( parent, name, f )
{
- ledit = new QMultiLineEdit( this );
- ledit->setFont( QFont( "fixed", 10 ) );
-
- // FIXME: Set properties( font, read-only, etc...)
-
+ table = new OListView( this );
+ table->addColumn( "Protocol" );
+ table->addColumn( "Count" );
+ table->setItemMargin( 2 );
};
-void MStatWindow::log( QString text )
-{
-
- ledit->append( text );
-
-};
-
-const QString MStatWindow::getLog() const
-{
- return ledit->text();
-}
-void MStatWindow::clear()
+void MStatWindow::updateCounter( const QString& protocol, int counter )
{
- ledit->clear();
+ QListViewItemIterator it( table );
+ for ( ; it.current(); ++it )
+ {
+ if ( it.current()->text( 0 ) == protocol )
+ {
+ it.current()->setText( 1, QString::number( counter ) );
+ return;
+ }
+ }
+
+ new OListViewItem( table, protocol, QString::number( counter ) );
}
diff --git a/noncore/net/wellenreiter/gui/statwindow.h b/noncore/net/wellenreiter/gui/statwindow.h
index bbdf777..0ab4b50 100644
--- a/noncore/net/wellenreiter/gui/statwindow.h
+++ b/noncore/net/wellenreiter/gui/statwindow.h
@@ -1,40 +1,43 @@
/**********************************************************************
** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
**
** This file is part of Opie Environment.
**
** 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 QMultiLineEdit;
+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:
- QMultiLineEdit* ledit;
+ OListView* table;
};
#endif
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 0105e09..5ec9ee4 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -11,48 +11,49 @@
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
***********************************************************************/
// Opie
#ifdef QWS
#include <opie/odevice.h>
using namespace Opie;
#endif
#ifdef QWS
#include <opie2/oapplication.h>
#else
#include <qapplication.h>
#endif
#include <opie2/onetwork.h>
#include <opie2/opcap.h>
// Qt
#include <qcheckbox.h>
#include <qcombobox.h>
+#include <qdatetime.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qmessagebox.h>
#include <qregexp.h>
#include <qspinbox.h>
#include <qtoolbutton.h>
#include <qmainwindow.h>
// Standard
#include <assert.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
// Local
#include "wellenreiter.h"
#include "scanlist.h"
#include "logwindow.h"
#include "hexwindow.h"
#include "configwindow.h"
@@ -236,65 +237,50 @@ void Wellenreiter::stopClicked()
pcap->close();
sniffing = false;
if ( iface )
{
// switch off monitor mode
iface->setMonitorMode( false );
// switch off promisc flag
iface->setPromiscuousMode( false );
system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess
}
logwindow->log( "(i) Stopped Scanning." );
assert( parent() );
( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" );
// message the user
QMessageBox::information( this, "Wellenreiter II", "Your wireless card\nshould now be usable again." );
sniffing = false;
emit( stoppedSniffing() );
// print out statistics
- statwindow->log( "-----------------------------------------" );
- statwindow->log( "- Wellenreiter II Capturing Statistic -" );
- statwindow->log( "-----------------------------------------" );
- statwindow->log( "Packet Type | Receive Count" );
-
for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
- {
- QString left;
- left.sprintf( "%s", (const char*) it.key() );
- left = left.leftJustify( 20 );
- left.append( '|' );
- QString right;
- right.sprintf( "%d", it.data() );
- right = right.rightJustify( 7 );
- statwindow->log( left + right );
- }
-
+ statwindow->updateCounter( it.key(), it.data() );
}
void Wellenreiter::startClicked()
{
// get configuration from config window
const QString& interface = configwindow->interfaceName->currentText();
const int cardtype = configwindow->daemonDeviceType();
const int interval = configwindow->daemonHopInterval();
if ( ( interface == "" ) || ( cardtype == 0 ) )
{
QMessageBox::information( this, "Wellenreiter II", "Your device is not\nproperly configured. Please reconfigure!" );
return;
}
// configure device
ONetwork* net = ONetwork::instance();
iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface ));
// set monitor mode
diff --git a/noncore/net/wellenreiter/makedist.sh b/noncore/net/wellenreiter/makedist.sh
index 1795ae5..cfb0b16 100755
--- a/noncore/net/wellenreiter/makedist.sh
+++ b/noncore/net/wellenreiter/makedist.sh
@@ -1,25 +1,25 @@
-VERSION=2-alpha2
+VERSION=2-beta
TGZDIR=$PWD
# script to make a .tgz distributable for the Wellenreiter X11 Standalone Version
find . -name "*.o"|xargs rm -f
find . -name "Makefile"|xargs rm -f
find . -name "*moc*"|xargs rm -f
#TMPFILE=`mktemp -d -q /tmp/build.XXXXXX`
TMPFILE=/tmp/build
#if [ $? -ne 0 ]; then
# echo "$0: Can't create temp file, exiting..."
# exit 1
#fi
TMPDIR=$TMPFILE/wellenreiter$VERSION
OUTPUT=$TMPDIR/output
mkdir -p $TMPDIR/libopie2/opieui
mkdir -p $TMPDIR/libopie2/opienet
mkdir -p $TMPDIR/include/opie2
mkdir -p $OUTPUT/share/wellenreiter/pics
mkdir -p $OUTPUT/share/wellenreiter
cp -dfR gui $TMPDIR