From b2f46360decd0577fec683ffd426b84cb1c37326 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 11 Feb 2019 16:23:55 -0600 Subject: [PATCH] apps/: Remove/replace all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0. That value is always greater than zero now. In places just replace with #ifdef CONFIG_NET. --- examples/README.txt | 5 ----- examples/netloop/netloop.h | 3 +-- examples/poll/poll_internal.h | 5 ++--- netutils/README.txt | 2 -- netutils/netlib/netlib_autoconfig.c | 4 ++-- netutils/netlib/netlib_delarp.c | 4 ++-- netutils/netlib/netlib_getarp.c | 4 ++-- netutils/netlib/netlib_getdripv4addr.c | 4 ++-- netutils/netlib/netlib_getessid.c | 4 ++-- netutils/netlib/netlib_getifstatus.c | 4 ++-- netutils/netlib/netlib_getipv4addr.c | 4 ++-- netutils/netlib/netlib_getipv4netmask.c | 5 +++-- netutils/netlib/netlib_getipv6addr.c | 5 +++-- netutils/netlib/netlib_getmacaddr.c | 5 +++-- netutils/netlib/netlib_getnodeaddr.c | 6 +++--- netutils/netlib/netlib_getpanid.c | 6 +++--- netutils/netlib/netlib_getproperties.c | 6 +++--- netutils/netlib/netlib_nodeaddrconv.c | 5 ++--- netutils/netlib/netlib_setarp.c | 4 ++-- netutils/netlib/netlib_setdripv4addr.c | 5 +++-- netutils/netlib/netlib_setdripv6addr.c | 5 +++-- netutils/netlib/netlib_seteaddr.c | 6 +++--- netutils/netlib/netlib_setessid.c | 5 +++-- netutils/netlib/netlib_setifstatus.c | 5 +++-- netutils/netlib/netlib_setipv4addr.c | 5 +++-- netutils/netlib/netlib_setipv4netmask.c | 5 +++-- netutils/netlib/netlib_setipv6addr.c | 5 +++-- netutils/netlib/netlib_setipv6netmask.c | 5 +++-- netutils/netlib/netlib_setmacaddr.c | 5 +++-- netutils/netlib/netlib_setnodeaddr.c | 6 +++--- netutils/tftpc/tftpc_put.c | 2 +- nshlib/README.txt | 6 ------ 32 files changed, 73 insertions(+), 77 deletions(-) diff --git a/examples/README.txt b/examples/README.txt index 425f729eb..79a49d4d2 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -247,8 +247,6 @@ examples/dhcpd NuttX configuration settings: CONFIG_NET=y - Of course - CONFIG_NSOCKET_DESCRIPTORS - And, of course, you must allocate some - socket descriptors. CONFIG_NET_UDP=y - UDP support is required for DHCP (as well as various other UDP-related configuration settings) @@ -1261,7 +1259,6 @@ examples/poll CONFIG_NET - Defined for general network support CONFIG_NET_TCP - Defined for TCP/IP support - CONFIG_NSOCKET_DESCRIPTORS - Defined to be greater than 0 CONFIG_NET_TCP_READAHEAD - Defined CONFIG_NET_NTCP_READAHEAD_BUFFERS - Defined to be greater than zero @@ -2031,8 +2028,6 @@ examples/webserver required. These include: CONFIG_NET=y - Of course - CONFIG_NSOCKET_DESCRIPTORS - And, of course, you must allocate some - socket descriptors. CONFIG_NET_UDP=y - UDP support is required for DHCP (as well as various other UDP-related configuration settings). diff --git a/examples/netloop/netloop.h b/examples/netloop/netloop.h index cc67a8489..3e323585e 100644 --- a/examples/netloop/netloop.h +++ b/examples/netloop/netloop.h @@ -58,14 +58,13 @@ * poll/select support. This kind of looks like overkill. * * CONFIG_NET - Network support must be enabled - * CONFIG_NSOCKET_DESCRIPTORS - Socket descriptors must be allocated * CONFIG_NET_TCP - Only support on TCP (because read-ahead * buffering s not yet support for UDP) * CONFIG_NET_TCP_READAHEAD - TCP/IP read-ahead buffering must be enabled */ -#if !defined(CONFIG_NET) || CONFIG_NSOCKET_DESCRIPTORS <= 0 +#ifndef CONFIG_NET # error Network socket support not enabled #endif diff --git a/examples/poll/poll_internal.h b/examples/poll/poll_internal.h index 198f8ae44..3b1a7098f 100644 --- a/examples/poll/poll_internal.h +++ b/examples/poll/poll_internal.h @@ -58,14 +58,13 @@ * poll/select support. This kind of looks like overkill. * * CONFIG_NET - Network support must be enabled - * CONFIG_NSOCKET_DESCRIPTORS - Socket descriptors must be allocated * CONFIG_NET_TCP - Only support on TCP (because read-ahead * buffering s not yet support for UDP) * CONFIG_NET_TCP_READAHEAD - TCP/IP read-ahead buffering must be enabled */ -#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 && \ - defined(CONFIG_NET_TCP) && defined(CONFIG_NET_TCP_READAHEAD) +#if defined(CONFIG_NET) && defined(CONFIG_NET_TCP) && \ + defined(CONFIG_NET_TCP_READAHEAD) # define HAVE_NETPOLL 1 #else # undef HAVE_NETPOLL diff --git a/netutils/README.txt b/netutils/README.txt index ef4127398..650cfb708 100644 --- a/netutils/README.txt +++ b/netutils/README.txt @@ -126,8 +126,6 @@ If you use DHCPC/D, then some special configuration network options are required. These include: CONFIG_NET=y Of course - CONFIG_NSOCKET_DESCRIPTORS And, of course, you must allocate some - socket descriptors. CONFIG_NET_UDP=y UDP support is required for DHCP (as well as various other UDP-related configuration settings). diff --git a/netutils/netlib/netlib_autoconfig.c b/netutils/netlib/netlib_autoconfig.c index faed29c0e..e40423e5c 100644 --- a/netutils/netlib/netlib_autoconfig.c +++ b/netutils/netlib/netlib_autoconfig.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_ICMPv6_AUTOCONF) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_ICMPv6_AUTOCONF #include #include @@ -105,4 +105,4 @@ int netlib_icmpv6_autoconfiguration(FAR const char *ifname) return ret; } -#endif /* CONFIG_NET_ICMPv6_AUTOCONF && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_ICMPv6_AUTOCONF */ diff --git a/netutils/netlib/netlib_delarp.c b/netutils/netlib/netlib_delarp.c index 4931d81d0..a72e7bef0 100644 --- a/netutils/netlib/netlib_delarp.c +++ b/netutils/netlib/netlib_delarp.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_ARP) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_ARP #include #include @@ -100,4 +100,4 @@ int netlib_del_arpmapping(FAR const struct sockaddr_in *inaddr) return ret; } -#endif /* CONFIG_NET_ARP && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_ARP */ diff --git a/netutils/netlib/netlib_getarp.c b/netutils/netlib/netlib_getarp.c index 38fb32a4b..85c9d479b 100644 --- a/netutils/netlib/netlib_getarp.c +++ b/netutils/netlib/netlib_getarp.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_ARP) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_ARP #include #include @@ -107,4 +107,4 @@ int netlib_get_arpmapping(FAR const struct sockaddr_in *inaddr, return ret; } -#endif /* CONFIG_NET_ARP && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_ARP */ diff --git a/netutils/netlib/netlib_getdripv4addr.c b/netutils/netlib/netlib_getdripv4addr.c index 5df23dc98..5586e4270 100644 --- a/netutils/netlib/netlib_getdripv4addr.c +++ b/netutils/netlib/netlib_getdripv4addr.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv4) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv4 #include #include @@ -102,4 +102,4 @@ int netlib_get_dripv4addr(FAR const char *ifname, FAR struct in_addr *addr) return ret; } -#endif /* CONFIG_NET_IPv4 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv4 */ diff --git a/netutils/netlib/netlib_getessid.c b/netutils/netlib/netlib_getessid.c index c5af7b045..0d2dc820a 100644 --- a/netutils/netlib/netlib_getessid.c +++ b/netutils/netlib/netlib_getessid.c @@ -53,7 +53,7 @@ #include "netutils/netlib.h" -#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET /**************************************************************************** * Pre-processor Definitions @@ -131,4 +131,4 @@ int netlib_getessid(FAR const char *ifname, FAR char *essid, size_t idlen) return ret; } -#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET */ diff --git a/netutils/netlib/netlib_getifstatus.c b/netutils/netlib/netlib_getifstatus.c index 3fcb3b7dc..7dcfa3e71 100644 --- a/netutils/netlib/netlib_getifstatus.c +++ b/netutils/netlib/netlib_getifstatus.c @@ -53,7 +53,7 @@ #include "netutils/netlib.h" -#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET /**************************************************************************** * Pre-processor Definitions @@ -129,4 +129,4 @@ int netlib_getifstatus(FAR const char *ifname, FAR uint8_t *flags) return ret; } -#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET */ diff --git a/netutils/netlib/netlib_getipv4addr.c b/netutils/netlib/netlib_getipv4addr.c index 2a78e8634..4940a7c27 100644 --- a/netutils/netlib/netlib_getipv4addr.c +++ b/netutils/netlib/netlib_getipv4addr.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv4) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv4 #include #include @@ -102,4 +102,4 @@ int netlib_get_ipv4addr(FAR const char *ifname, FAR struct in_addr *addr) return ret; } -#endif /* CONFIG_NET_IPv4 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv4 */ diff --git a/netutils/netlib/netlib_getipv4netmask.c b/netutils/netlib/netlib_getipv4netmask.c index 1c1252919..4fae61054 100644 --- a/netutils/netlib/netlib_getipv4netmask.c +++ b/netutils/netlib/netlib_getipv4netmask.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv4) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv4 #include #include @@ -102,4 +102,5 @@ int netlib_get_ipv4netmask(FAR const char *ifname, FAR struct in_addr *addr) return ret; } -#endif /* CONFIG_NET_IPv4 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv4 */ + diff --git a/netutils/netlib/netlib_getipv6addr.c b/netutils/netlib/netlib_getipv6addr.c index 81de2cb7a..527ab3e39 100644 --- a/netutils/netlib/netlib_getipv6addr.c +++ b/netutils/netlib/netlib_getipv6addr.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv6) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv6 #include #include @@ -103,4 +103,5 @@ int netlib_get_ipv6addr(FAR const char *ifname, FAR struct in6_addr *addr) return ret; } -#endif /* CONFIG_NET_IPv6 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv6 */ + diff --git a/netutils/netlib/netlib_getmacaddr.c b/netutils/netlib/netlib_getmacaddr.c index 0d99296dc..b3296125a 100644 --- a/netutils/netlib/netlib_getmacaddr.c +++ b/netutils/netlib/netlib_getmacaddr.c @@ -52,7 +52,7 @@ #include "netutils/netlib.h" -#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET /**************************************************************************** * Pre-processor Definitions @@ -127,4 +127,5 @@ int netlib_getmacaddr(const char *ifname, uint8_t *macaddr) return ret; } -#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET */ + diff --git a/netutils/netlib/netlib_getnodeaddr.c b/netutils/netlib/netlib_getnodeaddr.c index e70f9ad23..464235039 100644 --- a/netutils/netlib/netlib_getnodeaddr.c +++ b/netutils/netlib/netlib_getnodeaddr.c @@ -50,8 +50,7 @@ #include "nuttx/wireless/pktradio.h" #include "netutils/netlib.h" -#if (defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154)) && \ - CONFIG_NSOCKET_DESCRIPTORS > 0 +#if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154) /**************************************************************************** * Public Functions @@ -109,4 +108,5 @@ int netlib_getnodnodeaddr(FAR const char *ifname, return ret; } -#endif /* (CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154) && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154 */ + diff --git a/netutils/netlib/netlib_getpanid.c b/netutils/netlib/netlib_getpanid.c index 218fb69e3..13ee7ff18 100644 --- a/netutils/netlib/netlib_getpanid.c +++ b/netutils/netlib/netlib_getpanid.c @@ -52,8 +52,7 @@ #include "netutils/netlib.h" -#if (defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154)) && \ - CONFIG_NSOCKET_DESCRIPTORS > 0 +#if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154) /**************************************************************************** * Public Functions @@ -108,4 +107,5 @@ int netlib_getpanid(FAR const char *ifname, FAR uint8_t *panid) return ret; } -#endif /* (CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154) && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154 */ + diff --git a/netutils/netlib/netlib_getproperties.c b/netutils/netlib/netlib_getproperties.c index a86934421..a28e8a6d4 100644 --- a/netutils/netlib/netlib_getproperties.c +++ b/netutils/netlib/netlib_getproperties.c @@ -50,8 +50,7 @@ #include "nuttx/wireless/pktradio.h" #include "netutils/netlib.h" -#if (defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154)) && \ - CONFIG_NSOCKET_DESCRIPTORS > 0 +#if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154) /**************************************************************************** * Public Functions @@ -109,4 +108,5 @@ int netlib_getproperties(FAR const char *ifname, return ret; } -#endif /* (CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154) && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154 */ + diff --git a/netutils/netlib/netlib_nodeaddrconv.c b/netutils/netlib/netlib_nodeaddrconv.c index 7356e144d..11ad0d841 100644 --- a/netutils/netlib/netlib_nodeaddrconv.c +++ b/netutils/netlib/netlib_nodeaddrconv.c @@ -52,8 +52,7 @@ #include "nuttx/wireless/pktradio.h" #include "netutils/netlib.h" -#if (defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154)) && \ - CONFIG_NSOCKET_DESCRIPTORS > 0 +#if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154) /**************************************************************************** * Private Functions @@ -190,5 +189,5 @@ bool netlib_nodeaddrconv(FAR const char *addrstr, return false; } -#endif /* (CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154) && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154 */ diff --git a/netutils/netlib/netlib_setarp.c b/netutils/netlib/netlib_setarp.c index 25c2f4e62..ce19c7dda 100644 --- a/netutils/netlib/netlib_setarp.c +++ b/netutils/netlib/netlib_setarp.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_ARP) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_ARP #include #include @@ -105,4 +105,4 @@ int netlib_set_arpmapping(FAR const struct sockaddr_in *inaddr, return ret; } -#endif /* CONFIG_NET_ARP && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_ARP */ diff --git a/netutils/netlib/netlib_setdripv4addr.c b/netutils/netlib/netlib_setdripv4addr.c index 7a971e071..9787d9a08 100644 --- a/netutils/netlib/netlib_setdripv4addr.c +++ b/netutils/netlib/netlib_setdripv4addr.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv4) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv4 #include #include @@ -142,4 +142,5 @@ int netlib_set_dripv4addr(FAR const char *ifname, return ret; } -#endif /* CONFIG_NET_IPv4 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv4 */ + diff --git a/netutils/netlib/netlib_setdripv6addr.c b/netutils/netlib/netlib_setdripv6addr.c index 0bb12eeef..9d3f1301f 100644 --- a/netutils/netlib/netlib_setdripv6addr.c +++ b/netutils/netlib/netlib_setdripv6addr.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv6) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv6 #include #include @@ -103,4 +103,5 @@ int netlib_set_dripv6addr(FAR const char *ifname, return ret; } -#endif /* CONFIG_NET_IPv6 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv6 */ + diff --git a/netutils/netlib/netlib_seteaddr.c b/netutils/netlib/netlib_seteaddr.c index 11e6c8881..fe6c0ac35 100644 --- a/netutils/netlib/netlib_seteaddr.c +++ b/netutils/netlib/netlib_seteaddr.c @@ -52,8 +52,7 @@ #include "netutils/netlib.h" -#if (defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154)) && \ - CONFIG_NSOCKET_DESCRIPTORS > 0 +#if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154) /**************************************************************************** * Public Functions @@ -108,4 +107,5 @@ int netlib_seteaddr(FAR const char *ifname, FAR const uint8_t *eaddr) return ret; } -#endif /* (CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154) && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154 */ + diff --git a/netutils/netlib/netlib_setessid.c b/netutils/netlib/netlib_setessid.c index aa664b9d4..a2d2c739e 100644 --- a/netutils/netlib/netlib_setessid.c +++ b/netutils/netlib/netlib_setessid.c @@ -53,7 +53,7 @@ #include "netutils/netlib.h" -#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET /**************************************************************************** * Pre-processor Definitions @@ -131,4 +131,5 @@ int netlib_setessid(FAR const char *ifname, FAR const char *essid) return ret; } -#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET */ + diff --git a/netutils/netlib/netlib_setifstatus.c b/netutils/netlib/netlib_setifstatus.c index 2a8ad4073..437adbe2c 100644 --- a/netutils/netlib/netlib_setifstatus.c +++ b/netutils/netlib/netlib_setifstatus.c @@ -52,7 +52,7 @@ #include "netutils/netlib.h" -#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET /**************************************************************************** * Pre-processor Definitions @@ -167,4 +167,5 @@ int netlib_ifdown(const char *ifname) return ret; } -#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET */ + diff --git a/netutils/netlib/netlib_setipv4addr.c b/netutils/netlib/netlib_setipv4addr.c index 6e23bfb1e..31114262a 100644 --- a/netutils/netlib/netlib_setipv4addr.c +++ b/netutils/netlib/netlib_setipv4addr.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv4) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv4 #include #include @@ -102,4 +102,5 @@ int netlib_set_ipv4addr(FAR const char *ifname, FAR const struct in_addr *addr) return ret; } -#endif /* CONFIG_NET_IPv4 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv4 */ + diff --git a/netutils/netlib/netlib_setipv4netmask.c b/netutils/netlib/netlib_setipv4netmask.c index 5f74737e9..da4f99e32 100644 --- a/netutils/netlib/netlib_setipv4netmask.c +++ b/netutils/netlib/netlib_setipv4netmask.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv4) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv4 #include #include @@ -102,4 +102,5 @@ int netlib_set_ipv4netmask(FAR const char *ifname, return ret; } -#endif /* CONFIG_NET_IPv4 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv4 */ + diff --git a/netutils/netlib/netlib_setipv6addr.c b/netutils/netlib/netlib_setipv6addr.c index 182c728aa..e1fb9ec84 100644 --- a/netutils/netlib/netlib_setipv6addr.c +++ b/netutils/netlib/netlib_setipv6addr.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv6) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv6 #include #include @@ -103,4 +103,5 @@ int netlib_set_ipv6addr(FAR const char *ifname, return ret; } -#endif /* CONFIG_NET_IPv6 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv6 */ + diff --git a/netutils/netlib/netlib_setipv6netmask.c b/netutils/netlib/netlib_setipv6netmask.c index f097a9999..b07655e38 100644 --- a/netutils/netlib/netlib_setipv6netmask.c +++ b/netutils/netlib/netlib_setipv6netmask.c @@ -38,7 +38,7 @@ ****************************************************************************/ #include -#if defined(CONFIG_NET_IPv6) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET_IPv6 #include #include @@ -102,4 +102,5 @@ int netlib_set_ipv6netmask(FAR const char *ifname, return ret; } -#endif /* CONFIG_NET_IPv6 && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_IPv6 */ + diff --git a/netutils/netlib/netlib_setmacaddr.c b/netutils/netlib/netlib_setmacaddr.c index 51cab6385..dfec8fea9 100644 --- a/netutils/netlib/netlib_setmacaddr.c +++ b/netutils/netlib/netlib_setmacaddr.c @@ -52,7 +52,7 @@ #include "netutils/netlib.h" -#if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 +#ifdef CONFIG_NET /**************************************************************************** * Pre-processor Definitions @@ -133,4 +133,5 @@ int netlib_setmacaddr(const char *ifname, const uint8_t *macaddr) return ret; } -#endif /* CONFIG_NET && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET */ + diff --git a/netutils/netlib/netlib_setnodeaddr.c b/netutils/netlib/netlib_setnodeaddr.c index ca316b07b..0a8505114 100644 --- a/netutils/netlib/netlib_setnodeaddr.c +++ b/netutils/netlib/netlib_setnodeaddr.c @@ -50,8 +50,7 @@ #include "nuttx/wireless/pktradio.h" #include "netutils/netlib.h" -#if (defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154)) && \ - CONFIG_NSOCKET_DESCRIPTORS > 0 +#if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154) /**************************************************************************** * Public Functions @@ -105,4 +104,5 @@ int netlib_setnodeaddr(FAR const char *ifname, return ret; } -#endif /* (CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154) && CONFIG_NSOCKET_DESCRIPTORS */ +#endif /* CONFIG_NET_6LOWPAN || CONFIG_NET_IEEE802154 */ + diff --git a/netutils/tftpc/tftpc_put.c b/netutils/tftpc/tftpc_put.c index 890224646..e321a516f 100644 --- a/netutils/tftpc/tftpc_put.c +++ b/netutils/tftpc/tftpc_put.c @@ -512,7 +512,7 @@ int tftpput(FAR const char *local, FAR const char *remote, in_addr_t addr, goto errout; } - result = tftpput_cb(remote, addr, binary, tftp_read, (void *)fd); + result = tftpput_cb(remote, addr, binary, tftp_read, (FAR void *)fd); close(fd); diff --git a/nshlib/README.txt b/nshlib/README.txt index 833c33019..d049cf9bd 100644 --- a/nshlib/README.txt +++ b/nshlib/README.txt @@ -1828,9 +1828,6 @@ NSH-Specific Configuration Settings * CONFIG_NET=y Of course, networking must be enabled - * CONFIG_NSOCKET_DESCRIPTORS - And, of course, you must allocate some socket descriptors. - * CONFIG_NET_TCP=y TCP/IP support is required for telnet (as well as various other TCP-related configuration settings). @@ -1862,9 +1859,6 @@ NSH-Specific Configuration Settings * CONFIG_NET=y Of course, networking must be enabled - * CONFIG_NSOCKET_DESCRIPTORS - And, of course, you must allocate some socket descriptors. - * CONFIG_NET_UDP=y UDP support is required for DHCP (as well as various other UDP-related configuration settings)