|
ESPHome 2026.11.0-dev
|
Data Structures | |
| class | ActiveInterfaceListener |
| Notified from the main loop when the interface holding the default route changes. More... | |
| struct | IPAddress |
| class | NetworkComponent |
Typedefs | |
| using | IPAddresses = std::array<IPAddress, 5> |
Enumerations | |
| enum class | NetworkInterface : uint8_t { NETWORK_INTERFACE_NONE , NETWORK_INTERFACE_ETHERNET , NETWORK_INTERFACE_WIFI } |
| The interface holding the default route. More... | |
Functions | |
| void | lowercase_ip_str (char *buf) |
| Lowercase hex digits in IP address string (A-F -> a-f for IPv6 per RFC 5952) | |
| ESPHOME_LOG_TAG (TAG, "network") | |
| 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. | |
| bool | is_disabled () |
| Return whether the network is disabled: every configured interface with a disable() lifecycle (modem, wifi, ethernet) is disabled. | |
| 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 () |
| ESPHOME_ALWAYS_INLINE bool | is_connected () |
| Return whether the node is connected to the network (through wifi, eth, ...) | |
| using esphome::network::IPAddresses = std::array<IPAddress, 5> |
Definition at line 369 of file ip_address.h.
|
strong |
The interface holding the default route.
Lists only the interfaces loop() arbitrates (ARBITRATED_NETWORK_TYPES in init.py); extend both together.
| Enumerator | |
|---|---|
| NETWORK_INTERFACE_NONE | |
| NETWORK_INTERFACE_ETHERNET | |
| NETWORK_INTERFACE_WIFI | |
Definition at line 18 of file network_component.h.
| esphome::network::ESPHOME_LOG_TAG | ( | TAG | , |
| "network" | ) |
| void esphome::network::fill_ip6_addresses | ( | esp_netif_t * | netif, |
| IPAddresses & | addresses ) |
| IPAddresses esphome::network::get_ip_addresses | ( | ) |
| const char * esphome::network::get_use_address_to | ( | std::span< char, USE_ADDRESS_BUFFER_SIZE > | buf | ) |
Get the active network address for logging.
Returns the explicitly configured use_address when one was set (from the highest-priority interface when network: priority: is configured), otherwise formats "<name>.local" from the runtime device name into buf (so it includes the MAC suffix from name_add_mac_suffix).
|
inline |
| bool esphome::network::is_disabled | ( | ) |
|
inline |
Lowercase hex digits in IP address string (A-F -> a-f for IPv6 per RFC 5952)
Definition at line 102 of file ip_address.h.