From 1726c10a46976c07f813e2e324256af8c4d9ce39 Mon Sep 17 00:00:00 2001 From: c_oflynn Date: Tue, 14 Oct 2008 22:04:16 +0000 Subject: [PATCH] Forgot these files! --- examples/webserver-ipv6-raven/Makefile | 8 +++++ examples/webserver-ipv6-raven/README | 21 ++++++++++++ examples/webserver-ipv6-raven/webserver6.c | 38 ++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 examples/webserver-ipv6-raven/Makefile create mode 100644 examples/webserver-ipv6-raven/README create mode 100644 examples/webserver-ipv6-raven/webserver6.c diff --git a/examples/webserver-ipv6-raven/Makefile b/examples/webserver-ipv6-raven/Makefile new file mode 100644 index 000000000..7987883ef --- /dev/null +++ b/examples/webserver-ipv6-raven/Makefile @@ -0,0 +1,8 @@ +all: webserver6 +APPS=raven-webserver raven-lcd-interface +TARGET=avr-raven + +UIP_CONF_IPV6=1 + +CONTIKI = ../.. +include $(CONTIKI)/Makefile.include diff --git a/examples/webserver-ipv6-raven/README b/examples/webserver-ipv6-raven/README new file mode 100644 index 000000000..cde5af302 --- /dev/null +++ b/examples/webserver-ipv6-raven/README @@ -0,0 +1,21 @@ +This example features a simple webserver running on top of the IPv6 +contiki stack. + +For this example to run properly the UIP_CONF_TCP compilation flag +must be set to 1 in the contiki-conf.h file of the platform. + +If you are using the minimal-net platform on linux you can test the +code as follows: +- First do 'ifconfig tap0 inet6 3ffe:0501:ffff:0100:0206:98ff:fe00:0231' + or 'ip -6 address add 3ffe:0501:ffff:0100:0206:98ff:fe00:0231' dev tap0. +- You might need to add a route 'ip -6 route add + aaaa:0000:0000:0000:0206:98ff:fe00:0232/64 dev tap0' +- Then configure a global address by sending a router advertisement (RA) + with a prefix option. You can use radvd for example to generate such a + packet. + Assume the prefix in the RA is: + 3ffe:0501:ffff:0100:0000:0000:0000:0000/64. + and that the resulting address created by the contiki stack is: + 3ffe:0501:ffff:0100:0206:98ff:fe00:0232 +- Finally you can use 'wget http://[3ffe:0501:ffff:0100:0206:98ff:fe00:0232]' + to get the web page (index.html file) diff --git a/examples/webserver-ipv6-raven/webserver6.c b/examples/webserver-ipv6-raven/webserver6.c new file mode 100644 index 000000000..a77ed47bd --- /dev/null +++ b/examples/webserver-ipv6-raven/webserver6.c @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2006, Swedish Institute of Computer Science. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + * + * $Id: webserver6.c,v 1.1 2008/10/14 22:04:16 c_oflynn Exp $ + */ + +#include "webserver-nogui.h" + +/*---------------------------------------------------------------------------*/ +AUTOSTART_PROCESSES(&webserver_nogui_process); +/*---------------------------------------------------------------------------*/