summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h2
2 files changed, 17 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
@@ -235,3 +235,3 @@ void Wellenreiter::handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAd
-void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, OMacAddress& dest )
+void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& source, OMacAddress& dest )
{
@@ -251,2 +251,8 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
}
+}
+
+
+void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source, OMacAddress& dest )
+{
+ //TODO: Implement more IP based protocols
@@ -351,2 +357,10 @@ void Wellenreiter::receivePacket( OPacket* p )
+ // check for an arp frame since arp frames come in two flavours:
+ // 802.11 encapsulates ARP data within IP packets while wired ethernet doesn't.
+ OARPPacket* arp = static_cast<OARPPacket*>( childIfToParse( p, "ARP" ) );
+ if ( arp )
+ {
+ handleARPData( p, arp, source, dest );
+ }
+
// check for a ip frame
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index ed96375..25a5e8d 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -31,2 +31,3 @@ class OWaveLanDataPacket;
class OEthernetPacket;
+class OARPPacket;
class OMacAddress;
@@ -75,2 +76,3 @@ class Wellenreiter : public WellenreiterBase {
void handleEthernetData( OPacket* p, OEthernetPacket* data, OMacAddress& from, OMacAddress& to );
+ void handleARPData( OPacket* p, OARPPacket* arp, OMacAddress& from, OMacAddress& to );
void handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& from, OMacAddress& to );