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
ip6/slaac.cpp
- Committer:
- andrewboyson
- Date:
- 2017-05-01
- Revision:
- 13:9cd54f7db57a
- Parent:
- 10:f0854784e960
- Child:
- 15:6ca6778168b1
File content as of revision 13:9cd54f7db57a:
#include "mac.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++ = MacLocal[0] | 0x02; //Modified EUI-64 *p++ = MacLocal[1]; *p++ = MacLocal[2]; *p++ = 0xFF; *p++ = 0xFE; *p++ = MacLocal[3]; *p++ = MacLocal[4]; *p++ = MacLocal[5]; }