Ensure MAXDADNS is defined in uip-ds6.h

Set no RPL as webserver6.minimal-net default and update README
This commit is contained in:
David Kopf 2012-05-28 10:01:34 -04:00
parent 86787df272
commit e62f2c3977
3 changed files with 41 additions and 5 deletions

View file

@ -44,6 +44,8 @@
#include "net/uip.h"
#include "sys/stimer.h"
/* The size of uip_ds6_addr_t depends on UIP_ND6_DEF_MAXDADNS. Include uip-nd6.h to define it. */
#include "net/uip-nd6.h"
/*--------------------------------------------------*/
/** Configuration. For all tables (Neighbor cache, Prefix List, Routing Table,

View file

@ -36,5 +36,13 @@ endif
UIP_CONF_IPV6=1
DEFINES=WITH_UIP6
# Make no RPL the default for minimal-net builds
ifeq ($(TARGET),minimal-net)
ifndef UIP_CONF_RPL
UIP_CONF_RPL=0
endif
endif
CONTIKI = ../..
include $(CONTIKI)/Makefile.include

View file

@ -4,8 +4,31 @@ 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:
By default contiki ipv6 nodes are configured with the low-power RPL
protocol and direct outgoing packets through the RPL parent to a mesh
border router. Access to the webserver thus requires at least one other
node to as the RPL root. The Makefile changes the default to no RPL for
the minimal-net target. Override the RPL choice with
$make TARGET=minimal-net UIP_CONF_RPL=1
$make TARGET=any-other UIP_CONF_RPL=0
The RPL mesh border router can be configured with this webserver using the
/examples/ipv6/rpl-border-router/ example.
If you are using the minimal-net platform without RPL you can access the
webserver through the link local address by appending the interface descriptor
shown at launch, e.g.
wget http://[fe80::296:98ff:fe00:0232%tap0] (linux)
ping http://[fe80::206:98ff:fe00:0202%nnnn] (Windows)
The lower 64 bits are derived from the ethernet EUI-48 "mac address" in uip6.c:
uip_lladdr_t uip_lladdr = {{0x00,0x06,0x98,0x00,0x02,0x32}};
The ipv6 prefix can be hard-coded in the build or assigned through a
host router advertisement. If hard-coded just assign the prefix to the
interface:
sudo ip -6 address add fdfd::1/64 dev tap0 (linux)
netsh commands or the interface GUI (Windows)
On linux you can set up router advertisements 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
@ -23,12 +46,15 @@ code as follows:
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)
The default webserver and content is in /apps/webserver/...
See the wiki page for more details -
http://www.sics.se/contiki/wiki/index.php/Setting_up_Wireshark_on_a_Loopback_Interface
The default webserver and content is in /apps/webserver/...
Change that using e.g.
$make clean
$make WITH_WEBSERVER=webserver-nano
$make TARGET=redbee-econotag WITH_WEBSERVER=webserver-nano
$make TARGET=avr-raven WITH_WEBSERVER=raven-webserver
******** Make clean when switching webservers! **********
******** Make clean before switching make options! **********