@@ -60,6 +60,35 @@ EthernetConnectionHandler::EthernetConnectionHandler(
6060 _settings.eth .response_timeout = responseTimeout;
6161}
6262
63+ /* *****************************************************************************
64+ PUBLIC MEMBER FUNCTIONS
65+ ******************************************************************************/
66+
67+ int EthernetConnectionHandler::ping (IPAddress ip, uint8_t ttl, uint8_t count) {
68+ #if defined(ARDUINO_ARCH_ZEPHYR)
69+ return 0 ;
70+ #else
71+ return Ethernet.ping (ip);
72+ #endif // ARDUINO_ARCH_ZEPHYR
73+ }
74+
75+ int EthernetConnectionHandler::ping (const String &hostname, uint8_t ttl, uint8_t count) {
76+ #if defined(ARDUINO_ARCH_ZEPHYR)
77+ return 0 ;
78+ #else
79+ return Ethernet.ping (hostname);
80+ #endif // ARDUINO_ARCH_ZEPHYR
81+ }
82+
83+ int EthernetConnectionHandler::ping (const char * host, uint8_t ttl, uint8_t count) {
84+ #if defined(ARDUINO_ARCH_ZEPHYR)
85+ return 0 ;
86+ #else
87+ return Ethernet.ping (host);
88+ #endif // ARDUINO_ARCH_ZEPHYR
89+ }
90+
91+
6392/* *****************************************************************************
6493 PROTECTED MEMBER FUNCTIONS
6594 ******************************************************************************/
@@ -110,7 +139,7 @@ NetworkConnectionState EthernetConnectionHandler::update_handleConnecting()
110139 return NetworkConnectionState::CONNECTED;
111140 }
112141
113- int ping_result = Ethernet. ping (" time.arduino.cc" );
142+ int ping_result = ping (" time.arduino.cc" );
114143 DEBUG_INFO (F (" Ethernet.ping(): %d" ), ping_result);
115144 if (ping_result < 0 )
116145 {
0 commit comments