Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Diff: slaac.cpp
- Revision:
- 7:b794780e33b4
diff -r e74649c90484 -r b794780e33b4 slaac.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/slaac.cpp Sun Mar 12 13:56:08 2017 +0000
@@ -0,0 +1,24 @@
+#include "eth.h"
+
+char SlaacLinkLocalIp[16];
+
+void SlaacInit()
+{
+ char* p = SlaacLinkLocalIp;
+ *p++ = 0xFE;
+ *p++ = 0x80;
+ *p++ = 0x00;
+ *p++ = 0x00;
+ *p++ = 0x00;
+ *p++ = 0x00;
+ *p++ = 0x00;
+ *p++ = 0x00;
+ *p++ = EthLocalMac[0] | 0x02; //Modified EUI-64
+ *p++ = EthLocalMac[1];
+ *p++ = EthLocalMac[2];
+ *p++ = 0xFF;
+ *p++ = 0xFE;
+ *p++ = EthLocalMac[3];
+ *p++ = EthLocalMac[4];
+ *p++ = EthLocalMac[5];
+}
\ No newline at end of file