zhhyu7 commented on code in PR #3465:
URL: https://github.com/apache/nuttx-apps/pull/3465#discussion_r3192564530


##########
include/netutils/netlib.h:
##########
@@ -561,12 +561,41 @@ int netlib_getifstatistics(FAR const char *ifname,
 int netlib_check_ifconflict(FAR const char *ifname);
 #endif
 
-#ifdef CONFIG_NETUTILS_PING
+/**
+ * @brief

Review Comment:
   Done.



##########
include/netutils/netlib.h:
##########
@@ -561,12 +561,41 @@ int netlib_getifstatistics(FAR const char *ifname,
 int netlib_check_ifconflict(FAR const char *ifname);
 #endif
 
-#ifdef CONFIG_NETUTILS_PING
+/**
+ * @brief
+ *   Check network connectivity by pinging a remote IP address.
+ *   If ip is NULL, ping the gateway of each network interface,
+ *   and optionally the routers from the routing table. If ping
+ *   is disabled, just check the status of the IP network card.
+ *
+ * @param  ip      The ipv4 address to check, or NULL to ping gateways
+ * @param  timeout The max timeout of each ping
+ * @param  retry   The retry times of ping
+ *
+ * @return
+ *   nums of remote reply of ping; a negative on failure
+ */
+
 int netlib_check_ipconnectivity(FAR const char *ip, int timeout, int retry);
+
+#ifdef CONFIG_NETUTILS_PING
+
+/**
+ * @brief
+ *   Check network connectivity by pinging the default gateway
+ *   of the specified network interface.
+ *
+ * @param  ifname  The name of the interface to use
+ * @param  timeout The timeout of ping
+ * @param  retry   The retry times of ping
+ *
+ * @return
+ *   nums of gateway reply of ping; a negative on failure.
+ */

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to