EthernetInterface patched with https://github.com/mbedmicro/mbed/commit/8222bde1af2e328e4c58d0f438827f3091e5e0eb

Dependencies:   Socket lwip-eth-ansond-patched lwip-sys lwip-ansond-patched

Dependents:   df-2013-thermostat-handson df-2013-minihack-thermostat-complete df-2013-minihack-thermostat df-2013-thermostat-remotes

Fork of EthernetInterface by mbed official

Revision:
35:cba86db5ab96
Parent:
33:c21b055c45b8
--- a/EthernetInterface.cpp	Tue Oct 01 11:29:54 2013 +0000
+++ b/EthernetInterface.cpp	Wed Oct 09 12:00:18 2013 +0100
@@ -33,6 +33,8 @@
 
 static char mac_addr[19];
 static char ip_addr[17] = "\0";
+static char gateway[17] = "\0";
+static char networkmask[17] = "\0";
 static bool use_dhcp = false;
 
 static Semaphore tcpip_inited(0);
@@ -52,6 +54,8 @@
 static void netif_status_callback(struct netif *netif) {
     if (netif_is_up(netif)) {
         strcpy(ip_addr, inet_ntoa(netif->ip_addr));
+        strcpy(gateway, inet_ntoa(netif->gw));
+        strcpy(networkmask, inet_ntoa(netif->netmask));
         netif_up.release();
     }
 }
@@ -142,3 +146,13 @@
 char* EthernetInterface::getIPAddress() {
     return ip_addr;
 }
+
+char* EthernetInterface::getGateway() {
+    return gateway;
+}
+
+char* EthernetInterface::getNetworkMask() {
+    return networkmask;
+}
+
+