mbed-os5 only for TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Revision:
1:9db0e321a9f4
Parent:
0:5b88d5760320
--- a/features/netsocket/NetworkStack.cpp	Tue Dec 17 23:23:45 2019 +0000
+++ b/features/netsocket/NetworkStack.cpp	Tue Dec 31 06:02:27 2019 +0000
@@ -24,15 +24,29 @@
 
 // Default NetworkStack operations
 
+nsapi_error_t NetworkStack::get_ip_address(SocketAddress *address)
+{
+    return NSAPI_ERROR_UNSUPPORTED;
+}
+
 const char *NetworkStack::get_ip_address()
 {
-    return 0;
+    return nullptr;
+}
+
+nsapi_error_t NetworkStack::get_ipv6_link_local_address(SocketAddress *address)
+{
+    return NSAPI_ERROR_UNSUPPORTED;
+}
+
+nsapi_error_t NetworkStack::get_ip_address_if(SocketAddress *address, const char *interface_name)
+{
+    return NSAPI_ERROR_UNSUPPORTED;
 }
 
 const char *NetworkStack::get_ip_address_if(const char *interface_name)
 {
-    return 0;
-
+    return nullptr;
 }
 
 nsapi_error_t NetworkStack::gethostbyname(const char *name, SocketAddress *address, nsapi_version_t version, const char *interface_name)
@@ -54,7 +68,7 @@
     // ip address of the underlying stack
     if (version == NSAPI_UNSPEC) {
         SocketAddress testaddress;
-        if (testaddress.set_ip_address(this->get_ip_address())) {
+        if (this->get_ip_address(&testaddress) == NSAPI_ERROR_OK) {
             version = testaddress.get_ip_version();
         }
     }
@@ -84,7 +98,7 @@
     // ip address of the underlying stack
     if (version == NSAPI_UNSPEC) {
         SocketAddress testaddress;
-        if (testaddress.set_ip_address(this->get_ip_address())) {
+        if (this->get_ip_address(&testaddress) == NSAPI_ERROR_OK) {
             version = testaddress.get_ip_version();
         }
     }