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 | |||
@@ -49,24 +49,25 @@ using namespace Opie; | |||
49 | #include <string.h> | 49 | #include <string.h> |
50 | #include <sys/types.h> | 50 | #include <sys/types.h> |
51 | #include <stdlib.h> | 51 | #include <stdlib.h> |
52 | 52 | ||
53 | // Local | 53 | // Local |
54 | 54 | ||
55 | #include "wellenreiter.h" | 55 | #include "wellenreiter.h" |
56 | #include "scanlist.h" | 56 | #include "scanlist.h" |
57 | #include "logwindow.h" | 57 | #include "logwindow.h" |
58 | #include "hexwindow.h" | 58 | #include "hexwindow.h" |
59 | #include "configwindow.h" | 59 | #include "configwindow.h" |
60 | #include "statwindow.h" | 60 | #include "statwindow.h" |
61 | #include "graphwindow.h" | ||
61 | #include "manufacturers.h" | 62 | #include "manufacturers.h" |
62 | 63 | ||
63 | Wellenreiter::Wellenreiter( QWidget* parent ) | 64 | Wellenreiter::Wellenreiter( QWidget* parent ) |
64 | : WellenreiterBase( parent, 0, 0 ), | 65 | : WellenreiterBase( parent, 0, 0 ), |
65 | sniffing( false ), iface( 0 ), manufacturerdb( 0 ), configwindow( 0 ) | 66 | sniffing( false ), iface( 0 ), manufacturerdb( 0 ), configwindow( 0 ) |
66 | { | 67 | { |
67 | 68 | ||
68 | // | 69 | // |
69 | // construct manufacturer database | 70 | // construct manufacturer database |
70 | // | 71 | // |
71 | 72 | ||
72 | QString manufile; | 73 | QString manufile; |
@@ -157,24 +158,30 @@ void Wellenreiter::receivePacket(OPacket* p) | |||
157 | { | 158 | { |
158 | qDebug( "Wellenreiter::invalid frame detected: '%s'", (const char*) p->dump( 16 ) ); | 159 | qDebug( "Wellenreiter::invalid frame detected: '%s'", (const char*) p->dump( 16 ) ); |
159 | return; | 160 | return; |
160 | } | 161 | } |
161 | 162 | ||
162 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); | 163 | OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); |
163 | QString essid = ssid ? ssid->ID() : QString("<unknown>"); | 164 | QString essid = ssid ? ssid->ID() : QString("<unknown>"); |
164 | OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); | 165 | OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); |
165 | int channel = ds ? ds->channel() : -1; | 166 | int channel = ds ? ds->channel() : -1; |
166 | 167 | ||
167 | OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); | 168 | OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); |
168 | netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 ); | 169 | netView()->addNewItem( type, essid, header->macAddress2().toString(), beacon->canPrivacy(), channel, 0 ); |
170 | |||
171 | // do we have a prism header? | ||
172 | OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) ); | ||
173 | if ( ds && prism ) | ||
174 | graphwindow->traffic( ds->channel(), prism->signalStrength() ); | ||
175 | |||
169 | return; | 176 | return; |
170 | } | 177 | } |
171 | 178 | ||
172 | // check for a data frame | 179 | // check for a data frame |
173 | OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( p->child( "802.11 Data" ) ); | 180 | OWaveLanDataPacket* data = static_cast<OWaveLanDataPacket*>( p->child( "802.11 Data" ) ); |
174 | if ( data ) | 181 | if ( data ) |
175 | { | 182 | { |
176 | OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); | 183 | OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); |
177 | if ( wlan->fromDS() && !wlan->toDS() ) | 184 | if ( wlan->fromDS() && !wlan->toDS() ) |
178 | { | 185 | { |
179 | qDebug( "FromDS traffic: '%s' -> '%s' via '%s'", | 186 | qDebug( "FromDS traffic: '%s' -> '%s' via '%s'", |
180 | (const char*) wlan->macAddress3().toString(true), | 187 | (const char*) wlan->macAddress3().toString(true), |