summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp9
2 files changed, 7 insertions, 4 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index 9d6ed6a..1cca507 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -366,25 +366,25 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
366 if ( subitem ) 366 if ( subitem )
367 { 367 {
368 // we have already seen this item, it's a dupe 368 // we have already seen this item, it's a dupe
369 #ifdef DEBUG 369 #ifdef DEBUG
370 qDebug( "%s is a dupe - ignoring...", (const char*) name ); 370 qDebug( "%s is a dupe - ignoring...", (const char*) name );
371 #endif 371 #endif
372 subitem->receivedBeacon(); //FIXME: sent data bit 372 subitem->receivedBeacon(); //FIXME: sent data bit
373 return; 373 return;
374 } 374 }
375 375
376 // never seen that - add new item 376 // never seen that - add new item
377 377
378 MScanListItem* item = new MScanListItem( it.current(), "service", "N/A", false, -1, -1 ); 378 MScanListItem* item = new MScanListItem( it.current(), "service", "N/A", " ", false, -1, -1 );
379 item->setText( col_essid, name ); 379 item->setText( col_essid, name );
380 380
381 return; 381 return;
382 } 382 }
383 } 383 }
384 qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" ); 384 qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" );
385 MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!", 385 MLogWindow::logwindow()->log( QString().sprintf( "WARNING: Unhandled service addition %s = %s!",
386 (const char*) macaddr.toString(), (const char*) ip ) ); 386 (const char*) macaddr.toString(), (const char*) ip ) );
387} 387}
388 388
389 389
390void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, int col ) 390void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, int col )
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 7394742..9460f56 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -247,30 +247,33 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
247 { 247 {
248 netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() ); 248 netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() );
249 netView()->identify( arp->targetMacAddress(), arp->targetIPV4Address().toString() ); 249 netView()->identify( arp->targetMacAddress(), arp->targetIPV4Address().toString() );
250 } 250 }
251 } 251 }
252 252
253 ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" ); 253 ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" );
254 if ( dhcp ) 254 if ( dhcp )
255 { 255 {
256 qDebug( "Received DHCP '%s' packet", (const char*) dhcp->type() ); 256 qDebug( "Received DHCP '%s' packet", (const char*) dhcp->type() );
257 if ( dhcp->type() == "OFFER" ) 257 if ( dhcp->type() == "OFFER" )
258 { 258 {
259 qDebug( "ADDSERVICE: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() ); 259 qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() );
260 //netView()->addNewItem( "station", "<wired>", from, false, -1, 0, GpsLocation( 0, 0 ) );
261
262 netView()->identify( source, dhcp->serverAddress().toString() ); 260 netView()->identify( source, dhcp->serverAddress().toString() );
263 netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); 261 netView()->addService( "DHCP", source, dhcp->serverAddress().toString() );
264 } 262 }
263 else if ( dhcp->type() == "ACK" )
264 {
265 qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() );
266 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() );
267 }
265 } 268 }
266} 269}
267 270
268 271
269QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol ) 272QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol )
270{ 273{
271 if ( configwindow->parsePackets->isProtocolChecked( protocol ) ) 274 if ( configwindow->parsePackets->isProtocolChecked( protocol ) )
272 if ( configwindow->parsePackets->protocolAction( protocol ) == "Discard!" ) 275 if ( configwindow->parsePackets->protocolAction( protocol ) == "Discard!" )
273 return 0; 276 return 0;
274 277
275 return p->child( protocol ); 278 return p->child( protocol );
276} 279}