mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:39:44 +08:00
include/nuttx/net and net/: Move private prototype of netdev_foreach() from the public include/nuttx/net/net.h to the private net/netdev/ndetdev.h header file where it belongs.
This commit is contained in:
@@ -70,6 +70,15 @@ extern "C"
|
||||
EXTERN struct net_driver_s *g_netdevices;
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* Callback from netdev_foreach() */
|
||||
|
||||
struct net_driver_s; /* Forward reference */
|
||||
typedef int (*netdev_callback_t)(FAR struct net_driver_s *dev, FAR void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
@@ -120,6 +129,28 @@ bool netdev_verify(FAR struct net_driver_s *dev);
|
||||
FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_foreach
|
||||
*
|
||||
* Description:
|
||||
* Enumerate each registered network device.
|
||||
*
|
||||
* NOTE: netdev semaphore held throughout enumeration.
|
||||
*
|
||||
* Parameters:
|
||||
* callback - Will be called for each registered device
|
||||
* arg - User argument passed to callback()
|
||||
*
|
||||
* Returned Value:
|
||||
* 0:Enumeration completed 1:Enumeration terminated early by callback
|
||||
*
|
||||
* Assumptions:
|
||||
* Called from normal user mode
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int netdev_foreach(netdev_callback_t callback, FAR void *arg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_findby_ipv4addr
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user