author | mickeyl <mickeyl> | 2003-05-03 18:26:18 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-05-03 18:26:18 (UTC) |
commit | d7b68bdcfad0ee98f755c0b76e720a2e30cd57c6 (patch) (side-by-side diff) | |
tree | a6dfe6bd99116122f1edd486594ff386942d53f1 /noncore/net/wellenreiter/gui/wellenreiter.cpp | |
parent | 998cfb14d533aadd453949ed70d57203a7bfbd0d (diff) | |
download | opie-d7b68bdcfad0ee98f755c0b76e720a2e30cd57c6.zip opie-d7b68bdcfad0ee98f755c0b76e720a2e30cd57c6.tar.gz opie-d7b68bdcfad0ee98f755c0b76e720a2e30cd57c6.tar.bz2 |
start work on graph window
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 4b82c9a..c061319 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -45,32 +45,33 @@ using namespace Opie; #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" #include "statwindow.h" +#include "graphwindow.h" #include "manufacturers.h" Wellenreiter::Wellenreiter( QWidget* parent ) : WellenreiterBase( parent, 0, 0 ), sniffing( false ), iface( 0 ), manufacturerdb( 0 ), configwindow( 0 ) { // // construct manufacturer database // QString manufile; #ifdef QWS manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() ); #else manufile.sprintf( "/usr/local/share/wellenreiter/manufacturers.dat" ); @@ -153,32 +154,38 @@ void Wellenreiter::receivePacket(OPacket* p) { type = "managed"; } else { qDebug( "Wellenreiter::invalid frame detected: '%s'", (const char*) p->dump( 16 ) ); return; } OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); QString essid = ssid ? ssid->ID() : QString("<unknown>"); OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); int channel = ds ? ds->channel() : -1; OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 ); + + // do we have a prism header? + OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) ); + if ( ds && prism ) + graphwindow->traffic( ds->channel(), prism->signalStrength() ); + return; } // check for a data frame OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( p->child( "802.11 Data" ) ); if ( data ) { OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); if ( wlan->fromDS() && !wlan->toDS() ) { qDebug( "FromDS traffic: '%s' -> '%s' via '%s'", (const char*) wlan->macAddress3().toString(true), (const char*) wlan->macAddress1().toString(true), (const char*) wlan->macAddress2().toString(true) ); netView()->fromDStraffic( wlan->macAddress3().toString(), wlan->macAddress1().toString(), |