summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp4
-rw-r--r--libopie2/opienet/onetwork.h30
-rw-r--r--libopie2/opienet/opcap.h5
-rw-r--r--libopie2/opieui/opieui.pro0
4 files changed, 30 insertions, 9 deletions
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
index f800336..34d32d2 100644
--- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
+++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
@@ -109,13 +109,13 @@ public:
printf( "Unknown driver. Exiting\n" );
exit( -1 );
}
// enable monitoring mode
printf( "Enabling monitor mode...\n" );
- wiface->setMonitorMode( true );
+ //wiface->setMonitorMode( true );
// open a packet capturer
cap = new OPacketCapturer();
cap->open( interface );
if ( !cap->isOpen() )
{
@@ -124,13 +124,13 @@ public:
}
// set capturer to non-blocking mode
cap->setBlocking( false );
// start channel hopper
- wiface->setChannelHopping( 1000 );
+ //wiface->setChannelHopping( 1000 );
// connect
connect( cap, SIGNAL( receivedPacket(OPacket*) ), this, SLOT( receivePacket(OPacket*) ) );
}
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index 2348bbc..f052317 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -110,13 +110,13 @@ class ONetwork : public QObject
*/
// FIXME: const QString& is prefered over QString!!! -zecke
ONetworkInterface* interface( const QString& interface ) const;
/**
* @internal Rebuild the internal interface database
* @note Sometimes it might be useful to call this from client code,
- * e.g. after cardctl insert
+ * e.g. after issuing a cardctl insert
*/
void synchronize();
protected:
ONetwork();
@@ -250,23 +250,47 @@ class ONetworkInterface : public QObject
*/
class OChannelHopper : public QObject
{
Q_OBJECT
public:
+ /**
+ * Constructor.
+ */
OChannelHopper( OWirelessNetworkInterface* );
+ /**
+ * Destructor.
+ */
virtual ~OChannelHopper();
+ /**
+ * @returns true, if the channel hopper is hopping channels
+ */
bool isActive() const;
+ /**
+ * @returns the last hopped channel
+ */
int channel() const;
- virtual void timerEvent( QTimerEvent* );
- void setInterval( int );
+ /**
+ * Set the channel hopping @a interval.
+ * An interval of 0 deactivates the channel hopper.
+ */
+ void setInterval( int interval );
+ /**
+ * @returns the channel hopping interval
+ */
int interval() const;
signals:
+ /**
+ * This signal is emitted right after the channel hopper performed a hop
+ */
void hopped( int );
+ protected:
+ virtual void timerEvent( QTimerEvent* );
+
private:
OWirelessNetworkInterface* _iface;
int _interval;
int _tid;
QValueList<int> _channels;
QValueList<int>::Iterator _channel;
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h
index 83f7115..bee0ca0 100644
--- a/libopie2/opienet/opcap.h
+++ b/libopie2/opienet/opcap.h
@@ -150,13 +150,12 @@ class OEthernetPacket : public QObject
int type() const;
private:
const struct ether_header* _ether;
};
-
/*======================================================================================
* OPrismHeaderPacket - DLT_PRISM_HEADER frame
*======================================================================================*/
class OPrismHeaderPacket : public QObject
{
@@ -169,13 +168,12 @@ class OPrismHeaderPacket : public QObject
unsigned int signalStrength() const;
private:
const struct prism_hdr* _header;
};
-
/*======================================================================================
* OWaveLanPacket - DLT_IEEE802_11 frame
*======================================================================================*/
class OWaveLanPacket : public QObject
{
@@ -349,13 +347,12 @@ class OWaveLanManagementIBSS : public QObject
};
/*======================================================================================
* OWaveLanManagementChallenge
*======================================================================================*/
-// Qobject do we need that??
class OWaveLanManagementChallenge : public QObject
{
Q_OBJECT
public:
OWaveLanManagementChallenge( const unsigned char*, const struct challenge_t*, QObject* parent = 0 );
@@ -365,13 +362,13 @@ class OWaveLanManagementChallenge : public QObject
const struct challenge_t* _data;
};
/*======================================================================================
* OWaveLanDataPacket - type: data (T_DATA)
*======================================================================================*/
-// Qobject?
+
class OWaveLanDataPacket : public QObject
{
Q_OBJECT
public:
OWaveLanDataPacket( const unsigned char*, const struct ieee_802_11_data_header*, OWaveLanPacket* parent = 0 );
diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro
index 996e1a0..aa85955 100644
--- a/libopie2/opieui/opieui.pro
+++ b/libopie2/opieui/opieui.pro