summaryrefslogtreecommitdiff
path: root/libopie2/examples/opienet/miniwellenreiter
Side-by-side diff
Diffstat (limited to 'libopie2/examples/opienet/miniwellenreiter') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp25
-rw-r--r--libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro4
2 files changed, 22 insertions, 7 deletions
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
index c49daa0..eb2e8e8 100644
--- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
+++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
@@ -31,7 +31,7 @@ class Wellenreiter : public QApplication
{
Q_OBJECT
public:
- Wellenreiter( int argc, char** argv ) : QApplication( argc, argv )
+ Wellenreiter( int argc, char** argv ) : QApplication( argc, argv ), channel( 1 )
{
ONetwork* net = ONetwork::instance();
@@ -56,9 +56,9 @@ public:
exit( -1 );
}
- printf( "****************************************************\n" );
- printf( "* Wellenreiter mini edition 1.0 (C) 2003 M-M-M *\n" );
- printf( "****************************************************\n" );
+ printf( "*******************************************************************\n" );
+ printf( "* Wellenreiter mini edition 1.0.0 (C) 2003 Michael 'Mickey' Lauer *\n" );
+ printf( "*******************************************************************\n" );
printf( "\n\n" );
QString interface( argv[1] );
@@ -105,6 +105,12 @@ public:
if ( driver == "orinoco" )
new OOrinocoMonitoringInterface( wiface, false );
else
+ if ( driver == "hostap" )
+ new OHostAPMonitoringInterface( wiface, false );
+ else
+ if ( driver == "wlan-ng" )
+ new OWlanNGMonitoringInterface( wiface, false );
+ else
{
printf( "Unknown driver. Exiting\n" );
exit( -1 );
@@ -112,7 +118,7 @@ public:
// enable monitoring mode
printf( "Enabling monitor mode...\n" );
- //wiface->setMonitorMode( true );
+ wiface->setMode( "monitor" );
// open a packet capturer
cap = new OPacketCapturer();
@@ -131,12 +137,20 @@ public:
// connect
connect( cap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
+ // timer
+ startTimer( 1000 );
}
~Wellenreiter() {};
public slots:
+ virtual void timerEvent(QTimerEvent* e)
+ {
+ wiface->setChannel( channel++ );
+ if ( channel == 14 ) channel = 1;
+ }
+
void receivePacket(OPacket* p)
{
if (!p)
@@ -203,6 +217,7 @@ public slots:
private:
OPacketCapturer* cap;
OWirelessNetworkInterface* wiface;
+ int channel;
};
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro
index 7ce535c..b2c5c14 100644
--- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro
+++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.pro
@@ -6,8 +6,8 @@ INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lopiecore2 -lopienet2
TARGET = miniwellenreiter
-MOC_DIR = moc
-OBJECTS_DIR = obj
+MOC_DIR = moc
+OBJECTS_DIR = obj
include ( $(OPIEDIR)/include.pro )