diff --git a/features/lwipstack/LWIPInterface.cpp b/features/lwipstack/LWIPInterface.cpp index aef8e246e2..e6e59a450a 100644 --- a/features/lwipstack/LWIPInterface.cpp +++ b/features/lwipstack/LWIPInterface.cpp @@ -349,33 +349,6 @@ char *LWIP::Interface::get_ip_address(char *buf, nsapi_size_t buflen) #endif } -char *LWIP::Interface::get_ip_address_if(char *buf, nsapi_size_t buflen, const char *interface_name) -{ - const ip_addr_t *addr; - - if (interface_name == NULL) { - addr = LWIP::get_ip_addr(true, &netif); - } else { - addr = LWIP::get_ip_addr(true, netif_find(interface_name)); - } - if (!addr) { - return NULL; - } -#if LWIP_IPV6 - if (IP_IS_V6(addr)) { - return ip6addr_ntoa_r(ip_2_ip6(addr), buf, buflen); - } -#endif -#if LWIP_IPV4 - if (IP_IS_V4(addr)) { - return ip4addr_ntoa_r(ip_2_ip4(addr), buf, buflen); - } -#endif -#if LWIP_IPV6 && LWIP_IPV4 - return NULL; -#endif -} - nsapi_error_t LWIP::Interface::get_netmask(SocketAddress *address) { if (!address) { diff --git a/features/lwipstack/LWIPStack.h b/features/lwipstack/LWIPStack.h index 54f2fed081..3d25b304fb 100644 --- a/features/lwipstack/LWIPStack.h +++ b/features/lwipstack/LWIPStack.h @@ -106,9 +106,6 @@ public: */ virtual nsapi_error_t get_ipv6_link_local_address(SocketAddress *address); - MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated") - virtual char *get_ip_address_if(char *buf, nsapi_size_t buflen, const char *interface_name); - /** Copies netmask of the network interface to user supplied buffer * * @param buf buffer to which netmask will be copied as "W:X:Y:Z"