diff --git a/src/asyncudplistener.cpp b/src/asyncudplistener.cpp index bde1c48..474bd73 100644 --- a/src/asyncudplistener.cpp +++ b/src/asyncudplistener.cpp @@ -145,25 +145,6 @@ tl::expected makeUdpPacketWrapper(pbufUniquePtr & } } // namespace -tcpip_adapter_if_t UdpPacketWrapper::tcpIpAdapter() const -{ - for (int i = 0; i < TCPIP_ADAPTER_IF_MAX; i++) - { - tcpip_adapter_if_t tcpip_if = tcpip_adapter_if_t(i); - struct netif *nif{}; - if (const auto result = tcpip_adapter_get_netif(tcpip_if, (void**)&nif); result != ESP_OK) - { - ESP_LOGW(TAG, "tcpip_adapter_get_netif() failed with %s", esp_err_to_name(result)); - continue; - } - - if (nif && nif == _ntif) - return tcpip_if; - } - - return TCPIP_ADAPTER_IF_MAX; -} - bool AsyncUdpListener::listen(const ip_addr_t *addr, uint16_t port) { if (!_udp_queue.constructed()) diff --git a/src/asyncudplistener.h b/src/asyncudplistener.h index 139f832..df4ee96 100644 --- a/src/asyncudplistener.h +++ b/src/asyncudplistener.h @@ -34,8 +34,6 @@ struct UdpPacketWrapper auto data() const { return _data; } - tcpip_adapter_if_t tcpIpAdapter() const; - struct netif *ntif() const { return _ntif; } bool isBroadcast() const { return ip_addr_isbroadcast(&(_local.addr), _ntif); }