ESP32Ping
ESP32Ping copied to clipboard
minor topic: ping.cpp - ping_recv(...) simplify inet_ntoa(...)
In place of:
// Get from IP address
ip4_addr_t fromaddr;
inet_addr_to_ip4addr(&fromaddr, &from.sin_addr);
strcpy(ipa, inet_ntoa(fromaddr));
later edit: which sometimes returs "0.0.0.0" for "www.google.ro"
it's easier/better to write:
// Get from IP address
strcpy(ipa, inet_ntoa(from.sin_addr));