docs(examples): Added network config to icmpv6_ping readme and other fixes

This commit is contained in:
Abhik Roy 2024-03-02 21:26:19 +11:00
parent 6354a793e0
commit a13bd2388b
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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