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:
Gregory Nutt
2017-07-01 08:39:39 -06:00
parent ae1771454a
commit d280f8854e
4 changed files with 36 additions and 34 deletions
+31
View File
@@ -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
*