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:
35:93c39d260a83
Parent:
14:e75a59c1123d
Child:
36:900e24b27bfb
diff -r e3a7bff69bfc -r 93c39d260a83 eth/mac.cpp
--- a/eth/mac.cpp	Fri Sep 01 15:06:59 2017 +0000
+++ b/eth/mac.cpp	Fri Sep 22 13:55:56 2017 +0000
@@ -4,6 +4,17 @@
 
 char MacLocal[6];
 
+bool MacIsEmpty(char* mac)
+{
+           if (*mac) return false;
+    mac++; if (*mac) return false;
+    mac++; if (*mac) return false;
+    mac++; if (*mac) return false;
+    mac++; if (*mac) return false;
+    mac++; if (*mac) return false;
+    return true;
+}
+
 int MacToString(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]);