10#if defined(USE_ESP32) && USE_NETWORK_IPV6
14 esp_ip6_addr_t ip6s[CONFIG_LWIP_IPV6_NUM_ADDRESSES];
15 size_t count = esp_netif_get_all_ip6(netif, ip6s);
17 if (
count > addresses.size() - 1) {
20 for (
auto &slot : warned) {
24 if (slot ==
nullptr) {
26 ESP_LOGW(TAG,
"%s has %zu IPv6 addresses, only %zu are reported", esp_netif_get_desc(netif),
count,
27 addresses.size() - 1);
31 count = addresses.size() - 1;
33 for (
size_t i = 0; i <
count; i++) {
45 bool disabled =
false;
77 const char *addr =
nullptr;
78#if defined(USE_NETWORK_PRIMARY_INTERFACE_WIFI) && defined(USE_WIFI)
80#elif defined(USE_ETHERNET)
82#elif defined(USE_MODEM)
84#elif defined(USE_WIFI)
86#elif defined(USE_OPENTHREAD)
89 if (addr !=
nullptr && addr[0] !=
'\0')
102#if defined(USE_NETWORK_PRIMARY_INTERFACE_WIFI) && defined(USE_WIFI)
105 for (
const auto &ip : ips) {
const StringRef & get_name() const
Get the name of this Application set by pre_setup().
network::IPAddresses get_ip_addresses()
const char * get_use_address() const
Returns nullptr when no explicit use_address is configured and the address is derived at runtime from...
network::IPAddresses get_ip_addresses()
const char * get_use_address() const
network::IPAddresses get_ip_addresses()
const char * get_use_address() const
Returns nullptr when no explicit use_address is configured and the address is derived at runtime from...
EthernetComponent * global_eth_component
ModemComponent * global_modem_component
std::array< IPAddress, 5 > IPAddresses
void fill_ip6_addresses(esp_netif_t *netif, IPAddresses &addresses)
Copies the IPv6 addresses of an esp_netif into addresses[1..], warning once when some do not fit.
ESPHOME_LOG_TAG(TAG, "network")
const char * get_use_address_to(std::span< char, USE_ADDRESS_BUFFER_SIZE > buf)
Get the active network address for logging.
network::IPAddresses get_ip_addresses()
bool is_disabled()
Return whether the network is disabled: every configured interface with a disable() lifecycle (modem,...
OpenThreadComponent * global_openthread_component
WiFiComponent * global_wifi_component
size_t make_name_with_suffix_to(char *buffer, size_t buffer_size, const char *name, size_t name_len, char sep, const char *suffix_ptr, size_t suffix_len)
Format name + separator + suffix directly into buffer without heap allocation.
Application App
Global storage of Application pointer - only one Application can exist.
struct esp_netif_obj esp_netif_t