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/dhcp.c
- Revision:
- 185:e8f516e142c4
- Parent:
- 184:ad80a63e3002
- Child:
- 187:122fc1996c86
--- a/udp/dhcp/dhcp.c Thu Jan 14 13:41:02 2021 +0000 +++ b/udp/dhcp/dhcp.c Thu Jan 14 14:18:59 2021 +0000 @@ -258,6 +258,7 @@ DhcpHdrSetSiaddr(pPacket, 0 ); //'Server' address to use if required DhcpHdrSetGiaddr(pPacket, 0 ); //'Gateway' address memcpy(DhcpHdrPtrChaddr(pPacket), MacLocal, 6); //'Client hardware' address. 6 bytes for ethernet + memset(DhcpHdrPtrChaddr(pPacket) + 6, 0, 10 ); //Pad the remainder of the hardware address field with zeros memset(DhcpHdrPtrLegacy(pPacket), 0, 192 ); //BootP legacy fill with zeros DhcpHdrSetCookie(pPacket, COOKIE ); //Magic cookie