author | mickeyl <mickeyl> | 2003-04-30 18:42:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-30 18:42:07 (UTC) |
commit | 027458b66cffbfaf07c394a1a622a1f01970e11c (patch) (side-by-side diff) | |
tree | 9cfbbfcebf60c2515719c0e9e2957cc18271dbe5 /libopie2 | |
parent | 30aac378ab13a7dffbd3b6a0978cabc0372cd530 (diff) | |
download | opie-027458b66cffbfaf07c394a1a622a1f01970e11c.zip opie-027458b66cffbfaf07c394a1a622a1f01970e11c.tar.gz opie-027458b66cffbfaf07c394a1a622a1f01970e11c.tar.bz2 |
add some more documentation
-rw-r--r-- | libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp | 4 | ||||
-rw-r--r-- | libopie2/opienet/onetwork.h | 30 | ||||
-rw-r--r-- | libopie2/opienet/opcap.h | 5 | ||||
-rw-r--r-- | libopie2/opieui/opieui.pro | 4 |
4 files changed, 32 insertions, 11 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 @@ -103,40 +103,40 @@ public: // connect a monitoring strategy to the interface if ( driver == "orinoco" ) new OOrinocoMonitoringInterface( wiface ); else { 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() ) { printf( "Unable to open libpcap (%s). Exiting.\n", strerror( errno ) ); exit( -1 ); } // 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*) ) ); } ~Wellenreiter() {}; public slots: void receivePacket(OPacket* p) { if (!p) 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 @@ -104,25 +104,25 @@ class ONetwork : public QObject */ // FIXME QString? -zecke bool isWirelessInterface( const char* interface ) const; /** * @returns a pointer to the @ref ONetworkInterface object for the specified @p interface or 0, if not found * @see ONetworkInterface */ // 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(); private: static ONetwork* _instance; InterfaceMap _interfaces; }; @@ -244,35 +244,59 @@ class ONetworkInterface : public QObject * * This class provides a channel hopper for radio frequencies. A channel hopper frequently * changes the radio frequency channel of its associated @ref OWirelessNetworkInterface. * This is necessary when in monitoring mode and scanning for other devices, because * the radio frequency hardware can only detect packets sent on the same frequency. * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> */ 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; }; /*====================================================================================== * OWirelessNetworkInterface *======================================================================================*/ 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 @@ -144,44 +144,42 @@ class OEthernetPacket : public QObject public: OEthernetPacket( const unsigned char*, const struct ether_header*, QObject* parent = 0 ); virtual ~OEthernetPacket(); OMacAddress sourceAddress() const; OMacAddress destinationAddress() const; int type() const; private: const struct ether_header* _ether; }; - /*====================================================================================== * OPrismHeaderPacket - DLT_PRISM_HEADER frame *======================================================================================*/ class OPrismHeaderPacket : public QObject { Q_OBJECT public: OPrismHeaderPacket( const unsigned char*, const struct prism_hdr*, QObject* parent = 0 ); virtual ~OPrismHeaderPacket(); unsigned int signalStrength() const; private: const struct prism_hdr* _header; }; - /*====================================================================================== * OWaveLanPacket - DLT_IEEE802_11 frame *======================================================================================*/ class OWaveLanPacket : public QObject { Q_OBJECT public: OWaveLanPacket( const unsigned char*, const struct ieee_802_11_header*, QObject* parent = 0 ); virtual ~OWaveLanPacket(); @@ -343,41 +341,40 @@ class OWaveLanManagementIBSS : public QObject public: OWaveLanManagementIBSS( const unsigned char*, const struct ibss_t*, QObject* parent = 0 ); virtual ~OWaveLanManagementIBSS(); private: const struct ibss_t* _data; }; /*====================================================================================== * OWaveLanManagementChallenge *======================================================================================*/ -// Qobject do we need that?? class OWaveLanManagementChallenge : public QObject { Q_OBJECT public: OWaveLanManagementChallenge( const unsigned char*, const struct challenge_t*, QObject* parent = 0 ); virtual ~OWaveLanManagementChallenge(); private: 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 ); virtual ~OWaveLanDataPacket(); private: const struct ieee_802_11_data_header* _header; }; 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 @@ -8,40 +8,40 @@ HEADERS = ocompletionbox.h \ olistview.h \ oimageeffect.h \ opixmapeffect.h \ opopupmenu.h \ opixmapprovider.h \ oselector.h \ oversatileview.h \ oversatileviewitem.h \ #ojanuswidget.h \ odialog.h \ oseparator.h \ otaskbarapplet.h - + SOURCES = ocompletionbox.cpp \ ocombobox.cpp \ oeditlistbox.cpp \ olineedit.cpp \ olistview.cpp \ oimageeffect.cpp \ opixmapeffect.cpp \ opopupmenu.cpp \ opixmapprovider.cpp \ oselector.cpp \ oversatileview.cpp \ oversatileviewitem.cpp \ #ojanuswidget.cpp \ odialog.cpp \ - oseparator.cpp \ + oseparator.cpp \ otaskbarapplet.cpp INTERFACES = TARGET = opieui2 VERSION = 1.8.1 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lopiecore2 MOC_DIR = moc OBJECTS_DIR = obj include ( $(OPIEDIR)/include.pro ) |