Network: Add logic to get a default network device (for the case where are multiple devices). For INADDR_ANY

This commit is contained in:
Gregory Nutt
2014-11-21 14:14:39 -06:00
parent d297b623b4
commit 735aa4289a
5 changed files with 135 additions and 3 deletions
+7 -1
View File
@@ -97,6 +97,12 @@ FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname);
FAR struct net_driver_s *netdev_findbyaddr(const net_ipaddr_t addr);
#endif
/* netdev_default.c ***********************************************************/
#if CONFIG_NSOCKET_DESCRIPTORS > 0
FAR struct net_driver_s *netdev_default(void);
#endif
/* netdev_txnotify.c *********************************************************/
#if CONFIG_NSOCKET_DESCRIPTORS > 0
@@ -111,7 +117,7 @@ void netdev_rxnotify(const net_ipaddr_t addr);
# define netdev_rxnotify(addr)
#endif
/* net_count.c ***************************************************************/
/* netdev_count.c ************************************************************/
#if CONFIG_NSOCKET_DESCRIPTORS > 0
int netdev_count(void);