how to convert esp_ip4_addr_t to ip_addr_t
Posted: Sat Apr 10, 2021 4:04 pm
Hi,
I want to ping my gateway.
I get my gateway address from the event handler (IP_EVENT_STA_GOT_IP) and is of type.
But to use the ping I need a target of type.
Can somebody tell me how to assing the gateway ip address from to ?
Thanks for helping.
I want to ping my gateway.
I get my gateway address from the event handler (IP_EVENT_STA_GOT_IP) and is of type
Code: Select all
esp_ip4_addr_t gw
But to use the ping I need a target of type
Code: Select all
ip_addr_t target
Can somebody tell me how to assing the gateway ip address from
Code: Select all
esp_ip4_addr_t gw
Code: Select all
ip_addr_t target
Code: Select all
target.u_addr = ...?
target.type = ...?