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:
142:a8c0890a58d1
Parent:
136:8a65abb0dc63
Child:
171:f708d6776752
--- a/eth/eth.c	Sat Apr 27 09:24:44 2019 +0000
+++ b/eth/eth.c	Wed May 08 12:15:13 2019 +0000
@@ -8,7 +8,7 @@
 #include   "link.h"
 #include    "eth.h"
 #include    "mac.h"
-#include  "fault.h"
+#include "restart.h"
 
 #define MTU 1500
 
@@ -54,8 +54,8 @@
 static void trace() { LogHeader(tracePacket); }
 int EthHandlePacket(char* pPacketRx, int sizeRx, char* pPacketTx, int* pSizeTx)
 {
-    int lastFaultPoint = FaultPoint;
-    FaultPoint = FAULT_POINT_EthHandlePacket;
+    int lastRestartPoint = RestartPoint;
+    RestartPoint = FAULT_POINT_EthHandlePacket;
     
     tracePacket = pPacketRx;
     
@@ -67,14 +67,14 @@
         
     if (!MacAccept(hdrDstPtr(pPacketRx)))
     {
-        FaultPoint = lastFaultPoint;
+        RestartPoint = lastRestartPoint;
         return DO_NOTHING;
     }
     
     uint16_t protocol = hdrTypGet(pPacketRx);
     if (protocol < 1500)
     {
-        FaultPoint = lastFaultPoint;
+        RestartPoint = lastRestartPoint;
         return DO_NOTHING; //drop 802.3 messages
     }
 
@@ -99,7 +99,7 @@
     }
     if (!action)
     {
-        FaultPoint = lastFaultPoint;
+        RestartPoint = lastRestartPoint;
         return DO_NOTHING;
     }
         
@@ -112,7 +112,7 @@
     
     if (ActionGetTracePart(action)) LogHeader(pPacketTx);
     
-    FaultPoint = lastFaultPoint;
+    RestartPoint = lastRestartPoint;
     return action;
 }
 int EthPollForPacketToSend(char* pPacket, int* pSize)