summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/wellenreiter.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp74
1 files changed, 33 insertions, 41 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index fff7c35..fad6efd 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -8,40 +8,39 @@
8** 8**
9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11** 11**
12***********************************************************************/ 12***********************************************************************/
13 13
14// Local
15
16#include "gps.h" 14#include "gps.h"
17#include "wellenreiter.h" 15#include "wellenreiter.h"
18#include "scanlist.h" 16#include "scanlist.h"
19#include "logwindow.h" 17#include "logwindow.h"
20#include "packetview.h" 18#include "packetview.h"
21#include "configwindow.h" 19#include "configwindow.h"
22#include "statwindow.h" 20#include "statwindow.h"
23#include "graphwindow.h" 21#include "graphwindow.h"
24#include "protolistview.h" 22#include "protolistview.h"
25 23
26// Opie 24/* OPIE */
27
28#ifdef QWS 25#ifdef QWS
29#include <opie2/oapplication.h> 26#include <opie2/oapplication.h>
27#include <opie2/odebug.h>
30#include <opie2/odevice.h> 28#include <opie2/odevice.h>
31#else 29#else
32#include <qapplication.h> 30#include <qapplication.h>
33#endif 31#endif
34#include <opie2/omanufacturerdb.h> 32#include <opie2/omanufacturerdb.h>
35#include <opie2/onetwork.h> 33#include <opie2/onetwork.h>
36#include <opie2/opcap.h> 34#include <opie2/opcap.h>
37#include <qpe/qcopenvelope_qws.h> 35#include <qpe/qcopenvelope_qws.h>
38using namespace Opie; 36using namespace Opie::Core;
39 37using namespace Opie::Net;
40// Qt 38using namespace Opie::Ui;
41 39
40/* QT */
42#include <qcheckbox.h> 41#include <qcheckbox.h>
43#include <qcombobox.h> 42#include <qcombobox.h>
44#include <qdatetime.h> 43#include <qdatetime.h>
45#include <qpushbutton.h> 44#include <qpushbutton.h>
46#include <qlineedit.h> 45#include <qlineedit.h>
47#include <qmessagebox.h> 46#include <qmessagebox.h>
@@ -49,27 +48,20 @@ using namespace Opie;
49#include <qregexp.h> 48#include <qregexp.h>
50#include <qspinbox.h> 49#include <qspinbox.h>
51#include <qtimer.h> 50#include <qtimer.h>
52#include <qtoolbutton.h> 51#include <qtoolbutton.h>
53#include <qmainwindow.h> 52#include <qmainwindow.h>
54 53
55// Standard 54/* STD */
56
57#include <assert.h> 55#include <assert.h>
58#include <errno.h> 56#include <errno.h>
59#include <unistd.h> 57#include <unistd.h>
60#include <string.h> 58#include <string.h>
61#include <sys/types.h> 59#include <sys/types.h>
62#include <stdlib.h> 60#include <stdlib.h>
63 61
64using namespace Opie::Core;
65using namespace Opie::Net;
66using namespace Opie::Net;
67using namespace Opie::Core;
68using namespace Opie::Net;
69using namespace Opie::Core;
70Wellenreiter::Wellenreiter( QWidget* parent ) 62Wellenreiter::Wellenreiter( QWidget* parent )
71 : WellenreiterBase( parent, 0, 0 ), 63 : WellenreiterBase( parent, 0, 0 ),
72 sniffing( false ), iface( 0 ), configwindow( 0 ) 64 sniffing( false ), iface( 0 ), configwindow( 0 )
73{ 65{
74 66
75 logwindow->log( "(i) Wellenreiter has been started." ); 67 logwindow->log( "(i) Wellenreiter has been started." );
@@ -103,13 +95,13 @@ Wellenreiter::~Wellenreiter()
103 delete pcap; 95 delete pcap;
104} 96}
105 97
106 98
107void Wellenreiter::initialTimer() 99void Wellenreiter::initialTimer()
108{ 100{
109 qDebug( "Wellenreiter::preloading manufacturer database..." ); 101 odebug << "Wellenreiter::preloading manufacturer database..." << oendl;
110 OManufacturerDB::instance(); 102 OManufacturerDB::instance();
111} 103}
112 104
113 105
114void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) 106void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw )
115{ 107{
@@ -146,30 +138,30 @@ void Wellenreiter::handleNotification( OPacket* p )
146 while ( (o = it.current()) != 0 ) 138 while ( (o = it.current()) != 0 )
147 { 139 {
148 QString name = it.current()->name(); 140 QString name = it.current()->name();
149 if ( configwindow->parsePackets->isProtocolChecked( name ) ) 141 if ( configwindow->parsePackets->isProtocolChecked( name ) )
150 { 142 {
151 QString action = configwindow->parsePackets->protocolAction( name ); 143 QString action = configwindow->parsePackets->protocolAction( name );
152 qDebug( "parsePacket-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); 144 odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl;
153 doAction( action, name, p ); 145 doAction( action, name, p );
154 } 146 }
155 else 147 else
156 { 148 {
157 qDebug( "protocol '%s' not checked in parsePackets.", (const char*) name ); 149 odebug << "protocol '" << (const char*) name << "' not checked in parsePackets." << oendl;
158 } 150 }
159 ++it; 151 ++it;
160 } 152 }
161} 153}
162 154
163 155
164void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket* manage ) 156void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket* manage )
165{ 157{
166 if ( manage->managementType() == "Beacon" ) handleManagementFrameBeacon( p, manage ); 158 if ( manage->managementType() == "Beacon" ) handleManagementFrameBeacon( p, manage );
167 else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage ); 159 else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage );
168 else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage ); 160 else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage );
169 else qWarning( "Wellenreiter::handleManagementFrame(): '%s' - please handle me!", (const char*) manage->managementType() ); 161 else owarn << "Wellenreiter::handleManagementFrame(): '" << (const char*) manage->managementType() << "' - please handle me!" << oendl;
170} 162}
171 163
172 164
173void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* request ) 165void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* request )
174{ 166{
175 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); 167 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) );
@@ -179,20 +171,20 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
179 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); 171 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
180 172
181 GpsLocation loc( -111, -111 ); 173 GpsLocation loc( -111, -111 );
182 if ( configwindow->enableGPS->isChecked() ) 174 if ( configwindow->enableGPS->isChecked() )
183 { 175 {
184 // TODO: add check if GPS is working!? 176 // TODO: add check if GPS is working!?
185 qDebug( "Wellenreiter::gathering GPS data..." ); 177 odebug << "Wellenreiter::gathering GPS data..." << oendl;
186 loc = gps->position(); 178 loc = gps->position();
187 qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() ); 179 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl;
188 } 180 }
189 181
190 if ( essid.length() ) 182 if ( essid.length() )
191 netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ ); 183 netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ );
192 qDebug( "Wellenreiter::invalid frame [possibly noise] detected!" ); 184 odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
193} 185}
194 186
195 187
196void Wellenreiter::handleManagementFrameProbeResponse( OPacket* p, OWaveLanManagementPacket* response ) 188void Wellenreiter::handleManagementFrameProbeResponse( OPacket* p, OWaveLanManagementPacket* response )
197{ 189{
198} 190}
@@ -208,13 +200,13 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa
208 else if ( beacon->canESS() ) 200 else if ( beacon->canESS() )
209 { 201 {
210 type = "managed"; 202 type = "managed";
211 } 203 }
212 else 204 else
213 { 205 {
214 qWarning( "Wellenreiter::invalid frame [possibly noise] detected!" ); 206 owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
215 return; 207 return;
216 } 208 }
217 209
218 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); 210 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) );
219 QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>"); 211 QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>");
220 OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); 212 OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) );
@@ -223,15 +215,15 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa
223 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); 215 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
224 216
225 GpsLocation loc( -111, -111 ); 217 GpsLocation loc( -111, -111 );
226 if ( configwindow->enableGPS->isChecked() ) 218 if ( configwindow->enableGPS->isChecked() )
227 { 219 {
228 // TODO: add check if GPS is working!? 220 // TODO: add check if GPS is working!?
229 qDebug( "Wellenreiter::gathering GPS data..." ); 221 odebug << "Wellenreiter::gathering GPS data..." << oendl;
230 loc = gps->position(); 222 loc = gps->position();
231 qDebug( "Wellenreiter::GPS data received is ( %f , %f ) - dms string = '%s'", loc.latitude(), loc.longitude(), loc.dmsPosition().latin1() ); 223 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl;
232 } 224 }
233 225
234 netView()->addNewItem( type, essid, header->macAddress2(), beacon->canPrivacy(), channel, 0, loc ); 226 netView()->addNewItem( type, essid, header->macAddress2(), beacon->canPrivacy(), channel, 0, loc );
235 227
236 // update graph window 228 // update graph window
237 if ( ds ) 229 if ( ds )
@@ -252,13 +244,13 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro
252 if ( control->controlType() == "Acknowledge" ) 244 if ( control->controlType() == "Acknowledge" )
253 { 245 {
254 netView()->addNewItem( "adhoc", "<unknown>", header->macAddress1(), false, -1, 0, GpsLocation( -111, -111 ) ); 246 netView()->addNewItem( "adhoc", "<unknown>", header->macAddress1(), false, -1, 0, GpsLocation( -111, -111 ) );
255 } 247 }
256 else 248 else
257 { 249 {
258 qDebug( "Wellenreiter::handleControlFrame - please handle %s in a future version! :D", (const char*) control->controlType() ); 250 odebug << "Wellenreiter::handleControlFrame - please handle " << (const char*) control->controlType() << " in a future version! :D" << oendl;
259 } 251 }
260} 252}
261 253
262 254
263void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* data, OMacAddress& from, OMacAddress& to ) 255void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* data, OMacAddress& from, OMacAddress& to )
264{ 256{
@@ -301,13 +293,13 @@ void Wellenreiter::handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAd
301 293
302void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, OMacAddress& dest ) 294void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, OMacAddress& dest )
303{ 295{
304 OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); 296 OARPPacket* arp = (OARPPacket*) p->child( "ARP" );
305 if ( arp ) 297 if ( arp )
306 { 298 {
307 qDebug( "Received ARP traffic (type '%s'): ", (const char*) arp->type() ); 299 odebug << "Received ARP traffic (type '" << (const char*) arp->type() << "'): " << oendl;
308 if ( arp->type() == "REQUEST" ) 300 if ( arp->type() == "REQUEST" )
309 { 301 {
310 netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() ); 302 netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() );
311 } 303 }
312 else if ( arp->type() == "REPLY" ) 304 else if ( arp->type() == "REPLY" )
313 { 305 {
@@ -322,22 +314,22 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
322{ 314{
323 //TODO: Implement more IP based protocols 315 //TODO: Implement more IP based protocols
324 316
325 ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" ); 317 ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" );
326 if ( dhcp ) 318 if ( dhcp )
327 { 319 {
328 qDebug( "Received DHCP '%s' packet", (const char*) dhcp->type() ); 320 odebug << "Received DHCP '" << (const char*) dhcp->type() << "' packet" << oendl;
329 if ( dhcp->type() == "OFFER" ) 321 if ( dhcp->type() == "OFFER" )
330 { 322 {
331 qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() ); 323 odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << (const char*) dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl;
332 netView()->identify( source, dhcp->serverAddress().toString() ); 324 netView()->identify( source, dhcp->serverAddress().toString() );
333 netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); 325 netView()->addService( "DHCP", source, dhcp->serverAddress().toString() );
334 } 326 }
335 else if ( dhcp->type() == "ACK" ) 327 else if ( dhcp->type() == "ACK" )
336 { 328 {
337 qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() ); 329 odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << (const char*) dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl;
338 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); 330 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() );
339 } 331 }
340 } 332 }
341} 333}
342 334
343 335
@@ -365,22 +357,22 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
365 while ( (o = it.current()) != 0 ) 357 while ( (o = it.current()) != 0 )
366 { 358 {
367 QString name = it.current()->name(); 359 QString name = it.current()->name();
368 if ( configwindow->capturePackets->isProtocolChecked( name ) ) 360 if ( configwindow->capturePackets->isProtocolChecked( name ) )
369 { 361 {
370 QString action = configwindow->capturePackets->protocolAction( name ); 362 QString action = configwindow->capturePackets->protocolAction( name );
371 qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); 363 odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl;
372 if ( action == "Discard" ) 364 if ( action == "Discard" )
373 { 365 {
374 logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); 366 logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) );
375 return false; 367 return false;
376 } 368 }
377 } 369 }
378 else 370 else
379 { 371 {
380 qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); 372 odebug << "protocol '" << (const char*) name << "' not checked in capturePackets." << oendl;
381 } 373 }
382 ++it; 374 ++it;
383 } 375 }
384 return true; 376 return true;
385} 377}
386 378
@@ -548,13 +540,13 @@ void Wellenreiter::startClicked()
548 { 540 {
549 case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; 541 case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break;
550 case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; 542 case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break;
551 case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; 543 case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break;
552 case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; 544 case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break;
553 case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; 545 case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break;
554 case DEVTYPE_FILE: qDebug( "Wellenreiter: Capturing from file '%s'", (const char*) interface ); break; 546 case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << (const char*) interface << "'" << oendl; break;
555 default: assert( 0 ); // shouldn't reach this 547 default: assert( 0 ); // shouldn't reach this
556 } 548 }
557 549
558 // switch device into monitor mode 550 // switch device into monitor mode
559 if ( cardtype < DEVTYPE_FILE ) 551 if ( cardtype < DEVTYPE_FILE )
560 { 552 {
@@ -569,13 +561,13 @@ void Wellenreiter::startClicked()
569 } 561 }
570 } 562 }
571 563
572 // open GPS device 564 // open GPS device
573 if ( configwindow->enableGPS->isChecked() ) 565 if ( configwindow->enableGPS->isChecked() )
574 { 566 {
575 qDebug( "Wellenreiter:GPS enabled @ %s:%d", (const char*) configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); 567 odebug << "Wellenreiter:GPS enabled @ " << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl;
576 gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); 568 gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
577 } 569 }
578 570
579 // open pcap and start sniffing 571 // open pcap and start sniffing
580 572
581 if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file? 573 if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file?
@@ -593,13 +585,13 @@ void Wellenreiter::startClicked()
593 585
594 if ( cardtype != DEVTYPE_FILE ) 586 if ( cardtype != DEVTYPE_FILE )
595 pcap->open( interface ); 587 pcap->open( interface );
596 else 588 else
597 pcap->open( QFile( interface ) ); 589 pcap->open( QFile( interface ) );
598 590
599 qDebug( "Wellenreiter:: dumping to %s", (const char*) dumpname ); 591 odebug << "Wellenreiter:: dumping to " << (const char*) dumpname << "" << oendl;
600 pcap->openDumpFile( dumpname ); 592 pcap->openDumpFile( dumpname );
601 593
602 if ( !pcap->isOpen() ) 594 if ( !pcap->isOpen() )
603 { 595 {
604 QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg( 596 QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg(
605 cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) )); 597 cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) ));
@@ -649,13 +641,13 @@ void Wellenreiter::startClicked()
649 } 641 }
650} 642}
651 643
652 644
653void Wellenreiter::timerEvent( QTimerEvent* ) 645void Wellenreiter::timerEvent( QTimerEvent* )
654{ 646{
655 qDebug( "Wellenreiter::timerEvent()" ); 647 odebug << "Wellenreiter::timerEvent()" << oendl;
656 OPacket* p = pcap->next(); 648 OPacket* p = pcap->next();
657 if ( !p ) // no more packets available 649 if ( !p ) // no more packets available
658 { 650 {
659 stopClicked(); 651 stopClicked();
660 } 652 }
661 else 653 else
@@ -712,21 +704,21 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
712 (const char*) essid, 704 (const char*) essid,
713 channel, 705 channel,
714 (const char*) macaddr ); 706 (const char*) macaddr );
715 707
716 QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); 708 QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" );
717 int count = 3; 709 int count = 3;
718 qDebug("sending %d messages",count); 710 odebug << "sending " << count << " messages" << oendl;
719 msg << QString("count") << QString::number(count); 711 msg << QString("count") << QString::number(count);
720 qDebug("msg >%s< Mode >%s<", iface->name(),type.latin1() ); 712 odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl;
721 msg << QString(iface->name()) << QString("Mode") << type; 713 msg << QString(iface->name()) << QString("Mode") << type;
722 qDebug("msg >%s< essid >%s<", iface->name(),essid.latin1()); 714 odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl;
723 msg << QString(iface->name()) << QString("ESSID") << essid; 715 msg << QString(iface->name()) << QString("ESSID") << essid;
724 qDebug("msg >%s< channel >%d<", iface->name(),channel); 716 odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl;
725 msg << QString(iface->name()) << QString("Channel") << channel; 717 msg << QString(iface->name()) << QString("Channel") << channel;
726// qDebug("msg >%s< mac >%s<", iface->name(),macaddr); 718// odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl;
727// msg << QString(iface->name()) << QString("MacAddr") << macaddr; 719// msg << QString(iface->name()) << QString("MacAddr") << macaddr;
728 #else 720 #else
729 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Function only available on Embedded build" ) ); 721 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Function only available on Embedded build" ) );
730 #endif 722 #endif
731 723
732} 724}