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
Diff: udp/dhcp.cpp
- Revision:
- 13:9cd54f7db57a
- Parent:
- 10:f0854784e960
- Child:
- 14:e75a59c1123d
diff -r 3723f84e1c64 -r 9cd54f7db57a udp/dhcp.cpp --- a/udp/dhcp.cpp Thu Apr 20 13:50:30 2017 +0000 +++ b/udp/dhcp.cpp Mon May 01 18:20:55 2017 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" #include "log.h" #include "net.h" -#include "eth.h" +#include "mac.h" #include "udp.h" #define DEBUG false @@ -198,7 +198,7 @@ pHeader->yiaddr = 0; //'Your' address returned by server pHeader->siaddr = srvIp; //'Server' address to use if required pHeader->giaddr = 0; //'Gateway' address - memcpy(pHeader->chaddr, EthLocalMac, 6); //'Client hardware' address. 6 bytes for ethernet + memcpy(pHeader->chaddr, MacLocal, 6); //'Client hardware' address. 6 bytes for ethernet memset(pHeader->legacy, 0, 192); //BootP legacy fill with zeros pHeader->cookie = NetToHost32(COOKIE); //Magic cookie