Skip to content

Commit c2856ef

Browse files
Remove deprecated string-based get_ip_address_if
1 parent 92e2374 commit c2856ef

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

features/lwipstack/LWIPInterface.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -349,33 +349,6 @@ char *LWIP::Interface::get_ip_address(char *buf, nsapi_size_t buflen)
349349
#endif
350350
}
351351

352-
char *LWIP::Interface::get_ip_address_if(char *buf, nsapi_size_t buflen, const char *interface_name)
353-
{
354-
const ip_addr_t *addr;
355-
356-
if (interface_name == NULL) {
357-
addr = LWIP::get_ip_addr(true, &netif);
358-
} else {
359-
addr = LWIP::get_ip_addr(true, netif_find(interface_name));
360-
}
361-
if (!addr) {
362-
return NULL;
363-
}
364-
#if LWIP_IPV6
365-
if (IP_IS_V6(addr)) {
366-
return ip6addr_ntoa_r(ip_2_ip6(addr), buf, buflen);
367-
}
368-
#endif
369-
#if LWIP_IPV4
370-
if (IP_IS_V4(addr)) {
371-
return ip4addr_ntoa_r(ip_2_ip4(addr), buf, buflen);
372-
}
373-
#endif
374-
#if LWIP_IPV6 && LWIP_IPV4
375-
return NULL;
376-
#endif
377-
}
378-
379352
nsapi_error_t LWIP::Interface::get_netmask(SocketAddress *address)
380353
{
381354
if (!address) {

features/lwipstack/LWIPStack.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ class LWIP : public OnboardNetworkStack, private mbed::NonCopyable<LWIP> {
106106
*/
107107
virtual nsapi_error_t get_ipv6_link_local_address(SocketAddress *address);
108108

109-
MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated")
110-
virtual char *get_ip_address_if(char *buf, nsapi_size_t buflen, const char *interface_name);
111-
112109
/** Copies netmask of the network interface to user supplied buffer
113110
*
114111
* @param buf buffer to which netmask will be copied as "W:X:Y:Z"

0 commit comments

Comments
 (0)