summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -372,13 +372,13 @@ void MScanListView::addService( const QString& name, const OMacAddress& macaddr,
subitem->receivedBeacon(); //FIXME: sent data bit
return;
}
// never seen that - add new item
- MScanListItem* item = new MScanListItem( it.current(), "service", "N/A", false, -1, -1 );
+ MScanListItem* item = new MScanListItem( it.current(), "service", "N/A", " ", false, -1, -1 );
item->setText( col_essid, name );
return;
}
}
qDebug( "D'oh! Received identification, but item not yet in list... ==> Handle this!" );
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
@@ -253,18 +253,21 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" );
if ( dhcp )
{
qDebug( "Received DHCP '%s' packet", (const char*) dhcp->type() );
if ( dhcp->type() == "OFFER" )
{
- qDebug( "ADDSERVICE: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() );
- //netView()->addNewItem( "station", "<wired>", from, false, -1, 0, GpsLocation( 0, 0 ) );
-
+ qDebug( "DHCP: '%s' ('%s') seems to be a DHCP server.", (const char*) source.toString(), (const char*) dhcp->serverAddress().toString() );
netView()->identify( source, dhcp->serverAddress().toString() );
netView()->addService( "DHCP", source, dhcp->serverAddress().toString() );
}
+ else if ( dhcp->type() == "ACK" )
+ {
+ qDebug( "DHCP: '%s' ('%s') accepted the offered DHCP address.", (const char*) dhcp->clientMacAddress().toString(), (const char*) dhcp->yourAddress().toString() );
+ netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() );
+ }
}
}
QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol )
{