mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
Fix condition logic: The setup seems to support a network without sockets. That is not the case.
Squashed commit of the following:
sched/sched/sched_getsockets.c: Fix an error in conditional compilation.
fs/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
Documentation/: Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
include/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
libs/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
net/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
sched/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
syscall/: Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
tools/: Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
This commit is contained in:
@@ -74,7 +74,6 @@ extern "C"
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
/* List of registered Ethernet device drivers. You must have the network
|
||||
* locked in order to access this list.
|
||||
*
|
||||
@@ -82,7 +81,6 @@ extern "C"
|
||||
*/
|
||||
|
||||
EXTERN struct net_driver_s *g_netdevices;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NETDEV_IFINDEX
|
||||
/* The set of network devices that have been registered. This is used to
|
||||
@@ -155,9 +153,7 @@ bool netdev_verify(FAR struct net_driver_s *dev);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_foreach
|
||||
@@ -178,8 +174,6 @@ FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname);
|
||||
|
||||
int netdev_foreach(netdev_callback_t callback, FAR void *arg);
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_findby_lipv4addr
|
||||
*
|
||||
@@ -265,7 +259,6 @@ FAR struct net_driver_s *netdev_findby_ripv4addr(in_addr_t lipaddr,
|
||||
FAR struct net_driver_s *netdev_findby_ripv6addr(const net_ipv6addr_t lipaddr,
|
||||
const net_ipv6addr_t ripaddr);
|
||||
#endif
|
||||
#endif /* CONFIG_NSOCKET_DESCRIPTORS > 0 */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_findbyindex
|
||||
@@ -368,9 +361,7 @@ unsigned int netdev_nametoindex(FAR const char *ifname);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
FAR struct net_driver_s *netdev_default(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_ipv4_txnotify
|
||||
@@ -388,7 +379,6 @@ FAR struct net_driver_s *netdev_default(void);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
void netdev_ipv4_txnotify(in_addr_t lipaddr, in_addr_t ripaddr);
|
||||
#endif /* CONFIG_NET_IPv4 */
|
||||
@@ -413,7 +403,6 @@ void netdev_ipv4_txnotify(in_addr_t lipaddr, in_addr_t ripaddr);
|
||||
void netdev_ipv6_txnotify(FAR const net_ipv6addr_t lipaddr,
|
||||
FAR const net_ipv6addr_t ripaddr);
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
#endif /* CONFIG_NSOCKET_DESCRIPTORS > 0 */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_txnotify_dev
|
||||
@@ -447,9 +436,7 @@ void netdev_txnotify_dev(FAR struct net_driver_s *dev);
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
int netdev_count(void);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: netdev_ipv4_ifconf
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <stdio.h>
|
||||
@@ -110,4 +109,3 @@ int netdev_carrier_off(FAR struct net_driver_s *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
@@ -77,4 +76,3 @@ int netdev_count(void)
|
||||
return ndev;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <nuttx/net/netdev.h>
|
||||
|
||||
@@ -101,4 +100,3 @@ FAR struct net_driver_s *netdev_default(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET */
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
@@ -345,4 +344,3 @@ FAR struct net_driver_s *netdev_findby_ripv6addr(const net_ipv6addr_t lipaddr,
|
||||
}
|
||||
#endif /* CONFIG_NET_IPv6 */
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -48,8 +48,6 @@
|
||||
#include "utils/utils.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@@ -177,4 +175,3 @@ int netdev_nextindex(int ifindex)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
@@ -89,4 +88,3 @@ FAR struct net_driver_s *netdev_findbyname(FAR const char *ifname)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <debug.h>
|
||||
|
||||
@@ -90,4 +89,3 @@ int netdev_foreach(netdev_callback_t callback, FAR void *arg)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -90,8 +90,6 @@
|
||||
#include "icmpv6/icmpv6.h"
|
||||
#include "route/route.h"
|
||||
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@@ -1810,4 +1808,3 @@ void netdev_ifdown(FAR struct net_driver_s *dev)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -60,8 +60,6 @@
|
||||
#include "mld/mld.h"
|
||||
#include "netdev/netdev.h"
|
||||
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@@ -440,4 +438,3 @@ int netdev_register(FAR struct net_driver_s *dev, enum net_lltype_e lltype)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
@@ -147,4 +146,3 @@ void netdev_txnotify_dev(FAR struct net_driver_s *dev)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <stdio.h>
|
||||
@@ -184,4 +183,3 @@ int netdev_unregister(FAR struct net_driver_s *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */
|
||||
|
||||
Reference in New Issue
Block a user