From 32046718f419fa598d016b1c59b8a78a4167f145 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 19 Mar 2011 16:54:35 +0000 Subject: [PATCH] Move netutils header files from include/net/uip to include/apps/netutils git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3399 42af7a65-404d-4744-a932-0658087f49c3 --- examples/dhcpd/target.c | 7 ++++--- examples/igmp/igmp.c | 6 +++--- examples/nettest/nettest.c | 4 ++-- examples/poll/net_listener.c | 4 ++-- examples/poll/net_reader.c | 4 ++-- examples/sendmail/host.c | 4 ++-- examples/sendmail/target.c | 6 +++--- examples/thttpd/main.c | 7 ++++--- examples/udp/target.c | 6 +++--- examples/uip/main.c | 12 +++++++----- examples/wget/Makefile.host | 14 +++++++------- examples/wget/host.c | 3 ++- examples/wget/target.c | 9 +++++---- include/{net/uip => apps/netutils}/dhcpc.h | 10 +++++----- include/{net/uip => apps/netutils}/dhcpd.h | 10 +++++----- include/{net/uip => apps/netutils}/httpd.h | 10 +++++----- include/{net/uip => apps/netutils}/ipmsfilter.h | 10 +++++----- include/{net/uip => apps/netutils}/resolv.h | 8 ++++---- include/{net/uip => apps/netutils}/smtp.h | 10 +++++----- include/{net/uip => apps/netutils}/telnetd.h | 10 +++++----- include/{net/uip => apps/netutils}/tftp.h | 10 +++++----- include/{net/uip => apps/netutils}/thttpd.h | 10 +++++----- .../{net/uip/uip-lib.h => apps/netutils/uiplib.h} | 8 ++++---- include/{net/uip => apps/netutils}/webclient.h | 10 +++++----- netutils/dhcpc/dhcpc.c | 6 +++--- netutils/dhcpd/dhcpd.c | 12 ++++++------ netutils/resolv/resolv.c | 2 +- netutils/smtp/smtp.c | 6 +++--- netutils/telnetd/telnetd.c | 6 +++--- netutils/tftpc/tftpc_get.c | 4 ++-- netutils/tftpc/tftpc_packets.c | 4 ++-- netutils/tftpc/tftpc_put.c | 4 ++-- netutils/thttpd/libhttpd.c | 4 ++-- netutils/thttpd/thttpd.c | 4 ++-- netutils/thttpd/thttpd_cgi.c | 4 ++-- netutils/uiplib/uip_gethostaddr.c | 4 ++-- netutils/uiplib/uip_getmacaddr.c | 4 ++-- netutils/uiplib/uip_ipmsfilter.c | 6 +++--- netutils/uiplib/uip_parsehttpurl.c | 6 ++++-- netutils/uiplib/uip_server.c | 4 ++-- netutils/uiplib/uip_setdraddr.c | 4 ++-- netutils/uiplib/uip_sethostaddr.c | 4 ++-- netutils/uiplib/uip_setmacaddr.c | 4 ++-- netutils/uiplib/uip_setnetmask.c | 4 ++-- netutils/uiplib/uiplib.c | 9 +++++++-- netutils/webclient/webclient.c | 8 ++++---- netutils/webserver/httpd.c | 6 +++--- netutils/webserver/httpd_cgi.c | 2 +- netutils/webserver/httpd_cgi.h | 2 +- netutils/webserver/httpd_fs.c | 4 ++-- 50 files changed, 166 insertions(+), 153 deletions(-) rename include/{net/uip => apps/netutils}/dhcpc.h (94%) rename include/{net/uip => apps/netutils}/dhcpd.h (93%) rename include/{net/uip => apps/netutils}/httpd.h (91%) rename include/{net/uip => apps/netutils}/ipmsfilter.h (94%) rename include/{net/uip => apps/netutils}/resolv.h (93%) rename include/{net/uip => apps/netutils}/smtp.h (93%) rename include/{net/uip => apps/netutils}/telnetd.h (92%) rename include/{net/uip => apps/netutils}/tftp.h (93%) rename include/{net/uip => apps/netutils}/thttpd.h (95%) rename include/{net/uip/uip-lib.h => apps/netutils/uiplib.h} (97%) rename include/{net/uip => apps/netutils}/webclient.h (96%) diff --git a/examples/dhcpd/target.c b/examples/dhcpd/target.c index fd05797465..1878c2bc86 100644 --- a/examples/dhcpd/target.c +++ b/examples/dhcpd/target.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/dhcpd/target.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,8 +43,9 @@ #include #include #include -#include -#include + +#include +#include /**************************************************************************** * Preprocessor Definitions diff --git a/examples/igmp/igmp.c b/examples/igmp/igmp.c index 8bca7fa4e9..734a7e599a 100755 --- a/examples/igmp/igmp.c +++ b/examples/igmp/igmp.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/igmp/igmp.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -46,8 +46,8 @@ #include #include -#include -#include +#include +#include #include "igmp.h" diff --git a/examples/nettest/nettest.c b/examples/nettest/nettest.c index a59bccf583..c7492fff6c 100644 --- a/examples/nettest/nettest.c +++ b/examples/nettest/nettest.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/nettest/nettest.c * - * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -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 12621de9a9..4d425c608f 100644 --- a/examples/poll/net_listener.c +++ b/examples/poll/net_listener.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/poll/net_listener.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -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 1ea8dbe547..b0cf94316b 100644 --- a/examples/poll/net_reader.c +++ b/examples/poll/net_reader.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/poll/net_reader.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -54,7 +54,7 @@ #include #include -#include +#include #include "poll_internal.h" diff --git a/examples/sendmail/host.c b/examples/sendmail/host.c index ecae2b6a10..67a541b0c0 100644 --- a/examples/sendmail/host.c +++ b/examples/sendmail/host.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/sendmail/host.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ #include #include -#include +#include /**************************************************************************** * Private Data diff --git a/examples/sendmail/target.c b/examples/sendmail/target.c index a68db0b26b..d8643106bd 100644 --- a/examples/sendmail/target.c +++ b/examples/sendmail/target.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/sendmail/target.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009. 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -45,8 +45,8 @@ #include #include -#include -#include +#include +#include /**************************************************************************** * Pre-processor Defintitions diff --git a/examples/thttpd/main.c b/examples/thttpd/main.c index f9d0ee0558..e2fdda4f4c 100644 --- a/examples/thttpd/main.c +++ b/examples/thttpd/main.c @@ -49,11 +49,12 @@ #include #include -#include -#include -#include #include +#include +#include +#include + #include #include #include diff --git a/examples/udp/target.c b/examples/udp/target.c index 929c348835..5e31fdb369 100644 --- a/examples/udp/target.c +++ b/examples/udp/target.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/udp/nettest.c * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -14,7 +14,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -42,7 +42,7 @@ #include #include -#include +#include #include "udp-internal.h" diff --git a/examples/uip/main.c b/examples/uip/main.c index 226e75c694..21a01998b8 100644 --- a/examples/uip/main.c +++ b/examples/uip/main.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/uip/main.c * - * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on uIP which also has a BSD style license: @@ -56,7 +56,9 @@ #include #include #include -#include + +#include + #ifdef CONFIG_EXAMPLE_UIP_DHCPC #include #endif @@ -68,13 +70,13 @@ /* DHCPC may be used in conjunction with any other feature (or not) */ #ifdef CONFIG_EXAMPLE_UIP_DHCPC -# include -# include +# include +# include #endif /* Include uIP webserver definitions */ -#include +#include /**************************************************************************** * Definitions diff --git a/examples/wget/Makefile.host b/examples/wget/Makefile.host index e99f125037..73a1c7ce68 100644 --- a/examples/wget/Makefile.host +++ b/examples/wget/Makefile.host @@ -50,14 +50,14 @@ all: $(BIN) $(OBJS): %.o1: %.c $(HOSTCC) -c $(HOSTCFLAGS) $< -o $@ -net/uip: - @mkdir -p net/uip +apps/netutils: + @mkdir -p apps/netutils -net/uip/webclient.h: net/uip $(TOPDIR)/include/net/uip/webclient.h - @cp -a $(TOPDIR)/include/net/uip/webclient.h net/uip/. +apps/netutils/webclient.h: apps/netutils $(TOPDIR)/include/apps/netutils/webclient.h + @cp -a $(TOPDIR)/include/apps/netutils/webclient.h apps/netutils/. -net/uip/uip-lib.h: net/uip $(TOPDIR)/include/net/uip/uip-lib.h - @cp -a $(TOPDIR)/include/net/uip/uip-lib.h net/uip/. +apps/netutils/uiplib.h: apps/netutils $(TOPDIR)/include/apps/netutils/uiplib.h + @cp -a $(TOPDIR)/include/apps/netutils/uiplib.h apps/netutils/. nuttx: @mkdir nuttx @@ -65,7 +65,7 @@ nuttx: nuttx/config.h: nuttx @touch nuttx/config.h -headers: net/uip/webclient.h net/uip/uip-lib.h nuttx/config.h +headers: apps/netutils/webclient.h apps/netutils/uiplib.h nuttx/config.h $(BIN): headers $(OBJS) $(HOSTCC) $(HOSTLDFLAGS) $(OBJS) -o $@ diff --git a/examples/wget/host.c b/examples/wget/host.c index fe81090514..a7b416db5a 100644 --- a/examples/wget/host.c +++ b/examples/wget/host.c @@ -37,13 +37,14 @@ * Included Files ****************************************************************************/ -#include #include #include #include #include #include +#include + /**************************************************************************** * Private Data ****************************************************************************/ diff --git a/examples/wget/target.c b/examples/wget/target.c index c135a1d575..b378e99446 100644 --- a/examples/wget/target.c +++ b/examples/wget/target.c @@ -1,7 +1,7 @@ /**************************************************************************** * examples/wget/target.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -47,9 +47,10 @@ #include #include -#include -#include -#include + +#include +#include +#include /**************************************************************************** * Preprocessor Definitions diff --git a/include/net/uip/dhcpc.h b/include/apps/netutils/dhcpc.h similarity index 94% rename from include/net/uip/dhcpc.h rename to include/apps/netutils/dhcpc.h index 3d2fe41097..994a6713ee 100644 --- a/include/net/uip/dhcpc.h +++ b/include/apps/netutils/dhcpc.h @@ -1,7 +1,7 @@ /**************************************************************************** - * net/uip/dhcpc.n + * apps/netutils/dhcpc.n * - * Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * This logic was leveraged from uIP which also has a BSD-style license: @@ -35,8 +35,8 @@ * SUCH DAMAGE. */ -#ifndef __NET_UIP_DHCPC_H -#define __NET_UIP_DHCPC_H +#ifndef __APPS_NETUTILS_DHCPC_H +#define __APPS_NETUTILS_DHCPC_H /**************************************************************************** * Included Files @@ -82,4 +82,4 @@ EXTERN void dhcpc_close(void *handle); } #endif -#endif /* __NET_UIP_DHCPC_H */ +#endif /* __APPS_NETUTILS_DHCPC_H */ diff --git a/include/net/uip/dhcpd.h b/include/apps/netutils/dhcpd.h similarity index 93% rename from include/net/uip/dhcpd.h rename to include/apps/netutils/dhcpd.h index f9aea86f3a..b03415b206 100644 --- a/include/net/uip/dhcpd.h +++ b/include/apps/netutils/dhcpd.h @@ -1,7 +1,7 @@ /**************************************************************************** - * net/uipt/dhcpd.h + * apps/netutils/dhcpd.h * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * This logic was leveraged from uIP which also has a BSD-style license: @@ -35,8 +35,8 @@ * SUCH DAMAGE. */ -#ifndef __NET_UIP_DHCPD_H -#define __NET_UIP_DHCPD_H +#ifndef __APPS_NETUTILS_DHCPD_H +#define __APPS_NETUTILS_DHCPD_H /**************************************************************************** * Included Files @@ -68,4 +68,4 @@ EXTERN int dhcpd_run(void); } #endif -#endif /* __NET_UIP_DHCPD_H */ +#endif /* __APPS_NETUTILS_DHCPD_H */ diff --git a/include/net/uip/httpd.h b/include/apps/netutils/httpd.h similarity index 91% rename from include/net/uip/httpd.h rename to include/apps/netutils/httpd.h index cd850e51d2..12f2a15111 100644 --- a/include/net/uip/httpd.h +++ b/include/apps/netutils/httpd.h @@ -1,7 +1,7 @@ /**************************************************************************** - * net/uip/httpd.h + * apps/netutils/httpd.h * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on uIP which also has a BSD style license: @@ -37,8 +37,8 @@ * ****************************************************************************/ -#ifndef _NET_UIP_HTTPD_H -#define _NET_UIP_HTTPD_H +#ifndef __APPS_NETUTILS_HTTPD_H +#define __APPS_NETUTILS_HTTPD_H /**************************************************************************** * Included Files @@ -51,4 +51,4 @@ extern void httpd_init(void); extern int httpd_listen(void); -#endif /* _NET_UIP_HTTPD_H */ +#endif /* __APPS_NETUTILS_HTTPD_H */ diff --git a/include/net/uip/ipmsfilter.h b/include/apps/netutils/ipmsfilter.h similarity index 94% rename from include/net/uip/ipmsfilter.h rename to include/apps/netutils/ipmsfilter.h index df792d50be..56088eca7f 100755 --- a/include/net/uip/ipmsfilter.h +++ b/include/apps/netutils/ipmsfilter.h @@ -1,8 +1,8 @@ /**************************************************************************** - * net/uip/ipmsfilter.h + * apps/netutils/ipmsfilter.h * User interface to add/remove IP multicast address * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -34,8 +34,8 @@ * ****************************************************************************/ -#ifndef __NET_UIP_IPMSFILTER_H -#define __NET_UIP_IPMSFILTER_H +#ifndef __APPS_NETUTILS_IPMSFILTER_H +#define __APPS_NETUTILS_IPMSFILTER_H /**************************************************************************** * Included Files @@ -98,4 +98,4 @@ EXTERN int ipmsfilter(FAR const char *ifname, #endif #endif /* CONFIG_NET_IGMP */ -#endif /* __NET_UIP_IPMSFILTER_H */ +#endif /* __APPS_NETUTILS_IPMSFILTER_H */ diff --git a/include/net/uip/resolv.h b/include/apps/netutils/resolv.h similarity index 93% rename from include/net/uip/resolv.h rename to include/apps/netutils/resolv.h index 8b9f3bace7..a427c53949 100644 --- a/include/net/uip/resolv.h +++ b/include/apps/netutils/resolv.h @@ -1,4 +1,4 @@ -/* resolv.h +/* includes/apps/netutils/resolv.h * DNS resolver code header file. * Authtor Adam Dunkels * @@ -30,8 +30,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __UIP_RESOLV_H__ -#define __UIP_RESOLV_H__ +#ifndef __APPS_NETUTILS_RESOLVE_H +#define __APPS_NETUTILS_RESOLVE_H #include @@ -62,4 +62,4 @@ EXTERN int resolv_query(const char *name, struct sockaddr_in *addr); } #endif -#endif /* __UIP_RESOLV_H__ */ +#endif /* __APPS_NETUTILS_RESOLVE_H */ diff --git a/include/net/uip/smtp.h b/include/apps/netutils/smtp.h similarity index 93% rename from include/net/uip/smtp.h rename to include/apps/netutils/smtp.h index 4653443ff7..d1ea0c5d94 100644 --- a/include/net/uip/smtp.h +++ b/include/apps/netutils/smtp.h @@ -1,8 +1,8 @@ /**************************************************************************** - * smtp.h + * include/apps/netutils/smtp.h * SMTP header file * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Heavily leveraged from uIP 1.0 which also has a BSD-like license: @@ -37,8 +37,8 @@ * ****************************************************************************/ -#ifndef __SMTP_H__ -#define __SMTP_H__ +#ifndef __APPS_NETUTILS_SMTP_H +#define __APPS_NETUTILS_SMTP_H /**************************************************************************** * Included Files @@ -63,4 +63,4 @@ extern int smtp_send(void *handle, const char *to, const char *cc, const char *msg, int msglen); extern void smtp_close(void *handle); -#endif /* __SMTP_H__ */ +#endif /* __APPS_NETUTILS_SMTP_H */ diff --git a/include/net/uip/telnetd.h b/include/apps/netutils/telnetd.h similarity index 92% rename from include/net/uip/telnetd.h rename to include/apps/netutils/telnetd.h index 32247c206b..9d3d6feaf0 100644 --- a/include/net/uip/telnetd.h +++ b/include/apps/netutils/telnetd.h @@ -1,7 +1,7 @@ /**************************************************************************** - * include/net/uip/telnetd.h + * include/apps/netutils/telnetd.h * - * Copyright (C) 2007 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * This is a leverage of similar logic from uIP: @@ -36,8 +36,8 @@ * SUCH DAMAGE. ****************************************************************************/ -#ifndef __NET_UIP_TELNETD_H -#define __NET_UIP_TELNETD_H +#ifndef __APPS_NETUTILS_TELNETD_H +#define __APPS_NETUTILS_TELNETD_H /**************************************************************************** * Included Files @@ -67,4 +67,4 @@ EXTERN void telnetd_init(void); } #endif -#endif /* __NET_UIP_TELNETD_H */ +#endif /* __APPS_NETUTILS_TELNETD_H */ diff --git a/include/net/uip/tftp.h b/include/apps/netutils/tftp.h similarity index 93% rename from include/net/uip/tftp.h rename to include/apps/netutils/tftp.h index 7aa77c1097..c00e37c72f 100644 --- a/include/net/uip/tftp.h +++ b/include/apps/netutils/tftp.h @@ -1,7 +1,7 @@ /**************************************************************************** - * include/net/uip/tftp.h + * include/apps/netutils/tftp.h * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __NET_UIP_TFTP_H -#define __NET_UIP_TFTP_H +#ifndef __APPS_NETUTILS_TFTP_H +#define __APPS_NETUTILS_TFTP_H /**************************************************************************** * Included Files @@ -70,4 +70,4 @@ EXTERN int tftpput(const char *local, const char *remote, in_addr_t addr, bool b } #endif -#endif /* __NET_UIP_TFTP_H */ \ No newline at end of file +#endif /* __APPS_NETUTILS_TFTP_H */ \ No newline at end of file diff --git a/include/net/uip/thttpd.h b/include/apps/netutils/thttpd.h similarity index 95% rename from include/net/uip/thttpd.h rename to include/apps/netutils/thttpd.h index bd445766c9..959177219e 100644 --- a/include/net/uip/thttpd.h +++ b/include/apps/netutils/thttpd.h @@ -1,7 +1,7 @@ /**************************************************************************** - * net/uip/thttpd.h + * apps/netutils/thttpd.h * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __NET_UIP_THTTPD_H -#define __NET_UIP_THTTPD_H +#ifndef __APPS_NETUTILS_THTTPD_H +#define __APPS_NETUTILS_THTTPD_H /**************************************************************************** * Included Files @@ -98,4 +98,4 @@ EXTERN int thttpd_main(int argc, char **argv); } #endif -#endif /* __NET_UIP_THTTPD_H */ +#endif /* __APPS_NETUTILS_THTTPD_H */ diff --git a/include/net/uip/uip-lib.h b/include/apps/netutils/uiplib.h similarity index 97% rename from include/net/uip/uip-lib.h rename to include/apps/netutils/uiplib.h index 8132459530..a149de63b2 100644 --- a/include/net/uip/uip-lib.h +++ b/include/apps/netutils/uiplib.h @@ -1,5 +1,5 @@ /**************************************************************************** - * net/uip/uiplib.h + * apps/netutils/uiplib.h * Various non-standard APIs to support netutils. All non-standard and * intended only for internal use. * @@ -42,8 +42,8 @@ * ****************************************************************************/ -#ifndef __NET_UIP_UIP_LIB_H -#define __NET_UIP_UIP_LIB_H +#ifndef __APPS_NETUTILS_UIPLIB_H +#define __APPS_NETUTILS_UIPLIB_H /**************************************************************************** * Included Files @@ -126,4 +126,4 @@ extern int uip_parsehttpurl(const char *url, uint16_t *port, extern void uip_server(uint16_t portno, pthread_startroutine_t handler, int stacksize); -#endif /* __NET_UIP_UIP_LIB_H */ +#endif /* __APPS_NETUTILS_UIPLIB_H */ diff --git a/include/net/uip/webclient.h b/include/apps/netutils/webclient.h similarity index 96% rename from include/net/uip/webclient.h rename to include/apps/netutils/webclient.h index 6e91bfb238..c80626e3bc 100644 --- a/include/net/uip/webclient.h +++ b/include/apps/netutils/webclient.h @@ -1,8 +1,8 @@ /**************************************************************************** - * include/net/uip/webclient.h + * include/apps/netutils/webclient.h * Header file for the HTTP client * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based remotely on the uIP webclient which also has a BSD style license: @@ -39,8 +39,8 @@ * ****************************************************************************/ -#ifndef __NET_UIP_WEBCLIENT_H -#define __NET_UIP_WEBCLIENT_H +#ifndef __APPS_NETUTILS_WEBCLIENT_H +#define __APPS_NETUTILS_WEBCLIENT_H /**************************************************************************** * Included Files @@ -146,4 +146,4 @@ EXTERN int wget(FAR const char *url, FAR char *buffer, int buflen, } #endif -#endif /* __NET_UIP_WEBCLIENT_H */ +#endif /* __APPS_NETUTILS_WEBCLIENT_H */ diff --git a/netutils/dhcpc/dhcpc.c b/netutils/dhcpc/dhcpc.c index 79f806ad5f..dc80988bb9 100644 --- a/netutils/dhcpc/dhcpc.c +++ b/netutils/dhcpc/dhcpc.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/dhcpc/dhcpc.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based heavily on portions of uIP: @@ -53,8 +53,8 @@ #include #include -#include -#include +#include +#include /**************************************************************************** * Definitions diff --git a/netutils/dhcpd/dhcpd.c b/netutils/dhcpd/dhcpd.c index 0e498541c6..39050bd62a 100644 --- a/netutils/dhcpd/dhcpd.c +++ b/netutils/dhcpd/dhcpd.c @@ -52,12 +52,12 @@ # define ERROR (-1) # define OK (0) #else -# include /* NuttX configuration */ -# include /* For ndbg, vdbg */ -# include /* For CONFIG_CPP_HAVE_WARNING */ -# include /* For irqstore() and friends -- REVISIT */ -# include /* For low-level ARP interfaces -- REVISIT */ -# include /* Advertised DHCPD APIs */ +# include /* NuttX configuration */ +# include /* For ndbg, vdbg */ +# include /* For CONFIG_CPP_HAVE_WARNING */ +# include /* For irqstore() and friends -- REVISIT */ +# include /* For low-level ARP interfaces -- REVISIT */ +# include /* Advertised DHCPD APIs */ #endif #include diff --git a/netutils/resolv/resolv.c b/netutils/resolv/resolv.c index 60da2015b3..db9e000859 100644 --- a/netutils/resolv/resolv.c +++ b/netutils/resolv/resolv.c @@ -63,7 +63,7 @@ #include #include -#include +#include /**************************************************************************** * Definitions diff --git a/netutils/smtp/smtp.c b/netutils/smtp/smtp.c index cd0b6b1e06..d758c6f6b8 100644 --- a/netutils/smtp/smtp.c +++ b/netutils/smtp/smtp.c @@ -1,8 +1,8 @@ /**************************************************************************** - * smtp.c + * apps/netutitls/smtp/smtp.c * smtp SMTP E-mail sender * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Heavily leveraged from uIP 1.0 which also has a BSD-like license: @@ -58,7 +58,7 @@ #include #include -#include +#include /**************************************************************************** * Definitions diff --git a/netutils/telnetd/telnetd.c b/netutils/telnetd/telnetd.c index 00151713c2..ccadd60dd1 100644 --- a/netutils/telnetd/telnetd.c +++ b/netutils/telnetd/telnetd.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/telnetd/telnetd.c * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * This is a leverage of similar logic from uIP: @@ -53,8 +53,8 @@ #include #include -#include -#include +#include +#include #include "shell.h" diff --git a/netutils/tftpc/tftpc_get.c b/netutils/tftpc/tftpc_get.c index 39040cd7d7..e0779d17de 100644 --- a/netutils/tftpc/tftpc_get.c +++ b/netutils/tftpc/tftpc_get.c @@ -1,7 +1,7 @@ /**************************************************************************** * netuils/tftp/tftpc_get.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ #include #include -#include +#include #include "tftpc_internal.h" diff --git a/netutils/tftpc/tftpc_packets.c b/netutils/tftpc/tftpc_packets.c index 169f068cc9..d43410ff4f 100644 --- a/netutils/tftpc/tftpc_packets.c +++ b/netutils/tftpc/tftpc_packets.c @@ -1,7 +1,7 @@ /**************************************************************************** * netuils/tftp/tftpc_packets.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,7 @@ #include #include -#include +#include #include "tftpc_internal.h" diff --git a/netutils/tftpc/tftpc_put.c b/netutils/tftpc/tftpc_put.c index d16fc95bd1..4d87ba9086 100644 --- a/netutils/tftpc/tftpc_put.c +++ b/netutils/tftpc/tftpc_put.c @@ -1,7 +1,7 @@ /**************************************************************************** * netuils/tftp/tftpc_put.c * - * Copyright (C) 2008-2009Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -51,7 +51,7 @@ #include #include -#include +#include #include "tftpc_internal.h" diff --git a/netutils/thttpd/libhttpd.c b/netutils/thttpd/libhttpd.c index f258b81ed5..05831b3353 100644 --- a/netutils/thttpd/libhttpd.c +++ b/netutils/thttpd/libhttpd.c @@ -2,7 +2,7 @@ * netutils/thttpd/libhttpd.c * HTTP Protocol Library * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: @@ -59,7 +59,7 @@ #include #include -#include +#include #include "config.h" #include "libhttpd.h" diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c index cd2092fa81..3b49c0141c 100644 --- a/netutils/thttpd/thttpd.c +++ b/netutils/thttpd/thttpd.c @@ -2,7 +2,7 @@ * netutils/thttpd/thttpd.c * Tiny HTTP Server * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Derived from the file of the same name in the original THTTPD package: @@ -55,7 +55,7 @@ #include #include -#include +#include #include "config.h" #include "fdwatch.h" diff --git a/netutils/thttpd/thttpd_cgi.c b/netutils/thttpd/thttpd_cgi.c index 739fd77123..ee126795ac 100755 --- a/netutils/thttpd/thttpd_cgi.c +++ b/netutils/thttpd/thttpd_cgi.c @@ -2,7 +2,7 @@ * netutils/thttpd/thttpd_cgi.c * CGI support * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Derived from the file libhttpd.c in the original THTTPD package: @@ -55,7 +55,7 @@ #include #include -#include +#include #include "config.h" #include "libhttpd.h" diff --git a/netutils/uiplib/uip_gethostaddr.c b/netutils/uiplib/uip_gethostaddr.c index a04df437c6..0de639d6cc 100644 --- a/netutils/uiplib/uip_gethostaddr.c +++ b/netutils/uiplib/uip_gethostaddr.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_gethostaddr.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ #include #include -#include +#include /**************************************************************************** * Pre-processor Definitions diff --git a/netutils/uiplib/uip_getmacaddr.c b/netutils/uiplib/uip_getmacaddr.c index 05dbf34f46..c99bc7a7d8 100644 --- a/netutils/uiplib/uip_getmacaddr.c +++ b/netutils/uiplib/uip_getmacaddr.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_getmacaddr.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions diff --git a/netutils/uiplib/uip_ipmsfilter.c b/netutils/uiplib/uip_ipmsfilter.c index 11f15a180f..ccae4a6805 100755 --- a/netutils/uiplib/uip_ipmsfilter.c +++ b/netutils/uiplib/uip_ipmsfilter.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_setmultiaddr.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,8 +50,8 @@ #include #include -#include -#include +#include +#include #ifdef CONFIG_NET_IGMP diff --git a/netutils/uiplib/uip_parsehttpurl.c b/netutils/uiplib/uip_parsehttpurl.c index 22fcf0e5f8..bda5502b79 100644 --- a/netutils/uiplib/uip_parsehttpurl.c +++ b/netutils/uiplib/uip_parsehttpurl.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_parsehttpurl.c * - * Copyright (C) 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -38,10 +38,12 @@ *****************************************************************************/ #include + #include #include #include -#include + +#include /**************************************************************************** * Private Data diff --git a/netutils/uiplib/uip_server.c b/netutils/uiplib/uip_server.c index ca062d4dd0..f58f063de5 100644 --- a/netutils/uiplib/uip_server.c +++ b/netutils/uiplib/uip_server.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_server.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ #include #include -#include +#include /**************************************************************************** * Public Functions diff --git a/netutils/uiplib/uip_setdraddr.c b/netutils/uiplib/uip_setdraddr.c index 36a9c34e1f..79eac5b972 100644 --- a/netutils/uiplib/uip_setdraddr.c +++ b/netutils/uiplib/uip_setdraddr.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_setdraddr.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions diff --git a/netutils/uiplib/uip_sethostaddr.c b/netutils/uiplib/uip_sethostaddr.c index d06b220750..ccc7526b9a 100644 --- a/netutils/uiplib/uip_sethostaddr.c +++ b/netutils/uiplib/uip_sethostaddr.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_sethostaddr.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions diff --git a/netutils/uiplib/uip_setmacaddr.c b/netutils/uiplib/uip_setmacaddr.c index f1bf0d71b2..28188b7f8e 100644 --- a/netutils/uiplib/uip_setmacaddr.c +++ b/netutils/uiplib/uip_setmacaddr.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_setmacaddr.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,7 +50,7 @@ #include #include -#include +#include /**************************************************************************** * Pre-processor Definitions diff --git a/netutils/uiplib/uip_setnetmask.c b/netutils/uiplib/uip_setnetmask.c index 837bdc1e34..2cdc384742 100644 --- a/netutils/uiplib/uip_setnetmask.c +++ b/netutils/uiplib/uip_setnetmask.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/uiplib/uip_setnetmask.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -49,7 +49,7 @@ #include #include -#include +#include /**************************************************************************** * Global Functions diff --git a/netutils/uiplib/uiplib.c b/netutils/uiplib/uiplib.c index b45527f45a..99f716f5ce 100644 --- a/netutils/uiplib/uiplib.c +++ b/netutils/uiplib/uiplib.c @@ -2,7 +2,7 @@ * netutils/uiplib/uiplib.c * Various uIP library functions. * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on uIP which also has a BSD style license: @@ -45,8 +45,13 @@ #include #include + #include -#include +#include + +/**************************************************************************** + * Public Functions + ****************************************************************************/ bool uiplib_ipaddrconv(const char *addrstr, uint8_t *ipaddr) { diff --git a/netutils/webclient/webclient.c b/netutils/webclient/webclient.c index 8b5ba107c9..2c5108a4ae 100644 --- a/netutils/webclient/webclient.c +++ b/netutils/webclient/webclient.c @@ -2,7 +2,7 @@ * netutils/webclient/webclient.c * Implementation of the HTTP client. * - * Copyright (C) 2007, 2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on uIP which also has a BSD style license: @@ -64,13 +64,13 @@ #ifdef CONFIG_HAVE_GETHOSTBYNAME # include #else -# include +# include #endif #include #include -#include -#include +#include +#include /**************************************************************************** * Definitions diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c index 91519e1dd4..9322b58dca 100644 --- a/netutils/webserver/httpd.c +++ b/netutils/webserver/httpd.c @@ -2,7 +2,7 @@ * netutils/webserver/httpd.c * httpd Web server * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * This is a leverage of similar logic from uIP: @@ -59,8 +59,8 @@ #include #include -#include -#include +#include +#include #include "httpd.h" #include "httpd_cgi.h" diff --git a/netutils/webserver/httpd_cgi.c b/netutils/webserver/httpd_cgi.c index a51a4e2738..967ef9b9cb 100644 --- a/netutils/webserver/httpd_cgi.c +++ b/netutils/webserver/httpd_cgi.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include "httpd_cgi.h" diff --git a/netutils/webserver/httpd_cgi.h b/netutils/webserver/httpd_cgi.h index f561767786..9547bca331 100644 --- a/netutils/webserver/httpd_cgi.h +++ b/netutils/webserver/httpd_cgi.h @@ -33,7 +33,7 @@ #ifndef __HTTPD_CGI_H__ #define __HTTPD_CGI_H__ -#include +#include #include "httpd.h" diff --git a/netutils/webserver/httpd_fs.c b/netutils/webserver/httpd_fs.c index f6403fa376..731f194988 100644 --- a/netutils/webserver/httpd_fs.c +++ b/netutils/webserver/httpd_fs.c @@ -1,7 +1,7 @@ /**************************************************************************** * netutils/webserver/httpd_fs.c * - * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on uIP which also has a BSD style license: @@ -43,7 +43,7 @@ #include -#include +#include #include "httpd.h" #include "httpd_fsdata.h"