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:
160:6a1d1d368f80
--- a/ip4/ip4.c	Sat Apr 27 09:24:44 2019 +0000
+++ b/ip4/ip4.c	Wed May 08 12:15:13 2019 +0000
@@ -16,7 +16,7 @@
 #include  "ip4hdr.h"
 #include     "ntp.h"
 #include     "mac.h"
-#include   "fault.h"
+#include "restart.h"
 #include "checksum.h"
 
 bool Ip4Trace = true;
@@ -84,8 +84,8 @@
 
 int Ip4HandleReceivedPacket(void (*traceback)(void), char* pPacketRx, int sizeRx, char* pPacketTx, int* pSizeTx, char* macRemote)
 {
-    int lastFaultPoint = FaultPoint;
-    FaultPoint = FAULT_POINT_Ip4HandleReceivedPacket;
+    int lastRestartPoint = RestartPoint;
+    RestartPoint = FAULT_POINT_Ip4HandleReceivedPacket;
 
     traceHeader = pPacketRx;
     pTraceBack = traceback;
@@ -118,7 +118,7 @@
             Ip4AddressLog(srcIp);
             Log("\r\n");
         }
-        FaultPoint = lastFaultPoint;
+        RestartPoint = lastRestartPoint;
         return DO_NOTHING;
     }
 
@@ -135,12 +135,12 @@
         case IP6IN4:                                                                                                                       break;
         default:
             LogTimeF("IP4 received packet unknown protocol %d\r\n", protocol);
-            FaultPoint = lastFaultPoint;
+            RestartPoint = lastRestartPoint;
             return DO_NOTHING;
     }
     if (!action)
     {
-        FaultPoint = lastFaultPoint;
+        RestartPoint = lastRestartPoint;
         return DO_NOTHING;
     }
 
@@ -161,7 +161,7 @@
     
     if (ActionGetTracePart(action)) logHeader(pPacketTx);
 
-    FaultPoint = lastFaultPoint;
+    RestartPoint = lastRestartPoint;
     return action;
 }
 int Ip4PollForPacketToSend(char* pPacket, int* pSize, char* pDstMac)