Implementation of the NetworkSocketAPI for LWIP

Dependencies:   lwip-eth lwip-sys lwip

Dependents:   HelloLWIPInterface HelloLWIPInterfaceNonBlocking LWIPInterfaceTests SimpleHTTPExample ... more

Revision:
15:0d8d1dafe064
Parent:
14:67b325c56cde
Child:
16:1efb0d91c223
--- a/LWIPInterface.cpp	Tue Apr 05 23:38:36 2016 +0000
+++ b/LWIPInterface.cpp	Wed Apr 06 00:20:35 2016 +0000
@@ -29,8 +29,8 @@
 /* TCP/IP and Network Interface Initialisation */
 static struct netif netif;
 
-static char ip_addr[SocketAddress::IP_SIZE] = "\0";
-static char mac_addr[200] = "\0";
+static char ip_addr[NSAPI_IP_SIZE] = "\0";
+static char mac_addr[NSAPI_MAC_SIZE] = "\0";
 
 static Semaphore tcpip_inited(0);
 static Semaphore netif_linked(0);
@@ -122,9 +122,9 @@
     return mac_addr;
 }
 
-void *LWIPInterface::socket_create(protocol_t proto)
+void *LWIPInterface::socket_create(nsapi_protocol_t proto)
 {
-    int type = (proto == NetworkInterface::UDP) ? SOCK_DGRAM : SOCK_STREAM;
+    int type = (proto == NSAPI_UDP) ? SOCK_DGRAM : SOCK_STREAM;
     int fd = lwip_socket(AF_INET, type, 0);
     if (fd < 0) {
         return 0;