mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 07:45:16 +08:00
net/: Lots of build problems introduced into multiple NIC support. Many places where conditional logic based on CONFIG_NETDEV_MULTINIC is confused with CONFIG_NET_MULTILINK. Lots of code changed with IPv6 that was never compiled with MULTINIC enabled. Still some problem with parameter passing.
This commit is contained in:
+8
-8
@@ -100,7 +100,7 @@ FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname);
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
FAR struct net_driver_s *netdev_findby_ipv4addr(in_addr_t lipaddr,
|
||||
in_addr_t ripaddr);
|
||||
#else
|
||||
@@ -109,7 +109,7 @@ FAR struct net_driver_s *netdev_findby_ipv4addr(in_addr_t ripaddr);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
FAR struct net_driver_s *netdev_findby_ipv6addr(const net_ipv6addr_t lipaddr,
|
||||
const net_ipv6addr_t ripaddr);
|
||||
#else
|
||||
@@ -128,7 +128,7 @@ FAR struct net_driver_s *netdev_default(void);
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
# ifdef CONFIG_NET_MULTILINK
|
||||
# ifdef CONFIG_NETDEV_MULTINIC
|
||||
void netdev_ipv4_txnotify(in_addr_t lipaddr, in_addr_t ripaddr);
|
||||
# else
|
||||
void netdev_ipv4_txnotify(in_addr_t ripaddr);
|
||||
@@ -136,7 +136,7 @@ void netdev_ipv4_txnotify(in_addr_t ripaddr);
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
# ifdef CONFIG_NET_MULTILINK
|
||||
# ifdef CONFIG_NETDEV_MULTINIC
|
||||
void netdev_ipv6_txnotify(FAR const net_ipv6addr_t lipaddr,
|
||||
FAR const net_ipv6addr_t ripaddr);
|
||||
# else
|
||||
@@ -150,7 +150,7 @@ void netdev_ipv6_txnotify(FAR const net_ipv6addr_t ripaddr);
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET_RXAVAIL)
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
# ifdef CONFIG_NET_MULTILINK
|
||||
# ifdef CONFIG_NETDEV_MULTINIC
|
||||
void netdev_ipv4_rxnotify(in_addr_t lipaddr, in_addr_t ripaddr);
|
||||
# else
|
||||
void netdev_ipv4_rxnotify(in_addr_t ripaddr);
|
||||
@@ -158,7 +158,7 @@ void netdev_ipv4_rxnotify(in_addr_t ripaddr);
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
# ifdef CONFIG_NET_MULTILINK
|
||||
# ifdef CONFIG_NETDEV_MULTINIC
|
||||
void netdev_ipv6_rxnotify(FAR const net_ipv6addr_t lipaddr,
|
||||
FAR const net_ipv6addr_t ripaddr);
|
||||
# else
|
||||
@@ -168,7 +168,7 @@ void netdev_ipv6_rxnotify(FAR const net_ipv6addr_t ripaddr);
|
||||
|
||||
#else
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
# ifdef CONFIG_NET_MULTILINK
|
||||
# ifdef CONFIG_NETDEV_MULTINIC
|
||||
# define netdev_ipv4_rxnotify(lipaddr,ripaddr)
|
||||
# else
|
||||
# define netdev_ipv4_rxnotify(ripaddr)
|
||||
@@ -176,7 +176,7 @@ void netdev_ipv6_rxnotify(FAR const net_ipv6addr_t ripaddr);
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
# ifdef CONFIG_NET_MULTILINK
|
||||
# ifdef CONFIG_NETDEV_MULTINIC
|
||||
# define netdev_ipv6_rxnotify(lipaddr,ripaddr)
|
||||
# else
|
||||
# define netdev_ipv6_rxnotify(ripaddr)
|
||||
|
||||
@@ -192,7 +192,7 @@ netdev_finddevice_ipv6addr(const net_ipv6addr_t ripaddr)
|
||||
*
|
||||
* Parameters:
|
||||
* lipaddr - Local, bound address of a connection. Used only if ripaddr
|
||||
* is the broadcast address. Used only if CONFIG_NET_MULTILINK.
|
||||
* is the broadcast address. Used only if CONFIG_NETDEV_MULTINIC.
|
||||
* ripaddr - Remote address of a connection to use in the lookup
|
||||
*
|
||||
* Returned Value:
|
||||
@@ -204,7 +204,7 @@ netdev_finddevice_ipv6addr(const net_ipv6addr_t ripaddr)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
FAR struct net_driver_s *netdev_findby_ipv4addr(in_addr_t lipaddr,
|
||||
in_addr_t ripaddr)
|
||||
#else
|
||||
@@ -221,7 +221,7 @@ FAR struct net_driver_s *netdev_findby_ipv4addr(in_addr_t ripaddr)
|
||||
|
||||
if (net_ipv4addr_cmp(ripaddr, g_ipv4_alloneaddr))
|
||||
{
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
/* Yes.. Check the local, bound address. Is it INADDR_ANY? */
|
||||
|
||||
if (net_ipv4addr_cmp(lipaddr, g_ipv4_allzeroaddr))
|
||||
@@ -283,7 +283,7 @@ FAR struct net_driver_s *netdev_findby_ipv4addr(in_addr_t ripaddr)
|
||||
* out subnet to a router and there is no routing information.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NET_MULTILINK
|
||||
#ifndef CONFIG_NETDEV_MULTINIC
|
||||
/* If there is only a single, registered network interface, then the
|
||||
* decision is pretty easy. Use that device and its default router
|
||||
* address.
|
||||
@@ -310,7 +310,7 @@ FAR struct net_driver_s *netdev_findby_ipv4addr(in_addr_t ripaddr)
|
||||
*
|
||||
* Parameters:
|
||||
* lipaddr - Local, bound address of a connection. Used only if ripaddr
|
||||
* is the broadcast address. Used only if CONFIG_NET_MULTILINK.
|
||||
* is the broadcast address. Used only if CONFIG_NETDEV_MULTINIC.
|
||||
* ripaddr - Remote address of a connection to use in the lookup
|
||||
*
|
||||
* Returned Value:
|
||||
@@ -322,7 +322,7 @@ FAR struct net_driver_s *netdev_findby_ipv4addr(in_addr_t ripaddr)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
FAR struct net_driver_s *netdev_findby_ipv6addr(const net_ipv6addr_t lipaddr,
|
||||
const net_ipv6addr_t ripaddr)
|
||||
#else
|
||||
@@ -339,7 +339,7 @@ FAR struct net_driver_s *netdev_findby_ipv6addr(const net_ipv6addr_t ripaddr)
|
||||
|
||||
if (net_ipv6addr_cmp(ripaddr, g_ipv6_alloneaddr))
|
||||
{
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
/* Yes.. Check the local, bound address. Is it INADDR_ANY? */
|
||||
|
||||
if (net_ipv6addr_cmp(lipaddr, g_ipv6_allzeroaddr))
|
||||
@@ -401,7 +401,7 @@ FAR struct net_driver_s *netdev_findby_ipv6addr(const net_ipv6addr_t ripaddr)
|
||||
* out subnet to a router and there is no routing information.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NET_MULTILINK
|
||||
#ifndef CONFIG_NETDEV_MULTINIC
|
||||
/* If there is only a single, registered network interface, then the
|
||||
* decision is pretty easy. Use that device and its default router
|
||||
* address.
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
void netdev_ipv4_rxnotify(in_addr_t lipaddr, in_addr_t ripaddr)
|
||||
#else
|
||||
void netdev_ipv4_rxnotify(in_addr_t ripaddr)
|
||||
@@ -104,7 +104,7 @@ void netdev_ipv4_rxnotify(in_addr_t ripaddr)
|
||||
|
||||
/* Find the device driver that serves the subnet of the remote address */
|
||||
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
dev = netdev_findby_ipv4addr(lipaddr, ripaddr);
|
||||
#else
|
||||
dev = netdev_findby_ipv4addr(ripaddr);
|
||||
@@ -139,7 +139,7 @@ void netdev_ipv4_rxnotify(in_addr_t ripaddr)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
void netdev_ipv6_rxnotify(FAR const net_ipv6addr_t lipaddr,
|
||||
FAR const net_ipv6addr_t ripaddr)
|
||||
#else
|
||||
@@ -150,7 +150,7 @@ void netdev_ipv6_rxnotify(FAR const net_ipv6addr_t ripaddr)
|
||||
|
||||
/* Find the device driver that serves the subnet of the remote address */
|
||||
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
dev = netdev_findby_ipv6addr(lipaddr, ripaddr);
|
||||
#else
|
||||
dev = netdev_findby_ipv6addr(ripaddr);
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
# ifdef CONFIG_NET_MULTILINK
|
||||
# ifdef CONFIG_NETDEV_MULTINIC
|
||||
void netdev_ipv4_txnotify(in_addr_t lipaddr, in_addr_t ripaddr)
|
||||
# else
|
||||
void netdev_ipv4_txnotify(in_addr_t ripaddr)
|
||||
@@ -104,7 +104,7 @@ void netdev_ipv4_txnotify(in_addr_t ripaddr)
|
||||
|
||||
/* Find the device driver that serves the subnet of the remote address */
|
||||
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
dev = netdev_findby_ipv4addr(lipaddr, ripaddr);
|
||||
#else
|
||||
dev = netdev_findby_ipv4addr(ripaddr);
|
||||
@@ -140,7 +140,7 @@ void netdev_ipv4_txnotify(in_addr_t ripaddr)
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
void netdev_ipv6_txnotify(FAR const net_ipv6addr_t lipaddr,
|
||||
FAR const net_ipv6addr_t ripaddr)
|
||||
#else
|
||||
@@ -151,7 +151,7 @@ void netdev_ipv6_txnotify(FAR const net_ipv6addr_t ripaddr)
|
||||
|
||||
/* Find the device driver that serves the subnet of the remote address */
|
||||
|
||||
#ifdef CONFIG_NET_MULTILINK
|
||||
#ifdef CONFIG_NETDEV_MULTINIC
|
||||
dev = netdev_findby_ipv6addr(lipaddr, ripaddr);
|
||||
#else
|
||||
dev = netdev_findby_ipv6addr(ripaddr);
|
||||
|
||||
Reference in New Issue
Block a user