A stack which works with or without an Mbed os library. Provides IPv4 or IPv6 with a full 1500 byte buffer.

Dependents:   oldheating gps motorhome heating

Revision:
97:d91f7db00235
Parent:
94:e2973a2c488e
Child:
98:b977424ec7f7
--- a/eth/eth.c	Sat Dec 29 19:03:50 2018 +0000
+++ b/eth/eth.c	Wed Jan 02 17:48:38 2019 +0000
@@ -8,6 +8,7 @@
 #include   "link.h"
 #include    "eth.h"
 #include    "mac.h"
+#include  "fault.h"
 
 #define MTU 1500
 
@@ -57,6 +58,8 @@
 }
 int EthHandlePacket(void* pPacketRx, int sizeRx, void* pPacketTx, int* pSizeTx)
 {
+    FaultPoint = FAULT_POINT_EthHandlePacket;
+    
     tracePacket = pPacketRx;
     
     struct header * pHeaderRx = (struct header*)pPacketRx;
@@ -69,12 +72,14 @@
         
     if (!MacAccept(pHeaderRx->dst))
     {
+        FaultPoint = 0;
         return DO_NOTHING;
     }
     
     protocol = NetToHost16(pHeaderRx->typ);
     if (protocol < 1500)
     {
+        FaultPoint = 0;
         return DO_NOTHING; //drop 802.3 messages
     }
 
@@ -99,6 +104,7 @@
     }
     if (!action)
     {
+        FaultPoint = 0;
         return DO_NOTHING;
     }
         
@@ -111,6 +117,7 @@
     
     if (ActionGetTracePart(action)) LogHeader(pHeaderTx);
     
+    FaultPoint = 0;
     return action;
 }
 int EthPollForPacketToSend(void* pPacket, int* pSize)