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:
143:8cec8f08dc54
Parent:
105:ef2dd21d808c
Child:
172:9bc3c7b2cca1
--- a/eth/mac.c	Wed May 08 12:15:13 2019 +0000
+++ b/eth/mac.c	Thu May 09 07:47:12 2019 +0000
@@ -13,15 +13,15 @@
 {
     memset(mac, 0, 6);
 }
-void MacCopy(char* macTo, char* macFrom)
+void MacCopy(char* macTo, const char* macFrom)
 {
     memcpy(macTo, macFrom, 6);
 }
-bool MacIsSame(char* macA, char* macB)
+bool MacIsSame(const char* macA, const char* macB)
 {
     return memcmp(macA, macB, 6) == 0;
 }
-bool MacIsEmpty(char* mac)
+bool MacIsEmpty(const char* mac)
 {
            if (*mac) return false;
     mac++; if (*mac) return false;
@@ -32,20 +32,20 @@
     return true;
 }
 
-int MacToString(char* mac, int size, char* text)
+int MacToString(const char* mac, int size, char* text)
 {
     return snprintf(text, size, "%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 }
-int MacLog(char* mac)
+int MacLog(const char* mac)
 {
     return LogF("%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 }
-int MacHttp(char* mac)
+int MacHttp(const char* mac)
 {
     return HttpAddF("%02x:%02x:%02x:%02x:%02x:%02x", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
 }
 
-int MacAccept(char* p)
+int MacAccept(const char* p)
 {
     switch (*p)
     {