1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-20 00:35:44 +00:00

Enable IPv6 for ESP32 Arduino, wifi and ethernet (#4865)

This commit is contained in:
Jimmy Hedman
2023-07-31 00:20:55 +02:00
committed by GitHub
parent 98bf427600
commit c418eecf83
4 changed files with 75 additions and 6 deletions

View File

@@ -65,6 +65,9 @@ class EthernetComponent : public Component {
protected:
static void eth_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data);
static void got_ip_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data);
#if LWIP_IPV6
static void got_ip6_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data);
#endif /* LWIP_IPV6 */
void start_connect_();
void dump_connect_params_();
@@ -83,6 +86,10 @@ class EthernetComponent : public Component {
bool started_{false};
bool connected_{false};
#if LWIP_IPV6
bool got_ipv6_{false};
uint8_t ipv6_count_{0};
#endif /* LWIP_IPV6 */
EthernetComponentState state_{EthernetComponentState::STOPPED};
uint32_t connect_begin_;
esp_netif_t *eth_netif_{nullptr};