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:
43:bc028d5a6424
Child:
47:73af5c0b0dc2
--- a/udp/dhcp.cpp	Thu Oct 19 20:56:58 2017 +0000
+++ b/udp/dhcp.cpp	Sun Oct 22 17:19:17 2017 +0000
@@ -75,6 +75,12 @@
 uint32_t DhcpDnsServer   = 0;
 char     DhcpDomainName[20];
 char     DhcpHostName[20];
+
+bool DhcpIpNeedsToBeRouted(uint32_t ip)
+{   
+    return ip & DhcpSubnetMask != DhcpBroadcastIp & DhcpSubnetMask;
+}
+
 static uint32_t readOption32(char** pp)
 {
     uint32_t value = 0;