diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-07-03 17:31:17 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-07-03 17:31:17 -0600 |
commit | cd6c5655e4b5434f599db4472f62d22e252c50ab (patch) | |
tree | 95652750690f554bca94da8e63c4e27687ddbf5e /apps/examples | |
parent | 4b59193e39baf25f2923ef64745c44a7f2d55027 (diff) | |
download | nuttx-cd6c5655e4b5434f599db4472f62d22e252c50ab.tar.gz nuttx-cd6c5655e4b5434f599db4472f62d22e252c50ab.tar.bz2 nuttx-cd6c5655e4b5434f599db4472f62d22e252c50ab.zip |
Rename apps/examples/uip to apps/examples/webserver
Diffstat (limited to 'apps/examples')
-rw-r--r-- | apps/examples/Kconfig | 2 | ||||
-rw-r--r-- | apps/examples/Make.defs | 4 | ||||
-rw-r--r-- | apps/examples/Makefile | 2 | ||||
-rw-r--r-- | apps/examples/README.txt | 100 | ||||
-rw-r--r-- | apps/examples/udp/udp-internal.h | 6 | ||||
-rw-r--r-- | apps/examples/webserver/.gitignore (renamed from apps/examples/uip/.gitignore) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/Kconfig (renamed from apps/examples/uip/Kconfig) | 12 | ||||
-rw-r--r-- | apps/examples/webserver/Makefile (renamed from apps/examples/uip/Makefile) | 4 | ||||
-rw-r--r-- | apps/examples/webserver/cgi.c (renamed from apps/examples/uip/cgi.c) | 2 | ||||
-rw-r--r-- | apps/examples/webserver/cgi.h (renamed from apps/examples/uip/cgi.h) | 8 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/.gitignore (renamed from apps/examples/uip/httpd-fs/.gitignore) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/404.html (renamed from apps/examples/uip/httpd-fs/404.html) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/fade.png (renamed from apps/examples/uip/httpd-fs/fade.png) | bin | 196 -> 196 bytes | |||
-rw-r--r-- | apps/examples/webserver/httpd-fs/files.shtml (renamed from apps/examples/uip/httpd-fs/files.shtml) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/footer.html (renamed from apps/examples/uip/httpd-fs/footer.html) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/header.html (renamed from apps/examples/uip/httpd-fs/header.html) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/index.shtml (renamed from apps/examples/uip/httpd-fs/index.shtml) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/stats.shtml (renamed from apps/examples/uip/httpd-fs/stats.shtml) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/style.css (renamed from apps/examples/uip/httpd-fs/style.css) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/httpd-fs/tcp.shtml (renamed from apps/examples/uip/httpd-fs/tcp.shtml) | 0 | ||||
-rw-r--r-- | apps/examples/webserver/webserver_main.c (renamed from apps/examples/uip/uip_main.c) | 28 |
21 files changed, 84 insertions, 84 deletions
diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig index 47b11b1e3..0578d46bb 100644 --- a/apps/examples/Kconfig +++ b/apps/examples/Kconfig @@ -65,7 +65,7 @@ source "$APPSDIR/examples/tiff/Kconfig" source "$APPSDIR/examples/touchscreen/Kconfig" source "$APPSDIR/examples/udp/Kconfig" source "$APPSDIR/examples/discover/Kconfig" -source "$APPSDIR/examples/uip/Kconfig" +source "$APPSDIR/examples/webserver/Kconfig" source "$APPSDIR/examples/usbserial/Kconfig" source "$APPSDIR/examples/usbterm/Kconfig" source "$APPSDIR/examples/watchdog/Kconfig" diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs index 219c8df71..75d1662ce 100644 --- a/apps/examples/Make.defs +++ b/apps/examples/Make.defs @@ -282,8 +282,8 @@ ifeq ($(CONFIG_EXAMPLES_UDP),y) CONFIGURED_APPS += examples/udp endif -ifeq ($(CONFIG_EXAMPLES_UIP),y) -CONFIGURED_APPS += examples/uip +ifeq ($(CONFIG_EXAMPLES_WEBSERVER),y) +CONFIGURED_APPS += examples/webserver endif ifeq ($(CONFIG_EXAMPLES_USBSERIAL),y) diff --git a/apps/examples/Makefile b/apps/examples/Makefile index a4bca7dfe..48a328d4e 100644 --- a/apps/examples/Makefile +++ b/apps/examples/Makefile @@ -44,7 +44,7 @@ SUBDIRS += nrf24l01_term nsh null nx nxconsole nxffs nxflat nxhello nximage SUBDIRS += nxlines nxtext ostest pashello pipe poll posix_spawn pwm qencoder SUBDIRS += random relays rgmp romfs sendmail serialblaster serloop serialrx SUBDIRS += slcd smart smart_test tcpecho telnetd thttpd tiff touchscreen udp -SUBDIRS += uip usbserial usbterm watchdog wget wgetjson xmlrpc +SUBDIRS += usbserial usbterm watchdog webserver wget wgetjson xmlrpc # Sub-directories that might need context setup. Directories may need # context setup for a variety of reasons, but the most common is because diff --git a/apps/examples/README.txt b/apps/examples/README.txt index c743c38a9..e6bf986c2 100644 --- a/apps/examples/README.txt +++ b/apps/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_NETLIB=y - The UIP library is needed + CONFIG_NETUTILS_NETLIB=y - The networking library is needed CONFIG_EXAMPLES_DHCPD_NOMAC - (May be defined to use software assigned MAC) CONFIG_EXAMPLES_DHCPD_IPADDR - Target IP address @@ -490,7 +490,7 @@ examples/igmp * CONFIG_EXAMPLES_IGMP_GRPADDR Multicast group address * CONFIG_EXAMPLES_NETLIB - The UIP library is needed + The networking 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_NETLIB=y - The UIP livrary in needed. + CONFIG_EXAMPLES_NETLIB=y - The networking library in needed. See also examples/tcpecho @@ -1218,7 +1218,7 @@ examples/poll If networking is enabled, applications using this example will need to provide the following definition in the defconfig file to enable the - UIP library: + networking library: CONFIG_NETUTILS_NETLIB=y @@ -1670,52 +1670,6 @@ examples/udp CONFIG_NETUTILS_NETLIB=y -examples/uip -^^^^^^^^^^^^ - - This is a port of uIP tiny webserver example application. Settings - specific to this example include: - - CONFIG_EXAMPLES_UIP_NOMAC - (May be defined to use software assigned MAC) - CONFIG_EXAMPLES_UIP_IPADDR - Target IP address - CONFIG_EXAMPLES_UIP_DRIPADDR - Default router IP addess - CONFIG_EXAMPLES_UIP_NETMASK - Network mask - CONFIG_EXAMPLES_UIP_DHCPC - Select to get IP address via DHCP - - If you use DHCPC, 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). - CONFIG_NET_BROADCAST=y - UDP broadcast support is needed. - CONFIG_NET_BUFSIZE=650 - Per RFC2131 (p. 9), the DHCP client must be - (or larger) prepared to receive DHCP messages of up to - 576 bytes (excluding Ethernet, IP, or UDP - headers and FCS). - - Other configuration items apply also to the selected webserver net utility. - Additional relevant settings for the uIP webserver net utility are: - - CONFIG_NETUTILS_HTTPDSTACKSIZE - CONFIG_NETUTILS_HTTPDFILESTATS - CONFIG_NETUTILS_HTTPDNETSTATS - - Applications using this example will need to enable the following - netutils libraries in their defconfig file: - - CONFIG_NETUTILS_NETLIB=y - CONFIG_NETUTILS_DHCPC=y - CONFIG_NETUTILS_DNSCLIENT=y - CONFIG_NETUTILS_WEBSERVER=y - - NOTE: This example does depend on the perl script at - nuttx/tools/mkfsdata.pl. You must have perl installed on your - development system at /usr/bin/perl. - examples/usbserial ^^^^^^^^^^^^^^^^^^ @@ -1894,6 +1848,52 @@ examples/watchdog milliseconds before the watchdog timer expires. Default: 2000 milliseconds. +examples/webserver +^^^^^^^^^^^^^^^^^^ + + This is a port of uIP tiny webserver example application. Settings + specific to this example include: + + CONFIG_EXAMPLES_WEBSERVER_NOMAC - (May be defined to use software assigned MAC) + CONFIG_EXAMPLES_WEBSERVER_IPADDR - Target IP address + CONFIG_EXAMPLES_WEBSERVER_DRIPADDR - Default router IP addess + CONFIG_EXAMPLES_WEBSERVER_NETMASK - Network mask + CONFIG_EXAMPLES_WEBSERVER_DHCPC - Select to get IP address via DHCP + + If you use DHCPC, 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). + CONFIG_NET_BROADCAST=y - UDP broadcast support is needed. + CONFIG_NET_BUFSIZE=650 - Per RFC2131 (p. 9), the DHCP client must be + (or larger) prepared to receive DHCP messages of up to + 576 bytes (excluding Ethernet, IP, or UDP + headers and FCS). + + Other configuration items apply also to the selected webserver net utility. + Additional relevant settings for the uIP webserver net utility are: + + CONFIG_NETUTILS_HTTPDSTACKSIZE + CONFIG_NETUTILS_HTTPDFILESTATS + CONFIG_NETUTILS_HTTPDNETSTATS + + Applications using this example will need to enable the following + netutils libraries in their defconfig file: + + CONFIG_NETUTILS_NETLIB=y + CONFIG_NETUTILS_DHCPC=y + CONFIG_NETUTILS_DNSCLIENT=y + CONFIG_NETUTILS_WEBSERVER=y + + NOTE: This example does depend on the perl script at + nuttx/tools/mkfsdata.pl. You must have perl installed on your + development system at /usr/bin/perl. + examples/wget ^^^^^^^^^^^^^ diff --git a/apps/examples/udp/udp-internal.h b/apps/examples/udp/udp-internal.h index c8010e6c8..da2be440a 100644 --- a/apps/examples/udp/udp-internal.h +++ b/apps/examples/udp/udp-internal.h @@ -33,8 +33,8 @@ * ****************************************************************************/ -#ifndef __EXAMPLES_UIP_INTERNAL_H -#define __EXAMPLES_UIP_INTERNAL_H +#ifndef __EXAMPLES_UDP_INTERNAL_H +#define __EXAMPLES_UDP_INTERNAL_H /**************************************************************************** * Included Files @@ -87,4 +87,4 @@ extern void send_client(void); extern void recv_server(void); -#endif /* __EXAMPLES_UIP_INTERNAL_H */ +#endif /* __EXAMPLES_UDP_INTERNAL_H */ diff --git a/apps/examples/uip/.gitignore b/apps/examples/webserver/.gitignore index 12109c08d..12109c08d 100644 --- a/apps/examples/uip/.gitignore +++ b/apps/examples/webserver/.gitignore diff --git a/apps/examples/uip/Kconfig b/apps/examples/webserver/Kconfig index e8478b73d..1a1323022 100644 --- a/apps/examples/uip/Kconfig +++ b/apps/examples/webserver/Kconfig @@ -3,33 +3,33 @@ # see misc/tools/kconfig-language.txt. # -config EXAMPLES_UIP +config EXAMPLES_WEBSERVER bool "uIP web server example" default n ---help--- Enable the uIP web server example -if EXAMPLES_UIP +if EXAMPLES_WEBSERVER -config EXAMPLES_UIP_IPADDR +config EXAMPLES_WEBSERVER_IPADDR hex "Device IP" default 0x0a000002 ---help--- This is the IP address of your board. -config EXAMPLES_UIP_DRIPADDR +config EXAMPLES_WEBSERVER_DRIPADDR hex "Default Router IP" default 0x0a000001 ---help--- This is the IP address of your router/gateway. -config EXAMPLES_UIP_NETMASK +config EXAMPLES_WEBSERVER_NETMASK hex "Network Mask" default 0xffffff00 ---help--- This is the network mask to use on this device. -config EXAMPLES_UIP_NOMAC +config EXAMPLES_WEBSERVER_NOMAC bool "No hardware MAC" default y ---help--- diff --git a/apps/examples/uip/Makefile b/apps/examples/webserver/Makefile index 11da70050..a1589936e 100644 --- a/apps/examples/uip/Makefile +++ b/apps/examples/webserver/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# apps/examples/uip/Makefile +# apps/examples/webserver/Makefile # # Copyright (C) 2007-2008, 2010-2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> @@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs # uIP very tiny web server example ASRCS = -CSRCS = uip_main.c cgi.c httpd_fsdata.c +CSRCS = webserver_main.c cgi.c httpd_fsdata.c AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/apps/examples/uip/cgi.c b/apps/examples/webserver/cgi.c index af579fb48..bdb290b7e 100644 --- a/apps/examples/uip/cgi.c +++ b/apps/examples/webserver/cgi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/examples/uip/cgi.c + * apps/examples/webserver/cgi.c * Web server script interface * Author: Adam Dunkels <adam@sics.se> * diff --git a/apps/examples/uip/cgi.h b/apps/examples/webserver/cgi.h index 8ad0f93ce..a71d306b3 100644 --- a/apps/examples/uip/cgi.h +++ b/apps/examples/webserver/cgi.h @@ -1,5 +1,5 @@ /**************************************************************************** - * apps/examples/uip/cgi.c + * apps/examples/webserver/cgi.h * Web server script interface header file * Author: Adam Dunkels <adam@sics.se> * @@ -31,8 +31,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ****************************************************************************/ -#ifndef __HTTPD_CGI_H__ -#define __HTTPD_CGI_H__ +#ifndef __EXAMPLES_WEBSERVER_CGI_H +#define __EXAMPLES_WEBSERVER_CGI_H /**************************************************************************** * Public Function Prototypes @@ -40,4 +40,4 @@ void cgi_register(void); -#endif /* __HTTPD_CGI_H__ */ +#endif /* __EXAMPLES_WEBSERVER_CGI_H */ diff --git a/apps/examples/uip/httpd-fs/.gitignore b/apps/examples/webserver/httpd-fs/.gitignore index e75e705d4..e75e705d4 100644 --- a/apps/examples/uip/httpd-fs/.gitignore +++ b/apps/examples/webserver/httpd-fs/.gitignore diff --git a/apps/examples/uip/httpd-fs/404.html b/apps/examples/webserver/httpd-fs/404.html index a17711d02..a17711d02 100644 --- a/apps/examples/uip/httpd-fs/404.html +++ b/apps/examples/webserver/httpd-fs/404.html diff --git a/apps/examples/uip/httpd-fs/fade.png b/apps/examples/webserver/httpd-fs/fade.png Binary files differindex a9e69f75d..a9e69f75d 100644 --- a/apps/examples/uip/httpd-fs/fade.png +++ b/apps/examples/webserver/httpd-fs/fade.png diff --git a/apps/examples/uip/httpd-fs/files.shtml b/apps/examples/webserver/httpd-fs/files.shtml index 8a90dbd6d..8a90dbd6d 100644 --- a/apps/examples/uip/httpd-fs/files.shtml +++ b/apps/examples/webserver/httpd-fs/files.shtml diff --git a/apps/examples/uip/httpd-fs/footer.html b/apps/examples/webserver/httpd-fs/footer.html index 5b6e2d653..5b6e2d653 100644 --- a/apps/examples/uip/httpd-fs/footer.html +++ b/apps/examples/webserver/httpd-fs/footer.html diff --git a/apps/examples/uip/httpd-fs/header.html b/apps/examples/webserver/httpd-fs/header.html index ce2659cd4..ce2659cd4 100644 --- a/apps/examples/uip/httpd-fs/header.html +++ b/apps/examples/webserver/httpd-fs/header.html diff --git a/apps/examples/uip/httpd-fs/index.shtml b/apps/examples/webserver/httpd-fs/index.shtml index 7f19358ce..7f19358ce 100644 --- a/apps/examples/uip/httpd-fs/index.shtml +++ b/apps/examples/webserver/httpd-fs/index.shtml diff --git a/apps/examples/uip/httpd-fs/stats.shtml b/apps/examples/webserver/httpd-fs/stats.shtml index c63ed4afd..c63ed4afd 100644 --- a/apps/examples/uip/httpd-fs/stats.shtml +++ b/apps/examples/webserver/httpd-fs/stats.shtml diff --git a/apps/examples/uip/httpd-fs/style.css b/apps/examples/webserver/httpd-fs/style.css index b35cd7efc..b35cd7efc 100644 --- a/apps/examples/uip/httpd-fs/style.css +++ b/apps/examples/webserver/httpd-fs/style.css diff --git a/apps/examples/uip/httpd-fs/tcp.shtml b/apps/examples/webserver/httpd-fs/tcp.shtml index 4c4bffe97..4c4bffe97 100644 --- a/apps/examples/uip/httpd-fs/tcp.shtml +++ b/apps/examples/webserver/httpd-fs/tcp.shtml diff --git a/apps/examples/uip/uip_main.c b/apps/examples/webserver/webserver_main.c index 1c974da95..15d162a30 100644 --- a/apps/examples/uip/uip_main.c +++ b/apps/examples/webserver/webserver_main.c @@ -1,5 +1,5 @@ /**************************************************************************** - * examples/uip/uip_main.c + * examples/webserver/webserver_main.c * * Copyright (C) 2007, 2009-2012 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> @@ -59,7 +59,7 @@ #include <apps/netutils/netlib.h> -#ifdef CONFIG_EXAMPLES_UIP_DHCPC +#ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC #include <arpa/inet.h> #endif @@ -69,7 +69,7 @@ /* DHCPC may be used in conjunction with any other feature (or not) */ -#ifdef CONFIG_EXAMPLES_UIP_DHCPC +#ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC # include <apps/netutils/dnsclient.h> # include <apps/netutils/dhcpc.h> #endif @@ -107,22 +107,22 @@ ****************************************************************************/ /**************************************************************************** - * uip_main + * webserver_main ****************************************************************************/ -int uip_main(int argc, char *argv[]) +int webserver_main(int argc, char *argv[]) { struct in_addr addr; -#if defined(CONFIG_EXAMPLES_UIP_DHCPC) || defined(CONFIG_EXAMPLES_UIP_NOMAC) +#if defined(CONFIG_EXAMPLES_WEBSERVER_DHCPC) || defined(CONFIG_EXAMPLES_WEBSERVER_NOMAC) uint8_t mac[IFHWADDRLEN]; #endif -#ifdef CONFIG_EXAMPLES_UIP_DHCPC +#ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC void *handle; #endif /* Many embedded network interfaces must have a software assigned MAC */ -#ifdef CONFIG_EXAMPLES_UIP_NOMAC +#ifdef CONFIG_EXAMPLES_WEBSERVER_NOMAC mac[0] = 0x00; mac[1] = 0xe0; mac[2] = 0xde; @@ -134,24 +134,24 @@ int uip_main(int argc, char *argv[]) /* Set up our host address */ -#ifdef CONFIG_EXAMPLES_UIP_DHCPC +#ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC addr.s_addr = 0; #else - addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_IPADDR); + addr.s_addr = HTONL(CONFIG_EXAMPLES_WEBSERVER_IPADDR); #endif netlib_sethostaddr("eth0", &addr); /* Set up the default router address */ - addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_DRIPADDR); + addr.s_addr = HTONL(CONFIG_EXAMPLES_WEBSERVER_DRIPADDR); netlib_setdraddr("eth0", &addr); /* Setup the subnet mask */ - addr.s_addr = HTONL(CONFIG_EXAMPLES_UIP_NETMASK); + addr.s_addr = HTONL(CONFIG_EXAMPLES_WEBSERVER_NETMASK); netlib_setnetmask("eth0", &addr); -#ifdef CONFIG_EXAMPLES_UIP_DHCPC +#ifdef CONFIG_EXAMPLES_WEBSERVER_DHCPC /* Set up the resolver */ dns_bind(); @@ -205,7 +205,7 @@ int uip_main(int argc, char *argv[]) while (1) { sleep(3); - printf("uip_main: Still running\n"); + printf("webserver_main: Still running\n"); #if CONFIG_NFILE_DESCRIPTORS > 0 fflush(stdout); #endif |