mbed-os5 only for TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Revision:
1:9db0e321a9f4
Parent:
0:5b88d5760320
--- a/features/netsocket/OnboardNetworkStack.h	Tue Dec 17 23:23:45 2019 +0000
+++ b/features/netsocket/OnboardNetworkStack.h	Tue Dec 31 06:02:27 2019 +0000
@@ -22,6 +22,7 @@
 #include "NetworkStack.h"
 #include "EMAC.h"
 #include "L3IP.h"
+#include "PPP.h"
 
 /**
  * mbed OS API for onboard IP stack abstraction
@@ -108,42 +109,28 @@
 
         virtual char *get_mac_address(char *buf, nsapi_size_t buflen) = 0;
 
-        /** Copies IP address of the network interface to user supplied buffer
-         *
-         * @param    buf        buffer to which IP address will be copied as "W:X:Y:Z"
-         * @param    buflen     size of supplied buffer
-         * @param    interface_name  Network interface name
-         * @return              Pointer to a buffer, or NULL if the buffer is too small
-         */
+        /** @copydoc NetworkStack::get_ip_address */
+        virtual nsapi_error_t get_ip_address(SocketAddress *address) = 0;
 
+        MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated")
         virtual char *get_ip_address(char *buf, nsapi_size_t buflen) = 0;
 
-        /** Copies IP address of the network interface to user supplied buffer
-         *
-         * @param    buf        buffer to which IP address will be copied as "W:X:Y:Z"
-         * @param    buflen     size of supplied buffer
-         * @param    interface_name  Network interface name
-         * @return              Pointer to a buffer, or NULL if the buffer is too small
-         */
-        virtual char *get_ip_address_if(char *buf, nsapi_size_t buflen, const char *interface_name)
+        /** @copydoc NetworkStack::get_ipv6_link_local_address */
+        virtual nsapi_error_t get_ipv6_link_local_address(SocketAddress *address)
         {
-            return NULL;
-        };
+            return NSAPI_ERROR_UNSUPPORTED;
+        }
 
-        /** Copies netmask of the network interface to user supplied buffer
-         *
-         * @param    buf        buffer to which netmask will be copied as "W:X:Y:Z"
-         * @param    buflen     size of supplied buffer
-         * @return              Pointer to a buffer, or NULL if the buffer is too small
-         */
+        /** @copydoc NetworkStack::get_netmask */
+        virtual nsapi_error_t get_netmask(SocketAddress *address) = 0;
+
+        MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated")
         virtual char *get_netmask(char *buf, nsapi_size_t buflen) = 0;
 
-        /** Copies gateway address of the network interface to user supplied buffer
-         *
-         * @param    buf        buffer to which gateway address will be copied as "W:X:Y:Z"
-         * @param    buflen     size of supplied buffer
-         * @return              Pointer to a buffer, or NULL if the buffer is too small
-         */
+        /** @copydoc NetworkStack::get_gateway */
+        virtual nsapi_error_t get_gateway(SocketAddress *address) = 0;
+
+        MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated")
         virtual char *get_gateway(char *buf, nsapi_size_t buflen) = 0;
     };
 
@@ -165,11 +152,21 @@
         return NSAPI_ERROR_OK;
     };
 
+    virtual nsapi_error_t add_ppp_interface(PPP &ppp, bool default_if, Interface **interface_out)
+    {
+        return NSAPI_ERROR_UNSUPPORTED;
+    };
+
     virtual nsapi_error_t remove_l3ip_interface(Interface **interface_out)
     {
         return NSAPI_ERROR_OK;
     };
 
+    virtual nsapi_error_t remove_ppp_interface(Interface **interface_out)
+    {
+        return NSAPI_ERROR_UNSUPPORTED;
+    };
+
     virtual void set_default_interface(OnboardNetworkStack::Interface *interface)
     {
     }