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:
44:83ce5ace337b
Parent:
37:793b39683406
Child:
49:1a6336f2b3f9
--- a/ip6/slaac.cpp	Thu Oct 19 20:56:58 2017 +0000
+++ b/ip6/slaac.cpp	Sun Oct 22 17:19:17 2017 +0000
@@ -5,11 +5,12 @@
 char SlaacLinkLocalIp[16];
 char SlaacGlobalIp[16];
 
-bool SlaacIsMe(char* ip)
+int SlaacScope(char* ip)
 {
-    return Ip6IsSame(ip, SlaacLinkLocalIp) || Ip6IsSame(ip, SlaacGlobalIp);
+    if (Ip6IsSame(ip, SlaacLinkLocalIp)) return SCOPE_LOCAL;
+    if (Ip6IsSame(ip, SlaacGlobalIp   )) return SCOPE_GLOBAL;
+    return SCOPE_NONE;
 }
-
 void SlaacMakeGlobal(char* pPrefix)
 {
     memcpy(SlaacGlobalIp, pPrefix, 8);