diff --git a/examples/README.txt b/examples/README.txt index 1352d4455..c743c38a9 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -182,7 +182,7 @@ examples/dhcpd (as well as various other UDP-related configuration settings) CONFIG_NET_BROADCAST=y - UDP broadcast support is needed. - CONFIG_NETUTILS_UIPLIB=y - The UIP library is needed + CONFIG_NETUTILS_NETLIB=y - The UIP library is needed CONFIG_EXAMPLES_DHCPD_NOMAC - (May be defined to use software assigned MAC) CONFIG_EXAMPLES_DHCPD_IPADDR - Target IP address @@ -394,7 +394,7 @@ examples/ftpd The following netutils libraries should be enabled in your defconfig file: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_TELNED=y examples/hello @@ -489,7 +489,7 @@ examples/igmp Network mask * CONFIG_EXAMPLES_IGMP_GRPADDR Multicast group address - * CONFIG_EXAMPLES_UIPLIB + * CONFIG_EXAMPLES_NETLIB The UIP library is needed examples/adc @@ -670,7 +670,7 @@ examples/nettest functionality in a TCP/IP connection. CONFIG_EXAMPLES_NETTEST=y - Enables the nettest example - CONFIG_EXAMPLES_UIPLIB=y - The UIP livrary in needed. + CONFIG_EXAMPLES_NETLIB=y - The UIP livrary in needed. See also examples/tcpecho @@ -713,7 +713,7 @@ examples/nsh And if networking is included: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_DHCPC=y CONFIG_NETUTILS_DNSCLIENT=y CONFIG_NETUTILS_TFTPC=y @@ -1220,7 +1220,7 @@ examples/poll provide the following definition in the defconfig file to enable the UIP library: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y examples/posix_spawn ^^^^^^^^^^^^^^^^^^^^ @@ -1451,7 +1451,7 @@ examples/sendmail Applications using this example will need to enble the following netutils libraries in their defconfig file: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_SMTP=y examples/serialblaster @@ -1552,7 +1552,7 @@ examples/telnetd tiny shell and also supports telnetd. CONFIG_EXAMPLES_TELNETD - Enable the Telnetd example - CONFIG_NETUTILS_UIPLIB, CONFIG_NETUTILS_TELNED - Enable netutils + CONFIG_NETUTILS_NETLIB, CONFIG_NETUTILS_TELNED - Enable netutils libraries needed by the Telnetd example. CONFIG_EXAMPLES_TELNETD_DAEMONPRIO - Priority of the Telnet daemon. Default: SCHED_PRIORITY_DEFAULT @@ -1590,7 +1590,7 @@ examples/thttpd Applications using this example will need to enable the following netutils libraries in the defconfig file: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_THTTPD=y examples/tiff @@ -1668,7 +1668,7 @@ examples/udp Applications using this example will need to enabled the following netutils libraries in the defconfig file: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y examples/uip ^^^^^^^^^^^^ @@ -1707,7 +1707,7 @@ examples/uip Applications using this example will need to enable the following netutils libraries in their defconfig file: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_DHCPC=y CONFIG_NETUTILS_DNSCLIENT=y CONFIG_NETUTILS_WEBSERVER=y @@ -1930,7 +1930,7 @@ examples/wget Applications using this example will need to enable the following netutils libraries in the defconfig file: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_DNSCLIENT=y CONFIG_NETUTILS_WEBCLIENT=y diff --git a/examples/cc3000/shell.c b/examples/cc3000/shell.c index f28d3f0ed..084302b7a 100644 --- a/examples/cc3000/shell.c +++ b/examples/cc3000/shell.c @@ -48,7 +48,7 @@ #include #include -#include +#include #include "shell.h" #include diff --git a/examples/cc3000/telnetd_daemon.c b/examples/cc3000/telnetd_daemon.c index a149f7abe..68bcbfbca 100644 --- a/examples/cc3000/telnetd_daemon.c +++ b/examples/cc3000/telnetd_daemon.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include "telnetd.h" diff --git a/examples/dhcpd/target.c b/examples/dhcpd/target.c index 1434ae287..974970913 100644 --- a/examples/dhcpd/target.c +++ b/examples/dhcpd/target.c @@ -44,7 +44,7 @@ #include #include -#include +#include #include /**************************************************************************** diff --git a/examples/discover/discover_main.c b/examples/discover/discover_main.c index 50f8dccc4..4d90ca96f 100644 --- a/examples/discover/discover_main.c +++ b/examples/discover/discover_main.c @@ -51,7 +51,7 @@ #include #include -#include +#include #include #ifdef CONFIG_EXAMPLES_DISCOVER_DHCPC diff --git a/examples/ftpd/ftpd_main.c b/examples/ftpd/ftpd_main.c index a6f8506f9..69e806ec9 100644 --- a/examples/ftpd/ftpd_main.c +++ b/examples/ftpd/ftpd_main.c @@ -45,7 +45,7 @@ #include -#include +#include #include #include "ftpd.h" diff --git a/examples/igmp/igmp.c b/examples/igmp/igmp.c index cb8feb002..f378f38f0 100644 --- a/examples/igmp/igmp.c +++ b/examples/igmp/igmp.c @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include "igmp.h" diff --git a/examples/nettest/nettest.c b/examples/nettest/nettest.c index 770d282d3..320a87cb2 100644 --- a/examples/nettest/nettest.c +++ b/examples/nettest/nettest.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include "nettest.h" diff --git a/examples/poll/net_listener.c b/examples/poll/net_listener.c index 3ec02704f..a71b03942 100644 --- a/examples/poll/net_listener.c +++ b/examples/poll/net_listener.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include "poll_internal.h" diff --git a/examples/poll/net_reader.c b/examples/poll/net_reader.c index 2f23bab3c..0b0c108d8 100644 --- a/examples/poll/net_reader.c +++ b/examples/poll/net_reader.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include "poll_internal.h" diff --git a/examples/sendmail/target.c b/examples/sendmail/target.c index e9e189da7..ac2fe7313 100644 --- a/examples/sendmail/target.c +++ b/examples/sendmail/target.c @@ -45,7 +45,7 @@ #include #include -#include +#include #include /**************************************************************************** diff --git a/examples/tcpecho/tcpecho_main.c b/examples/tcpecho/tcpecho_main.c index 831f1f483..df8c6983d 100644 --- a/examples/tcpecho/tcpecho_main.c +++ b/examples/tcpecho/tcpecho_main.c @@ -57,7 +57,7 @@ #include #include -#include +#include #ifdef CONFIG_EXAMPLES_TCPECHO_DHCPC # include diff --git a/examples/telnetd/telnetd.c b/examples/telnetd/telnetd.c index 351f466c6..6afabc2dc 100644 --- a/examples/telnetd/telnetd.c +++ b/examples/telnetd/telnetd.c @@ -48,7 +48,7 @@ #include #include -#include +#include #include "telnetd.h" diff --git a/examples/thttpd/thttpd_main.c b/examples/thttpd/thttpd_main.c index da040a218..fbd32bb15 100644 --- a/examples/thttpd/thttpd_main.c +++ b/examples/thttpd/thttpd_main.c @@ -52,7 +52,7 @@ #include #include -#include +#include #include #include diff --git a/examples/udp/target.c b/examples/udp/target.c index 229dc261b..8fd6a4c13 100644 --- a/examples/udp/target.c +++ b/examples/udp/target.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include "udp-internal.h" diff --git a/examples/uip/uip_main.c b/examples/uip/uip_main.c index 03da23df3..ebd67d095 100644 --- a/examples/uip/uip_main.c +++ b/examples/uip/uip_main.c @@ -57,7 +57,7 @@ #include #include -#include +#include #ifdef CONFIG_EXAMPLES_UIP_DHCPC #include diff --git a/examples/wget/Makefile.host b/examples/wget/Makefile.host index 3895835d8..ebd5f54e7 100644 --- a/examples/wget/Makefile.host +++ b/examples/wget/Makefile.host @@ -42,7 +42,7 @@ BIN = wget HOSTCFLAGS += -DCONFIG_WEBCLIENT_HOST=1 HOSTCFLAGS += -I. -include hostdefs.h -VPATH = $(TOPDIR)/netutils/webclient:$(TOPDIR)/netutils/uiplib:. +VPATH = $(TOPDIR)/netutils/webclient:$(TOPDIR)/netutils/netlib:. all: $(BIN) .PHONY: clean context clean_context distclean @@ -56,8 +56,8 @@ apps/netutils: apps/netutils/webclient.h: apps/netutils $(TOPDIR)/include/apps/netutils/webclient.h @cp -a $(TOPDIR)/include/apps/netutils/webclient.h apps/netutils/. -apps/netutils/uiplib.h: apps/netutils $(TOPDIR)/include/apps/netutils/uiplib.h - @cp -a $(TOPDIR)/include/apps/netutils/uiplib.h apps/netutils/. +apps/netutils/netlib.h: apps/netutils $(TOPDIR)/include/apps/netutils/netlib.h + @cp -a $(TOPDIR)/include/apps/netutils/netlib.h apps/netutils/. nuttx: @mkdir nuttx @@ -65,7 +65,7 @@ nuttx: nuttx/config.h: nuttx @touch nuttx/config.h -headers: apps/netutils/webclient.h apps/netutils/uiplib.h nuttx/config.h +headers: apps/netutils/webclient.h apps/netutils/netlib.h nuttx/config.h $(BIN): headers $(OBJS) $(HOSTCC) $(HOSTLDFLAGS) $(OBJS) -o $@ diff --git a/examples/wget/target.c b/examples/wget/target.c index 9c795d1e2..0a59a451d 100644 --- a/examples/wget/target.c +++ b/examples/wget/target.c @@ -48,7 +48,7 @@ #include -#include +#include #include #include diff --git a/examples/wgetjson/wgetjson_main.c b/examples/wgetjson/wgetjson_main.c index 8f82d1fca..ac7062577 100644 --- a/examples/wgetjson/wgetjson_main.c +++ b/examples/wgetjson/wgetjson_main.c @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include diff --git a/examples/xmlrpc/xmlrpc_main.c b/examples/xmlrpc/xmlrpc_main.c index e115bb0ae..8c0fa2bcf 100644 --- a/examples/xmlrpc/xmlrpc_main.c +++ b/examples/xmlrpc/xmlrpc_main.c @@ -66,7 +66,7 @@ #include #include -#include +#include #include #ifdef CONFIG_EXAMPLES_XMLRPC_DHCPC diff --git a/include/netutils/ipmsfilter.h b/include/netutils/ipmsfilter.h index 2dcffa4a1..286db496c 100644 --- a/include/netutils/ipmsfilter.h +++ b/include/netutils/ipmsfilter.h @@ -75,7 +75,7 @@ extern "C" { * * Description: * Add or remove an IP address from a multicast filter set. - * (See netutils/uiplib/uip_ipmsfilter.c) + * (See netutils/netlib/uip_ipmsfilter.c) * * Parameters: * ifname The name of the interface to use, size must less than IMSFNAMSIZ diff --git a/include/netutils/uiplib.h b/include/netutils/netlib.h similarity index 93% rename from include/netutils/uiplib.h rename to include/netutils/netlib.h index a89db4fdd..572731cef 100644 --- a/include/netutils/uiplib.h +++ b/include/netutils/netlib.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/include/netutils/uiplib.h + * apps/include/netutils/netlib.h * Various non-standard APIs to support netutils. All non-standard and * intended only for internal use. * @@ -42,8 +42,8 @@ * ****************************************************************************/ -#ifndef __APPS_INCLUDE_NETUTILS_UIPLIB_H -#define __APPS_INCLUDE_NETUTILS_UIPLIB_H +#ifndef __APPS_INCLUDE_NETUTILS_NETLIB_H +#define __APPS_INCLUDE_NETUTILS_NETLIB_H /**************************************************************************** * Included Files @@ -68,9 +68,9 @@ */ #ifdef CONFIG_NET_UDP -# define UIPLIB_SOCK_IOCTL SOCK_DGRAM +# define NETLIB_SOCK_IOCTL SOCK_DGRAM #else -# define UIPLIB_SOCK_IOCTL SOCK_STREAM +# define NETLIB_SOCK_IOCTL SOCK_STREAM #endif /**************************************************************************** @@ -102,8 +102,8 @@ extern "C" * Return: Non-zero If the IP address was parsed. */ -bool uiplib_ipaddrconv(FAR const char *addrstr, uint8_t *addr); -bool uiplib_hwmacconv(FAR const char *hwstr, uint8_t *hw); +bool netlib_ipaddrconv(FAR const char *addrstr, uint8_t *addr); +bool netlib_hwmacconv(FAR const char *hwstr, uint8_t *hw); /* Get and set IP/MAC addresses (Ethernet L2 only) */ @@ -147,4 +147,4 @@ int uip_ifdown(FAR const char *ifname); } #endif -#endif /* __APPS_INCLUDE_NETUTILS_UIPLIB_H */ +#endif /* __APPS_INCLUDE_NETUTILS_NETLIB_H */ diff --git a/netutils/Kconfig b/netutils/Kconfig index 01fa40dd7..33702e5a2 100644 --- a/netutils/Kconfig +++ b/netutils/Kconfig @@ -16,7 +16,7 @@ source "$APPSDIR/netutils/smtp/Kconfig" source "$APPSDIR/netutils/telnetd/Kconfig" source "$APPSDIR/netutils/tftpc/Kconfig" source "$APPSDIR/netutils/thttpd/Kconfig" -source "$APPSDIR/netutils/uiplib/Kconfig" +source "$APPSDIR/netutils/netlib/Kconfig" source "$APPSDIR/netutils/webclient/Kconfig" source "$APPSDIR/netutils/webserver/Kconfig" source "$APPSDIR/netutils/ntpclient/Kconfig" diff --git a/netutils/Make.defs b/netutils/Make.defs index 11f7d261e..41ed1dff9 100644 --- a/netutils/Make.defs +++ b/netutils/Make.defs @@ -82,8 +82,8 @@ ifeq ($(CONFIG_NETUTILS_THTTPD),y) CONFIGURED_APPS += netutils/thttpd endif -ifeq ($(CONFIG_NETUTILS_UIPLIB),y) -CONFIGURED_APPS += netutils/uiplib +ifeq ($(CONFIG_NETUTILS_NETLIB),y) +CONFIGURED_APPS += netutils/netlib endif ifeq ($(CONFIG_NETUTILS_WEBCLIENT),y) diff --git a/netutils/Makefile b/netutils/Makefile index 8a8a5fdf4..b6244e2f9 100644 --- a/netutils/Makefile +++ b/netutils/Makefile @@ -39,7 +39,7 @@ SUBDIRS = json codecs ifeq ($(CONFIG_NET),y) -SUBDIRS += uiplib dhcpc dhcpd discover dnsclient ftpc ftpd smtp telnetd +SUBDIRS += netlib dhcpc dhcpd discover dnsclient ftpc ftpd smtp telnetd SUBDIRS += webclient webserver tftpc thttpd xmlrpc endif diff --git a/netutils/README.txt b/netutils/README.txt index 83e774638..818f6a784 100644 --- a/netutils/README.txt +++ b/netutils/README.txt @@ -75,7 +75,7 @@ highly influenced by uIP) include: defconfig file to select the appropriate netutils libraries: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_THTTPD=y xmlrpc - The Embeddable Lightweight XML-RPC Server discussed at @@ -92,7 +92,7 @@ Telnetd into your custom applications. To enable and link the Telnetd daemon, you need to include the following in in your defconfig file: - CONFIG_NETUTILS_UIPLIB=y + CONFIG_NETUTILS_NETLIB=y CONFIG_NETUTILS_TELNETD=y Also if the Telnet console is enabled, make sure that you have the following diff --git a/netutils/dhcpc/dhcpc.c b/netutils/dhcpc/dhcpc.c index 5410e6ad9..2033be31d 100644 --- a/netutils/dhcpc/dhcpc.c +++ b/netutils/dhcpc/dhcpc.c @@ -54,7 +54,7 @@ #include #include -#include +#include /**************************************************************************** * Definitions diff --git a/netutils/discover/Kconfig b/netutils/discover/Kconfig index 2e088506f..1ae18a0d3 100644 --- a/netutils/discover/Kconfig +++ b/netutils/discover/Kconfig @@ -7,7 +7,7 @@ config NETUTILS_DISCOVER bool "Network Discovery Utility" default n depends on NET_UDP - select NETUTILS_UIPLIB + select NETUTILS_NETLIB ---help--- Tool for discovering devices on the local network per UDP broadcast. diff --git a/netutils/dnsclient/dns_socket.c b/netutils/dnsclient/dns_socket.c index 002d48674..6b78169ea 100644 --- a/netutils/dnsclient/dns_socket.c +++ b/netutils/dnsclient/dns_socket.c @@ -60,7 +60,7 @@ #include #include -#include +#include /**************************************************************************** * Pre-processor Definitions @@ -515,7 +515,7 @@ int dns_query_sock(int sockfd, FAR const char *hostname, FAR in_addr_t *ipaddr) /* First check if the host is an IP address. */ - if (!uiplib_ipaddrconv(hostname, (uint8_t*)ipaddr)) + if (!netlib_ipaddrconv(hostname, (uint8_t*)ipaddr)) { /* 'host' does not point to a valid address string. Try to resolve * the host name to an IP address. diff --git a/netutils/uiplib/.gitignore b/netutils/netlib/.gitignore similarity index 100% rename from netutils/uiplib/.gitignore rename to netutils/netlib/.gitignore diff --git a/netutils/uiplib/Kconfig b/netutils/netlib/Kconfig similarity index 83% rename from netutils/uiplib/Kconfig rename to netutils/netlib/Kconfig index 2eb098717..fce403198 100644 --- a/netutils/uiplib/Kconfig +++ b/netutils/netlib/Kconfig @@ -3,11 +3,11 @@ # see misc/tools/kconfig-language.txt. # -config NETUTILS_UIPLIB +config NETUTILS_NETLIB bool "Network support library" default n ---help--- Enable support for the network support library. -if NETUTILS_UIPLIB +if NETUTILS_NETLIB endif diff --git a/netutils/uiplib/Makefile b/netutils/netlib/Makefile similarity index 96% rename from netutils/uiplib/Makefile rename to netutils/netlib/Makefile index 76daf985e..01157c1dd 100644 --- a/netutils/uiplib/Makefile +++ b/netutils/netlib/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# apps/netutils/uiplib/Makefile +# apps/netutils/netlib/Makefile # # Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs # UIP Library ASRCS = -CSRCS = uiplib.c uip_sethostaddr.c uip_gethostaddr.c uip_setdraddr.c \ +CSRCS = netlib.c uip_sethostaddr.c uip_gethostaddr.c uip_setdraddr.c \ uip_setnetmask.c uip_parsehttpurl.c uip_setifflag.c \ uip_getifflag.c diff --git a/netutils/uiplib/uiplib.c b/netutils/netlib/netlib.c similarity index 95% rename from netutils/uiplib/uiplib.c rename to netutils/netlib/netlib.c index 4644c61b0..691c94546 100644 --- a/netutils/uiplib/uiplib.c +++ b/netutils/netlib/netlib.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uiplib.c + * netutils/netlib/netlib.c * Various uIP library functions. * * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. @@ -49,14 +49,14 @@ #include #include -#include +#include /**************************************************************************** * Public Functions ****************************************************************************/ -bool uiplib_ipaddrconv(const char *addrstr, uint8_t *ipaddr) +bool netlib_ipaddrconv(const char *addrstr, uint8_t *ipaddr) { unsigned char tmp; char c; @@ -98,7 +98,7 @@ bool uiplib_ipaddrconv(const char *addrstr, uint8_t *ipaddr) return true; } -bool uiplib_hwmacconv(const char *hwstr, uint8_t *hw) +bool netlib_hwmacconv(const char *hwstr, uint8_t *hw) { unsigned char tmp; char c; diff --git a/netutils/uiplib/uip_gethostaddr.c b/netutils/netlib/uip_gethostaddr.c similarity index 96% rename from netutils/uiplib/uip_gethostaddr.c rename to netutils/netlib/uip_gethostaddr.c index 0b2b5dd28..e354ca9de 100644 --- a/netutils/uiplib/uip_gethostaddr.c +++ b/netutils/netlib/uip_gethostaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_gethostaddr.c + * netutils/netlib/uip_gethostaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Pre-processor Definitions @@ -84,7 +84,7 @@ int uip_gethostaddr(const char *ifname, struct in_addr *addr) int ret = ERROR; if (ifname && addr) { - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; diff --git a/netutils/uiplib/uip_getifflag.c b/netutils/netlib/uip_getifflag.c similarity index 96% rename from netutils/uiplib/uip_getifflag.c rename to netutils/netlib/uip_getifflag.c index d8f2717bb..8e82afe03 100644 --- a/netutils/uiplib/uip_getifflag.c +++ b/netutils/netlib/uip_getifflag.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_getifflag.c + * netutils/netlib/uip_getifflag.c * * Copyright (C) 2007-2009, 2011, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -51,7 +51,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions @@ -79,7 +79,7 @@ int uip_getifstatus(FAR const char *ifname, FAR uint8_t *flags) { /* Get a socket (only so that we get access to the INET subsystem) */ - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; diff --git a/netutils/uiplib/uip_getmacaddr.c b/netutils/netlib/uip_getmacaddr.c similarity index 96% rename from netutils/uiplib/uip_getmacaddr.c rename to netutils/netlib/uip_getmacaddr.c index e0f72f4a7..8923f4bb1 100644 --- a/netutils/uiplib/uip_getmacaddr.c +++ b/netutils/netlib/uip_getmacaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_getmacaddr.c + * netutils/netlib/uip_getmacaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions @@ -78,7 +78,7 @@ int uip_getmacaddr(const char *ifname, uint8_t *macaddr) { /* Get a socket (only so that we get access to the INET subsystem) */ - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; diff --git a/netutils/uiplib/uip_ipmsfilter.c b/netutils/netlib/uip_ipmsfilter.c similarity index 96% rename from netutils/uiplib/uip_ipmsfilter.c rename to netutils/netlib/uip_ipmsfilter.c index 8b8b8e77a..1068d0804 100644 --- a/netutils/uiplib/uip_ipmsfilter.c +++ b/netutils/netlib/uip_ipmsfilter.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_setmultiaddr.c + * netutils/netlib/uip_setmultiaddr.c * * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ #include #include -#include +#include #include #ifdef CONFIG_NET_IGMP @@ -90,7 +90,7 @@ int ipmsfilter(FAR const char *ifname, FAR const struct in_addr *multiaddr, { /* Get a socket (only so that we get access to the INET subsystem) */ - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ip_msfilter imsf; diff --git a/netutils/uiplib/uip_listenon.c b/netutils/netlib/uip_listenon.c similarity index 98% rename from netutils/uiplib/uip_listenon.c rename to netutils/netlib/uip_listenon.c index 7b61747fb..cacea174b 100644 --- a/netutils/uiplib/uip_listenon.c +++ b/netutils/netlib/uip_listenon.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_listenon.c + * netutils/netlib/uip_listenon.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -48,7 +48,7 @@ #include #include -#include +#include /**************************************************************************** * Public Functions diff --git a/netutils/uiplib/uip_parsehttpurl.c b/netutils/netlib/uip_parsehttpurl.c similarity index 98% rename from netutils/uiplib/uip_parsehttpurl.c rename to netutils/netlib/uip_parsehttpurl.c index fbb2a9046..efc88956a 100644 --- a/netutils/uiplib/uip_parsehttpurl.c +++ b/netutils/netlib/uip_parsehttpurl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_parsehttpurl.c + * netutils/netlib/uip_parsehttpurl.c * * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -43,7 +43,7 @@ #include #include -#include +#include /**************************************************************************** * Private Data diff --git a/netutils/uiplib/uip_server.c b/netutils/netlib/uip_server.c similarity index 98% rename from netutils/uiplib/uip_server.c rename to netutils/netlib/uip_server.c index b3e1759ab..c6b3d1631 100644 --- a/netutils/uiplib/uip_server.c +++ b/netutils/netlib/uip_server.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_server.c + * netutils/netlib/uip_server.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -51,7 +51,7 @@ #include -#include +#include /**************************************************************************** * Public Functions diff --git a/netutils/uiplib/uip_setdraddr.c b/netutils/netlib/uip_setdraddr.c similarity index 96% rename from netutils/uiplib/uip_setdraddr.c rename to netutils/netlib/uip_setdraddr.c index 5b7a2183e..bdc19d624 100644 --- a/netutils/uiplib/uip_setdraddr.c +++ b/netutils/netlib/uip_setdraddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_setdraddr.c + * netutils/netlib/uip_setdraddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions @@ -80,7 +80,7 @@ int uip_setdraddr(const char *ifname, const struct in_addr *addr) int ret = ERROR; if (ifname && addr) { - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; diff --git a/netutils/uiplib/uip_sethostaddr.c b/netutils/netlib/uip_sethostaddr.c similarity index 96% rename from netutils/uiplib/uip_sethostaddr.c rename to netutils/netlib/uip_sethostaddr.c index 3cc73faed..ada4431f5 100644 --- a/netutils/uiplib/uip_sethostaddr.c +++ b/netutils/netlib/uip_sethostaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_sethostaddr.c + * netutils/netlib/uip_sethostaddr.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions @@ -80,7 +80,7 @@ int uip_sethostaddr(const char *ifname, const struct in_addr *addr) int ret = ERROR; if (ifname && addr) { - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; diff --git a/netutils/uiplib/uip_setifflag.c b/netutils/netlib/uip_setifflag.c similarity index 95% rename from netutils/uiplib/uip_setifflag.c rename to netutils/netlib/uip_setifflag.c index f18ad00e4..c7a6dfb73 100644 --- a/netutils/uiplib/uip_setifflag.c +++ b/netutils/netlib/uip_setifflag.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_setifflag.c + * netutils/netlib/uip_setifflag.c * * Copyright (C) 2007-2009, 2011, 2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions @@ -77,7 +77,7 @@ int uip_ifup(const char *ifname) { /* Get a socket (only so that we get access to the INET subsystem) */ - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; @@ -120,7 +120,7 @@ int uip_ifdown(const char *ifname) { /* Get a socket (only so that we get access to the INET subsystem) */ - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; diff --git a/netutils/uiplib/uip_setmacaddr.c b/netutils/netlib/uip_setmacaddr.c similarity index 96% rename from netutils/uiplib/uip_setmacaddr.c rename to netutils/netlib/uip_setmacaddr.c index 49323d833..d35034a69 100644 --- a/netutils/uiplib/uip_setmacaddr.c +++ b/netutils/netlib/uip_setmacaddr.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_setmacaddr.c + * netutils/netlib/uip_setmacaddr.c * * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Pre-processor Definitions @@ -89,7 +89,7 @@ int uip_setmacaddr(const char *ifname, const uint8_t *macaddr) { /* Get a socket (only so that we get access to the INET subsystem) */ - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; diff --git a/netutils/uiplib/uip_setnetmask.c b/netutils/netlib/uip_setnetmask.c similarity index 96% rename from netutils/uiplib/uip_setnetmask.c rename to netutils/netlib/uip_setnetmask.c index 7ebe83f85..8b3f9651c 100644 --- a/netutils/uiplib/uip_setnetmask.c +++ b/netutils/netlib/uip_setnetmask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * netutils/uiplib/uip_setnetmask.c + * netutils/netlib/uip_setnetmask.c * * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt @@ -49,7 +49,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions @@ -79,7 +79,7 @@ int uip_setnetmask(const char *ifname, const struct in_addr *addr) int ret = ERROR; if (ifname && addr) { - int sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + int sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd >= 0) { struct ifreq req; diff --git a/netutils/telnetd/telnetd_daemon.c b/netutils/telnetd/telnetd_daemon.c index 24c11bef4..663b3021d 100644 --- a/netutils/telnetd/telnetd_daemon.c +++ b/netutils/telnetd/telnetd_daemon.c @@ -54,7 +54,7 @@ #include #include -#include +#include #include "telnetd.h" diff --git a/netutils/telnetd/telnetd_driver.c b/netutils/telnetd/telnetd_driver.c index f189d5613..c5a2e8b9b 100644 --- a/netutils/telnetd/telnetd_driver.c +++ b/netutils/telnetd/telnetd_driver.c @@ -62,7 +62,7 @@ #include #include -#include +#include #include "telnetd.h" diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c index ea1bd0714..41f3ef6f5 100644 --- a/netutils/webclient/webclient.c +++ b/netutils/webclient/webclient.c @@ -72,7 +72,7 @@ #include #include -#include +#include #include #if defined(CONFIG_NETUTILS_CODECS) diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c index ab67842ee..c4ada2f8b 100644 --- a/netutils/webserver/httpd.c +++ b/netutils/webserver/httpd.c @@ -62,7 +62,7 @@ #endif #include -#include +#include #include #include "httpd.h" diff --git a/netutils/xmlrpc/Kconfig b/netutils/xmlrpc/Kconfig index 6765bda07..d24515775 100644 --- a/netutils/xmlrpc/Kconfig +++ b/netutils/xmlrpc/Kconfig @@ -7,7 +7,7 @@ config NETUTILS_XMLRPC bool "XML RPC library" default n depends on NET_TCP - select NETUTILS_UIPLIB + select NETUTILS_NETLIB ---help--- Enables the Embeddable Lightweight XML-RPC Server discussed at http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364 diff --git a/nshlib/nsh_netcmds.c b/nshlib/nsh_netcmds.c index 53efb26e4..b05b547f7 100644 --- a/nshlib/nsh_netcmds.c +++ b/nshlib/nsh_netcmds.c @@ -69,18 +69,18 @@ #if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) && \ !defined(CONFIG_DISABLE_CLOCK) && !defined(CONFIG_DISABLE_SIGNALS) -# include +# include # include #endif #if defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0 -# include +# include # include #endif #if defined(CONFIG_NET_TCP) && CONFIG_NFILE_DESCRIPTORS > 0 # ifndef CONFIG_NSH_DISABLE_WGET -# include +# include # include # endif #endif @@ -364,7 +364,7 @@ int tftpc_parseargs(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv, break; case 'h': - if (!uiplib_ipaddrconv(optarg, (FAR unsigned char*)&args->ipaddr)) + if (!netlib_ipaddrconv(optarg, (FAR unsigned char*)&args->ipaddr)) { nsh_output(vtbl, g_fmtarginvalid, argv[0]); badarg = true; @@ -672,7 +672,7 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { hw = argv[i+1]; i++; - badarg = !uiplib_hwmacconv(hw, mac); + badarg = !netlib_hwmacconv(hw, mac); } else { diff --git a/nshlib/nsh_netinit.c b/nshlib/nsh_netinit.c index 8461df7db..8c09319f8 100644 --- a/nshlib/nsh_netinit.c +++ b/nshlib/nsh_netinit.c @@ -46,7 +46,7 @@ #include -#include +#include #if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS) # include # include diff --git a/nshlib/nsh_routecmds.c b/nshlib/nsh_routecmds.c index 9e6c4fb14..5ca96a5f4 100644 --- a/nshlib/nsh_routecmds.c +++ b/nshlib/nsh_routecmds.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include "nsh.h" #include "nsh_console.h" @@ -108,7 +108,7 @@ int cmd_addroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) /* We need to have a socket (any socket) in order to perform the ioctl */ - sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd < 0) { nsh_output(vtbl, g_fmtcmdfailed, argv[0], "socket", NSH_ERRNO); @@ -236,7 +236,7 @@ int cmd_delroute(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) /* We need to have a socket (any socket) in order to perform the ioctl */ - sockfd = socket(PF_INET, UIPLIB_SOCK_IOCTL, 0); + sockfd = socket(PF_INET, NETLIB_SOCK_IOCTL, 0); if (sockfd < 0) { nsh_output(vtbl, g_fmtcmdfailed, argv[0], "socket", NSH_ERRNO);