summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/wellenreiter.cpp
Unidiff
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index fad6efd..822bde8 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -99,5 +99,5 @@ Wellenreiter::~Wellenreiter()
99void Wellenreiter::initialTimer() 99void Wellenreiter::initialTimer()
100{ 100{
101 odebug << "Wellenreiter::preloading manufacturer database..." << oendl; 101 odebug << "Wellenreiter::preloading manufacturer database..." << oendl;
102 OManufacturerDB::instance(); 102 OManufacturerDB::instance();
103} 103}
@@ -142,10 +142,10 @@ void Wellenreiter::handleNotification( OPacket* p )
142 { 142 {
143 QString action = configwindow->parsePackets->protocolAction( name ); 143 QString action = configwindow->parsePackets->protocolAction( name );
144 odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl; 144 odebug << "parsePacket-action for '" << (const char*) name << "' seems to be '" << action << "'" << oendl;
145 doAction( action, name, p ); 145 doAction( action, name, p );
146 } 146 }
147 else 147 else
148 { 148 {
149 odebug << "protocol '" << (const char*) name << "' not checked in parsePackets." << oendl; 149 odebug << "protocol '" << name << "' not checked in parsePackets." << oendl;
150 } 150 }
151 ++it; 151 ++it;
@@ -159,5 +159,5 @@ void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket*
159 else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage ); 159 else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage );
160 else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage ); 160 else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage );
161 else owarn << "Wellenreiter::handleManagementFrame(): '" << (const char*) manage->managementType() << "' - please handle me!" << oendl; 161 else owarn << "Wellenreiter::handleManagementFrame(): '" << manage->managementType() << "' - please handle me!" << oendl;
162} 162}
163 163
@@ -175,12 +175,12 @@ void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManage
175 { 175 {
176 // TODO: add check if GPS is working!? 176 // TODO: add check if GPS is working!?
177 odebug << "Wellenreiter::gathering GPS data..." << oendl; 177 odebug << "Wellenreiter::gathering GPS data..." << oendl;
178 loc = gps->position(); 178 loc = gps->position();
179 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; 179 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl;
180 } 180 }
181 181
182 if ( essid.length() ) 182 if ( essid.length() )
183 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 */ );
184 odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; 184 odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
185} 185}
186 186
@@ -204,5 +204,5 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa
204 else 204 else
205 { 205 {
206 owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; 206 owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
207 return; 207 return;
208 } 208 }
@@ -219,7 +219,7 @@ void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPa
219 { 219 {
220 // TODO: add check if GPS is working!? 220 // TODO: add check if GPS is working!?
221 odebug << "Wellenreiter::gathering GPS data..." << oendl; 221 odebug << "Wellenreiter::gathering GPS data..." << oendl;
222 loc = gps->position(); 222 loc = gps->position();
223 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; 223 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl;
224 } 224 }
225 225
@@ -248,5 +248,5 @@ void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* contro
248 else 248 else
249 { 249 {
250 odebug << "Wellenreiter::handleControlFrame - please handle " << (const char*) control->controlType() << " in a future version! :D" << oendl; 250 odebug << "Wellenreiter::handleControlFrame - please handle " << control->controlType() << " in a future version! :D" << oendl;
251 } 251 }
252} 252}
@@ -297,5 +297,5 @@ void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source,
297 if ( arp ) 297 if ( arp )
298 { 298 {
299 odebug << "Received ARP traffic (type '" << (const char*) arp->type() << "'): " << oendl; 299 odebug << "Received ARP traffic (type '" << arp->type() << "'): " << oendl;
300 if ( arp->type() == "REQUEST" ) 300 if ( arp->type() == "REQUEST" )
301 { 301 {
@@ -318,8 +318,8 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
318 if ( dhcp ) 318 if ( dhcp )
319 { 319 {
320 odebug << "Received DHCP '" << (const char*) dhcp->type() << "' packet" << oendl; 320 odebug << "Received DHCP '" << dhcp->type() << "' packet" << oendl;
321 if ( dhcp->type() == "OFFER" ) 321 if ( dhcp->type() == "OFFER" )
322 { 322 {
323 odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << (const char*) dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl; 323 odebug << "DHCP: '" << (const char*) source.toString() << "' ('" << dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl;
324 netView()->identify( source, dhcp->serverAddress().toString() ); 324 netView()->identify( source, dhcp->serverAddress().toString() );
325 netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); 325 netView()->addService( "DHCP", source, dhcp->serverAddress().toString() );
@@ -327,5 +327,5 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
327 else if ( dhcp->type() == "ACK" ) 327 else if ( dhcp->type() == "ACK" )
328 { 328 {
329 odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << (const char*) dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl; 329 odebug << "DHCP: '" << (const char*) dhcp->clientMacAddress().toString() << "' ('" << dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl;
330 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); 330 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() );
331 } 331 }
@@ -361,5 +361,5 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
361 { 361 {
362 QString action = configwindow->capturePackets->protocolAction( name ); 362 QString action = configwindow->capturePackets->protocolAction( name );
363 odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << (const char*) action << "'" << oendl; 363 odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << action << "'" << oendl;
364 if ( action == "Discard" ) 364 if ( action == "Discard" )
365 { 365 {
@@ -370,5 +370,5 @@ bool Wellenreiter::checkDumpPacket( OPacket* p )
370 else 370 else
371 { 371 {
372 odebug << "protocol '" << (const char*) name << "' not checked in capturePackets." << oendl; 372 odebug << "protocol '" << name << "' not checked in capturePackets." << oendl;
373 } 373 }
374 ++it; 374 ++it;
@@ -514,5 +514,5 @@ void Wellenreiter::startClicked()
514 if ( cardtype != DEVTYPE_FILE ) 514 if ( cardtype != DEVTYPE_FILE )
515 { 515 {
516 516
517 if ( !net->isPresent( interface ) ) 517 if ( !net->isPresent( interface ) )
518 { 518 {
@@ -521,5 +521,5 @@ void Wellenreiter::startClicked()
521 return; 521 return;
522 } 522 }
523 523
524 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless! 524 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless!
525 assert( iface ); 525 assert( iface );
@@ -544,5 +544,5 @@ void Wellenreiter::startClicked()
544 case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; 544 case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break;
545 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;
546 case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << (const char*) interface << "'" << oendl; break; 546 case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << interface << "'" << oendl; break;
547 default: assert( 0 ); // shouldn't reach this 547 default: assert( 0 ); // shouldn't reach this
548 } 548 }
@@ -565,5 +565,5 @@ void Wellenreiter::startClicked()
565 if ( configwindow->enableGPS->isChecked() ) 565 if ( configwindow->enableGPS->isChecked() )
566 { 566 {
567 odebug << "Wellenreiter:GPS enabled @ " << (const char*) configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl; 567 odebug << "Wellenreiter:GPS enabled @ " << configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl;
568 gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); 568 gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
569 } 569 }
@@ -589,5 +589,5 @@ void Wellenreiter::startClicked()
589 pcap->open( QFile( interface ) ); 589 pcap->open( QFile( interface ) );
590 590
591 odebug << "Wellenreiter:: dumping to " << (const char*) dumpname << "" << oendl; 591 odebug << "Wellenreiter:: dumping to " << dumpname << "" << oendl;
592 pcap->openDumpFile( dumpname ); 592 pcap->openDumpFile( dumpname );
593 593
@@ -639,5 +639,5 @@ void Wellenreiter::startClicked()
639 assert( parent() ); 639 assert( parent() );
640 ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); 640 ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) );
641 } 641 }
642} 642}
643 643
@@ -645,5 +645,5 @@ void Wellenreiter::startClicked()
645void Wellenreiter::timerEvent( QTimerEvent* ) 645void Wellenreiter::timerEvent( QTimerEvent* )
646{ 646{
647 odebug << "Wellenreiter::timerEvent()" << oendl; 647 odebug << "Wellenreiter::timerEvent()" << oendl;
648 OPacket* p = pcap->next(); 648 OPacket* p = pcap->next();
649 if ( !p ) // no more packets available 649 if ( !p ) // no more packets available
@@ -708,13 +708,13 @@ void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int ch
708 QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" ); 708 QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" );
709 int count = 3; 709 int count = 3;
710 odebug << "sending " << count << " messages" << oendl; 710 odebug << "sending " << count << " messages" << oendl;
711 msg << QString("count") << QString::number(count); 711 msg << QString("count") << QString::number(count);
712 odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl; 712 odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl;
713 msg << QString(iface->name()) << QString("Mode") << type; 713 msg << QString(iface->name()) << QString("Mode") << type;
714 odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl; 714 odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl;
715 msg << QString(iface->name()) << QString("ESSID") << essid; 715 msg << QString(iface->name()) << QString("ESSID") << essid;
716 odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl; 716 odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl;
717 msg << QString(iface->name()) << QString("Channel") << channel; 717 msg << QString(iface->name()) << QString("Channel") << channel;
718// odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl; 718// odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl;
719// msg << QString(iface->name()) << QString("MacAddr") << macaddr; 719// msg << QString(iface->name()) << QString("MacAddr") << macaddr;
720 #else 720 #else