mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-05-21 09:05:59 +08:00
feat(lwip): update lwip component according to IDF
commit ID: 79a5b0b5
This commit is contained in:
@ -13,10 +13,33 @@ menu "Example Connection Configuration"
|
||||
Can be left blank if the network has no security set.
|
||||
|
||||
config EXAMPLE_CONNECT_IPV6
|
||||
bool "Obtain IPv6 link-local address"
|
||||
bool "Obtain IPv6 address"
|
||||
default n
|
||||
select LWIP_IPV6
|
||||
help
|
||||
By default, examples will wait until IPv4 and IPv6 addresses are obtained.
|
||||
By default, examples will wait until IPv4 and IPv6 local link addresses are obtained.
|
||||
Disable this option if the network does not support IPv6.
|
||||
Choose the preferred IPv6 address type if the connection code should wait until other than
|
||||
the local link address gets assigned.
|
||||
|
||||
if EXAMPLE_CONNECT_IPV6
|
||||
choice EXAMPLE_CONNECT_PREFERRED_IPV6
|
||||
prompt "Preferred IPv6 Type"
|
||||
default EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK
|
||||
help
|
||||
Select which kind of IPv6 address the connect logic waits for.
|
||||
|
||||
config EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK
|
||||
bool "Local Link Address"
|
||||
help
|
||||
Blocks until Local link address assigned.
|
||||
|
||||
config EXAMPLE_CONNECT_IPV6_PREF_GLOBAL
|
||||
bool "Global Address"
|
||||
select LWIP_IPV6_AUTOCONFIG
|
||||
help
|
||||
Blocks until Global address assigned.
|
||||
endchoice
|
||||
|
||||
endif
|
||||
endmenu
|
||||
|
@ -27,6 +27,11 @@
|
||||
|
||||
#ifdef CONFIG_EXAMPLE_CONNECT_IPV6
|
||||
#define CONNECTED_BITS (GOT_IPV4_BIT | GOT_IPV6_BIT)
|
||||
#if defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_LOCAL_LINK)
|
||||
#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE 0
|
||||
#elif defined(CONFIG_EXAMPLE_CONNECT_IPV6_PREF_GLOBAL)
|
||||
#define EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE 1
|
||||
#endif
|
||||
#else
|
||||
#define CONNECTED_BITS (GOT_IPV4_BIT)
|
||||
#endif
|
||||
@ -78,7 +83,13 @@ static void on_got_ipv6(void *arg, esp_event_base_t event_base,
|
||||
{
|
||||
ip_event_got_ip6_t *event = (ip_event_got_ip6_t *)event_data;
|
||||
memcpy(&s_ipv6_addr, &event->ip6_info.ip, sizeof(s_ipv6_addr));
|
||||
xEventGroupSetBits(s_connect_event_group, GOT_IPV6_BIT);
|
||||
if (EXAMPLE_CONNECT_PREFERRED_IPV6_TYPE) {
|
||||
if (ip6_addr_isglobal(&s_ipv6_addr)) {
|
||||
xEventGroupSetBits(s_connect_event_group, GOT_IPV6_BIT);
|
||||
}
|
||||
} else {
|
||||
xEventGroupSetBits(s_connect_event_group, GOT_IPV6_BIT);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CONFIG_EXAMPLE_CONNECT_IPV6
|
||||
|
Reference in New Issue
Block a user