mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
Merge branch 'examples/icmpv6_ping_readme_update' into 'master'
docs(examples): Added network config to icmpv6_ping readme Closes IDFGH-11853 and IDF-9847 See merge request espressif/esp-idf!29400
This commit is contained in:
commit
443843b362
@ -1247,6 +1247,7 @@ static esp_err_t esp_netif_tx_rx_event_api(esp_netif_api_msg_t *msg)
|
||||
esp_netif_t *esp_netif = msg->esp_netif;
|
||||
if (esp_netif == NULL) {
|
||||
ESP_LOGE(TAG, "Invalid esp_netif");
|
||||
return ESP_ERR_ESP_NETIF_INVALID_PARAMS;
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "%s esp_netif:%p", __func__, esp_netif);
|
||||
|
@ -32,6 +32,11 @@ Set the following parameters under "***Example Configuration***" Options:
|
||||
**Destination IPV6 Address** can also be set manually by modifying the source file `icmpv6_ping.c`.
|
||||
* Press '**`s`**' to save and '**`q`**' to quit the menu.
|
||||
|
||||
Network configuration:
|
||||
* Ensure the Wifi router you are connecting to has a global IPv6 address.
|
||||
If not, this example will keep waiting for a *Router Advertisement* message.
|
||||
* To make this example work with the default settings set the global IPv6 of your router address as `2001:DB8::56AF:97FF:FEB3:2195`
|
||||
|
||||
#### Build and execute as follows:
|
||||
```sh
|
||||
idf.py build
|
||||
|
@ -132,7 +132,7 @@ static int create_multicast_ipv4_socket(void)
|
||||
|
||||
// Assign multicast TTL (set separately from normal interface TTL)
|
||||
uint8_t ttl = MULTICAST_TTL;
|
||||
setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(uint8_t));
|
||||
err = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(uint8_t));
|
||||
if (err < 0) {
|
||||
ESP_LOGE(V4TAG, "Failed to set IP_MULTICAST_TTL. Error %d", errno);
|
||||
goto err;
|
||||
@ -193,7 +193,7 @@ static int create_multicast_ipv6_socket(void)
|
||||
goto err;
|
||||
}
|
||||
|
||||
// Selct the interface to use as multicast source for this socket.
|
||||
// Select the interface to use as multicast source for this socket.
|
||||
#if LISTEN_ALL_IF
|
||||
bzero(&if_inaddr.un, sizeof(if_inaddr.un));
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user