Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 9460f56..60bf231 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -234,5 +234,5 @@ void Wellenreiter::handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAd | |||
234 | 234 | ||
235 | 235 | ||
236 | void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, OMacAddress& dest ) | 236 | void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, OMacAddress& dest ) |
237 | { | 237 | { |
238 | OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); | 238 | OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); |
@@ -250,4 +250,10 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, | |||
250 | } | 250 | } |
251 | } | 251 | } |
252 | } | ||
253 | |||
254 | |||
255 | void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, OMacAddress& dest ) | ||
256 | { | ||
257 | //TODO: Implement more IP based protocols | ||
252 | 258 | ||
253 | ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" ); | 259 | ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" ); |
@@ -350,4 +356,12 @@ void Wellenreiter::receivePacket( OPacket* p ) | |||
350 | } | 356 | } |
351 | 357 | ||
358 | // check for an arp frame since arp frames come in two flavours: | ||
359 | // 802.11 encapsulates ARP data within IP packets while wired ethernet doesn't. | ||
360 | OARPPacket* arp = static_cast<OARPPacket*>( childIfToParse( p, "ARP" ) ); | ||
361 | if ( arp ) | ||
362 | { | ||
363 | handleARPData( p, arp, source, dest ); | ||
364 | } | ||
365 | |||
352 | // check for a ip frame | 366 | // check for a ip frame |
353 | OIPPacket* ip = static_cast<OIPPacket*>( childIfToParse( p, "IP" ) ); | 367 | OIPPacket* ip = static_cast<OIPPacket*>( childIfToParse( p, "IP" ) ); |