This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 4ce3dac146637ad84764970e948f98f48b840cc4
Author: zhanghongyu <[email protected]>
AuthorDate: Mon Jul 14 16:56:45 2025 +0800

    net: move the tool interface functions to the public directory
    
    expose the query interface of the network card to the network card
    driver so that the network card driver can support more features.
    
    Signed-off-by: zhanghongyu <[email protected]>
---
 include/nuttx/net/net.h | 35 +++++++++++++++++++++++++++++++++++
 net/netdev/netdev.h     | 35 -----------------------------------
 2 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/include/nuttx/net/net.h b/include/nuttx/net/net.h
index a77546dc2d7..2fcdf612aeb 100644
--- a/include/nuttx/net/net.h
+++ b/include/nuttx/net/net.h
@@ -1504,6 +1504,41 @@ void netdev_lock(FAR struct net_driver_s *dev);
 
 void netdev_unlock(FAR struct net_driver_s *dev);
 
+/****************************************************************************
+ * Name: netdev_findbyname
+ *
+ * Description:
+ *   Find a previously registered network device using its assigned
+ *   network interface name
+ *
+ * Input Parameters:
+ *   ifname The interface name of the device of interest
+ *
+ * Returned Value:
+ *  Pointer to driver on success; null on failure
+ *
+ ****************************************************************************/
+
+FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname);
+
+/****************************************************************************
+ * Name: netdev_findbyindex
+ *
+ * Description:
+ *   Find a previously registered network device by assigned interface index.
+ *
+ * Input Parameters:
+ *   ifindex - The interface index.  This is a one-based index and must be
+ *             greater than zero.
+ *
+ * Returned Value:
+ *  Pointer to driver on success; NULL on failure.  This function will return
+ *  NULL only if there is no device corresponding to the provided index.
+ *
+ ****************************************************************************/
+
+FAR struct net_driver_s *netdev_findbyindex(int ifindex);
+
 #undef EXTERN
 #ifdef __cplusplus
 }
diff --git a/net/netdev/netdev.h b/net/netdev/netdev.h
index 1e3003de02d..5f50d6dad4c 100644
--- a/net/netdev/netdev.h
+++ b/net/netdev/netdev.h
@@ -106,23 +106,6 @@ typedef int (*netdev_callback_t)(FAR struct net_driver_s 
*dev,
 
 bool netdev_verify(FAR struct net_driver_s *dev);
 
-/****************************************************************************
- * Name: netdev_findbyname
- *
- * Description:
- *   Find a previously registered network device using its assigned
- *   network interface name
- *
- * Input Parameters:
- *   ifname The interface name of the device of interest
- *
- * Returned Value:
- *  Pointer to driver on success; null on failure
- *
- ****************************************************************************/
-
-FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname);
-
 /****************************************************************************
  * Name: netdev_foreach
  *
@@ -241,24 +224,6 @@ FAR struct net_driver_s *netdev_findby_ripv6addr(
                                 const net_ipv6addr_t ripaddr);
 #endif
 
-/****************************************************************************
- * Name: netdev_findbyindex
- *
- * Description:
- *   Find a previously registered network device by assigned interface index.
- *
- * Input Parameters:
- *   ifindex - The interface index.  This is a one-based index and must be
- *             greater than zero.
- *
- * Returned Value:
- *  Pointer to driver on success; NULL on failure.  This function will return
- *  NULL only if there is no device corresponding to the provided index.
- *
- ****************************************************************************/
-
-FAR struct net_driver_s *netdev_findbyindex(int ifindex);
-
 /****************************************************************************
  * Name: netdev_nextindex
  *

Reply via email to