Remove deprecated string-based get_ip_address_if

pull/12063/head
Michal Paszta 2019-12-12 09:22:32 +02:00
parent 92e237414e
commit c2856ef710
2 changed files with 0 additions and 30 deletions

View File

@ -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) {

View File

@ -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"