diff --git a/src/espwifistack.cpp b/src/espwifistack.cpp index 8a66187..37a2cb7 100644 --- a/src/espwifistack.cpp +++ b/src/espwifistack.cpp @@ -999,6 +999,11 @@ bool get_eth_connected() { return wifi_get_status_bits() & ETH_CONNECTED_BIT; } + +bool get_eth_has_ip() +{ + return wifi_get_status_bits() & ETH_HAS_IP_BIT; +} #endif namespace { diff --git a/src/espwifistack.h b/src/espwifistack.h index 5f67d37..a179bf6 100644 --- a/src/espwifistack.h +++ b/src/espwifistack.h @@ -105,5 +105,6 @@ tl::expected get_hostname_for_interface(esp_netif #ifdef CONFIG_ETH_ENABLED esp_eth_handle_t getEthHandle(); bool get_eth_connected(); +bool get_eth_has_ip(); #endif } // namespace wifi_stack