Skip to content

Commit

Permalink
Merge pull request contiki-os#1297 from simonduq/pr/default-prefix
Browse files Browse the repository at this point in the history
Change the default IPv6 prefix from aaaa::/64 to fd00::/64
  • Loading branch information
simonduq committed Mar 13, 2016
2 parents a15be9e + dea04c6 commit cd981b2
Show file tree
Hide file tree
Showing 78 changed files with 165 additions and 131 deletions.
4 changes: 2 additions & 2 deletions core/net/ipv6/sicslowpan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1757,8 +1757,8 @@ sicslowpan_init(void)
#ifdef SICSLOWPAN_CONF_ADDR_CONTEXT_0
SICSLOWPAN_CONF_ADDR_CONTEXT_0;
#else
addr_contexts[0].prefix[0] = 0xaa;
addr_contexts[0].prefix[1] = 0xaa;
addr_contexts[0].prefix[0] = UIP_DS6_DEFAULT_PREFIX_0;
addr_contexts[0].prefix[1] = UIP_DS6_DEFAULT_PREFIX_1;
#endif
#endif /* SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS > 0 */

Expand Down
30 changes: 30 additions & 0 deletions core/net/ipv6/uip-ds6.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,36 @@
#endif
#define UIP_DS6_DEFRT_NB UIP_DS6_DEFRT_NBS + UIP_DS6_DEFRT_NBU

/* Default prefix */
#ifdef UIP_CONF_DS6_DEFAULT_PREFIX
#define UIP_DS6_DEFAULT_PREFIX UIP_CONF_DS6_DEFAULT_PREFIX
#else
/* From RFC4193, section 3.1:
* | 7 bits |1| 40 bits | 16 bits | 64 bits |
* +--------+-+------------+-----------+----------------------------+
* | Prefix |L| Global ID | Subnet ID | Interface ID |
* +--------+-+------------+-----------+----------------------------+
* Prefix FC00::/7 prefix to identify Local IPv6 unicast
* addresses.
* L Set to 1 if the prefix is locally assigned.
* Set to 0 may be defined in the future. See
* Section 3.2 for additional information.
* Global ID 40-bit global identifier used to create a
* globally unique prefix. See Section 3.2 for
* additional information.
*
* We set prefix to 0xfc00 and set the local bit, resulting in 0xfd00.
* For high probability of network uniqueness, Global ID must be generated
* pseudo-randomly. As this is a hard-coded default prefix, we simply use
* a Global ID of 0. For real deployments, make sure to install a pseudo-random
* Global ID, e.g. in a RPL network, by configuring it at the root.
*/
#define UIP_DS6_DEFAULT_PREFIX 0xfd00
#endif /* UIP_CONF_DS6_DEFAULT_PREFIX */

#define UIP_DS6_DEFAULT_PREFIX_0 ((UIP_DS6_DEFAULT_PREFIX >> 8) & 0xff)
#define UIP_DS6_DEFAULT_PREFIX_1 (UIP_DS6_DEFAULT_PREFIX & 0xff)

/* Prefix list */
#define UIP_DS6_PREFIX_NBS 1
#ifndef UIP_CONF_DS6_PREFIX_NBU
Expand Down
4 changes: 2 additions & 2 deletions core/net/rpl/rpl-dag-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ set_global_address(void)

/* Assign a unique local address (RFC4193,
http://tools.ietf.org/html/rfc4193). */
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);

Expand Down Expand Up @@ -213,7 +213,7 @@ rpl_dag_root_init_dag_immediately(void)
dag->instance->def_route = NULL;
}

uip_ip6addr(&prefix, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&prefix, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
rpl_set_prefix(dag, &prefix, 64);
PRINTF("rpl_dag_root_init_dag: created a new RPL dag\n");
return 0;
Expand Down
2 changes: 1 addition & 1 deletion cpu/native/net/wpcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ wpcap_init(void)
// }
#else
addr.s_addr = inet_addr("10.10.10.10"); //prefer ipv4 default for legacy compatibility
// uiplib_ipaddrconv("aaaa::1",(uip_ipaddr_t*) &addr6.s6_addr);
// uiplib_ipaddrconv("fd00::1",(uip_ipaddr_t*) &addr6.s6_addr);
#endif

#ifdef UIP_FALLBACK_INTERFACE
Expand Down
4 changes: 2 additions & 2 deletions examples/cc2530dk/border-router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ The node will use this address to obtain the network prefix

For example:

sudo ./tunslip6 aaaa::1/64
sudo ./tunslip6 fd00::1/64

This will use aaaa:: / 64 as the prefix for the 15.4 network.
This will use fd00:: / 64 as the prefix for the 15.4 network.
2 changes: 1 addition & 1 deletion examples/cc2530dk/udp-ipv6/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ PROCESS_THREAD(udp_client_process, ev, data)
PRINTF(" local/remote port %u/%u\n",
UIP_HTONS(l_conn->lport), UIP_HTONS(l_conn->rport));

uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0x0215, 0x2000, 0x0002, 0x2145);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0x0215, 0x2000, 0x0002, 0x2145);
g_conn = udp_new(&ipaddr, UIP_HTONS(3000), NULL);
if(!g_conn) {
PRINTF("udp_new g_conn error.\n");
Expand Down
2 changes: 1 addition & 1 deletion examples/cc2530dk/udp-ipv6/ping6.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ PROCESS_THREAD(ping6_process, ev, data)
PRINTF("ping6 running.\n");
PRINTF("Button 1: 5 pings 16 byte payload.\n");

uip_ip6addr(&dest_addr, 0xaaaa, 0, 0, 0, 0x0215, 0x2000, 0x0002, 0x2145);
uip_ip6addr(&dest_addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0x0215, 0x2000, 0x0002, 0x2145);
count = 0;

icmp6_new(NULL);
Expand Down
4 changes: 2 additions & 2 deletions examples/cc2530dk/udp-ipv6/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ create_dag()
{
rpl_dag_t *dag;

uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);

Expand All @@ -135,7 +135,7 @@ create_dag()
dag = rpl_set_root(RPL_DEFAULT_INSTANCE,
&uip_ds6_get_global(ADDR_PREFERRED)->ipaddr);
if(dag != NULL) {
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
rpl_set_prefix(dag, &ipaddr, 64);
PRINTF("Created a new RPL dag with ID: ");
PRINT6ADDR(&dag->dag_id);
Expand Down
2 changes: 1 addition & 1 deletion examples/cc2538-common/mqtt-demo/project-conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#define MQTT_DEMO_PUBLISH_TRIGGER &button_right_sensor

/* If undefined, the demo will attempt to connect to IBM's quickstart */
#define MQTT_DEMO_BROKER_IP_ADDR "aaaa::1"
#define MQTT_DEMO_BROKER_IP_ADDR "fd00::1"
/*---------------------------------------------------------------------------*/
#endif /* PROJECT_CONF_H_ */
/*---------------------------------------------------------------------------*/
Expand Down
6 changes: 3 additions & 3 deletions examples/er-rest-example/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ $(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c
(cd $(CONTIKI)/tools && $(MAKE) tunslip6)

connect-router: $(CONTIKI)/tools/tunslip6
sudo $(CONTIKI)/tools/tunslip6 aaaa::1/64
sudo $(CONTIKI)/tools/tunslip6 fd00::1/64

connect-router-cooja: $(CONTIKI)/tools/tunslip6
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 -p 60001 aaaa::1/64
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 -p 60001 fd00::1/64

connect-router-native: $(CONTIKI)/examples/ipv6/native-border-router/border-router.native
sudo $(CONTIKI)/exmples/ipv6/native-border-router/border-router.native -a 127.0.0.1 -p 60001 aaaa::1/64
sudo $(CONTIKI)/exmples/ipv6/native-border-router/border-router.native -a 127.0.0.1 -p 60001 fd00::1/64

connect-minimal:
sudo ip address add fdfd::1/64 dev tap0
8 changes: 4 additions & 4 deletions examples/er-rest-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ PRELIMINARIES
#define NETSTACK_CONF_RDC nullrdc_driver
- Alternatively, you can use the native-border-router together with the slip-radio.
- For convenience, define the Cooja addresses in /etc/hosts
aaaa::0212:7401:0001:0101 cooja1
aaaa::0212:7402:0002:0202 cooja2
fd00::0212:7401:0001:0101 cooja1
fd00::0212:7402:0002:0202 cooja2
...
- Get the Copper (Cu) CoAP user-agent from
[https://addons.mozilla.org/en-US/firefox/addon/copper-270430](https://addons.mozilla.org/en-US/firefox/addon/copper-270430)
Expand Down Expand Up @@ -82,11 +82,11 @@ TMOTES HOWTO

3. Start Copper and discover resources at:

coap://[aaaa::____:____:____:____]:5683/
coap://[fd00::____:____:____:____]:5683/

### Add a client:

1. Change the hard-coded server address in er-example-client.c to aaaa::____:____:____:____
1. Change the hard-coded server address in er-example-client.c to fd00::____:____:____:____
2. Connect a third Tmote Sky

make TARGET=sky er-example-client.upload MOTE=3
Expand Down
2 changes: 1 addition & 1 deletion examples/hello-world/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ For example, using a loopback interface with the minimal-net platform:
make UIP_CONF_IPV6=1 TARGET=minimal-net
./hello-world.minimal-net
Hello, world
IPV6 Address: [aaaa::206:98ff:fe00:232]
IPV6 Address: [fd00::206:98ff:fe00:232]
IPV6 Address: [fe80::206:98ff:fe00:232]
^C

Expand Down
2 changes: 1 addition & 1 deletion examples/ipv6/json-ws/json-ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
static const char http_content_type_json[] = "application/json";

/* Maximum 40 chars in host name?: 5 x 8 */
static char callback_host[40] = "[aaaa::1]";
static char callback_host[40] = "[fd00::1]";
static uint16_t callback_port = CALLBACK_PORT;
static uint16_t callback_interval = SEND_INTERVAL;
static char callback_path[80] = "/debug/";
Expand Down
2 changes: 1 addition & 1 deletion examples/ipv6/multicast/root.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ set_own_addresses(void)
rpl_dag_t *dag;
uip_ipaddr_t ipaddr;

uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);

Expand Down
2 changes: 1 addition & 1 deletion examples/ipv6/multicast/sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ join_mcast_group(void)
uip_ds6_maddr_t *rv;

/* First, set our v6 global */
uip_ip6addr(&addr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&addr, &uip_lladdr);
uip_ds6_addr_add(&addr, 0, ADDR_AUTOCONF);

Expand Down
2 changes: 1 addition & 1 deletion examples/ipv6/native-border-router/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ CONTIKI_WITH_IPV6 = 1
include $(CONTIKI)/Makefile.include

connect-router: border-router.native
sudo ./border-router.native aaaa::1/64
sudo ./border-router.native fd00::1/64
2 changes: 1 addition & 1 deletion examples/ipv6/native-border-router/slip-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ slip_config_handle_arguments(int argc, char **argv)
case 'h':
default:
fprintf(stderr,"usage: %s [options] ipaddress\n", prog);
fprintf(stderr,"example: border-router.native -L -v2 -s ttyUSB1 aaaa::1/64\n");
fprintf(stderr,"example: border-router.native -L -v2 -s ttyUSB1 fd00::1/64\n");
fprintf(stderr,"Options are:\n");
#ifdef linux
fprintf(stderr," -B baudrate 9600,19200,38400,57600,115200,921600 (default 115200)\n");
Expand Down
2 changes: 1 addition & 1 deletion examples/ipv6/rpl-border-router/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ CFLAGS += -DWEBSERVER=2
endif

ifeq ($(PREFIX),)
PREFIX = aaaa::1/64
PREFIX = fd00::1/64
endif

CONTIKI_WITH_IPV6 = 1
Expand Down
4 changes: 2 additions & 2 deletions examples/ipv6/rpl-collect/udp-sender.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ set_global_address(void)
{
uip_ipaddr_t ipaddr;

uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);

/* set server address */
uip_ip6addr(&server_ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1);
uip_ip6addr(&server_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);

}
/*---------------------------------------------------------------------------*/
Expand Down
4 changes: 2 additions & 2 deletions examples/ipv6/rpl-collect/udp-sink.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ PROCESS_THREAD(udp_server_process, ev, data)
PRINTF("UDP server started\n");

#if UIP_CONF_ROUTER
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);
/* uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr); */
uip_ds6_addr_add(&ipaddr, 0, ADDR_MANUAL);
root_if = uip_ds6_addr_lookup(&ipaddr);
if(root_if != NULL) {
rpl_dag_t *dag;
dag = rpl_set_root(RPL_DEFAULT_INSTANCE,(uip_ip6addr_t *)&ipaddr);
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
rpl_set_prefix(dag, &ipaddr, 64);
PRINTF("created a new RPL dag\n");
} else {
Expand Down
12 changes: 6 additions & 6 deletions examples/ipv6/rpl-udp/udp-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ set_global_address(void)
{
uip_ipaddr_t ipaddr;

uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);

Expand All @@ -125,21 +125,21 @@ set_global_address(void)
* Obviously the choice made here must also be selected in udp-server.c.
*
* For correct Wireshark decoding using a sniffer, add the /64 prefix to the 6LowPAN protocol preferences,
* e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and then overwrites it.
* (Setting Context 0 to aaaa::1111:2222:3333:4444 will report a 16 bit compressed address of aaaa::1111:22ff:fe33:xxxx)
* e.g. set Context 0 to fd00::. At present Wireshark copies Context/128 and then overwrites it.
* (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit compressed address of fd00::1111:22ff:fe33:xxxx)
*
* Note the IPCMV6 checksum verification depends on the correct uncompressed addresses.
*/

#if 0
/* Mode 1 - 64 bits inline */
uip_ip6addr(&server_ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1);
uip_ip6addr(&server_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);
#elif 1
/* Mode 2 - 16 bits inline */
uip_ip6addr(&server_ipaddr, 0xaaaa, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
uip_ip6addr(&server_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
#else
/* Mode 3 - derived from server link-local (MAC) address */
uip_ip6addr(&server_ipaddr, 0xaaaa, 0, 0, 0, 0x0250, 0xc2ff, 0xfea8, 0xcd1a); //redbee-econotag
uip_ip6addr(&server_ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0x0250, 0xc2ff, 0xfea8, 0xcd1a); //redbee-econotag
#endif
}
/*---------------------------------------------------------------------------*/
Expand Down
12 changes: 6 additions & 6 deletions examples/ipv6/rpl-udp/udp-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,20 @@ PROCESS_THREAD(udp_server_process, ev, data)
* Obviously the choice made here must also be selected in udp-client.c.
*
* For correct Wireshark decoding using a sniffer, add the /64 prefix to the 6LowPAN protocol preferences,
* e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and then overwrites it.
* (Setting Context 0 to aaaa::1111:2222:3333:4444 will report a 16 bit compressed address of aaaa::1111:22ff:fe33:xxxx)
* e.g. set Context 0 to fd00::. At present Wireshark copies Context/128 and then overwrites it.
* (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit compressed address of fd00::1111:22ff:fe33:xxxx)
* Note Wireshark's IPCMV6 checksum verification depends on the correct uncompressed addresses.
*/

#if 0
/* Mode 1 - 64 bits inline */
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1);
#elif 1
/* Mode 2 - 16 bits inline */
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0x00ff, 0xfe00, 1);
#else
/* Mode 3 - derived from link local (MAC) address */
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
#endif

Expand All @@ -136,7 +136,7 @@ PROCESS_THREAD(udp_server_process, ev, data)
if(root_if != NULL) {
rpl_dag_t *dag;
dag = rpl_set_root(RPL_DEFAULT_INSTANCE,(uip_ip6addr_t *)&ipaddr);
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
rpl_set_prefix(dag, &ipaddr, 64);
PRINTF("created a new RPL dag\n");
} else {
Expand Down
4 changes: 2 additions & 2 deletions examples/ipv6/simple-udp-rpl/unicast-receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ set_global_address(void)
int i;
uint8_t state;

uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);

Expand Down Expand Up @@ -109,7 +109,7 @@ create_rpl_dag(uip_ipaddr_t *ipaddr)

rpl_set_root(RPL_DEFAULT_INSTANCE, ipaddr);
dag = rpl_get_any_dag();
uip_ip6addr(&prefix, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&prefix, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
rpl_set_prefix(dag, &prefix, 64);
PRINTF("created a new RPL dag\n");
} else {
Expand Down
2 changes: 1 addition & 1 deletion examples/ipv6/simple-udp-rpl/unicast-sender.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ set_global_address(void)
int i;
uint8_t state;

uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
uip_ip6addr(&ipaddr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);

Expand Down
4 changes: 2 additions & 2 deletions examples/ipv6/sky-websense/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c
(cd $(CONTIKI)/tools && $(MAKE) tunslip6)

connect-router: $(CONTIKI)/tools/tunslip6
sudo $(CONTIKI)/tools/tunslip6 aaaa::1/64
sudo $(CONTIKI)/tools/tunslip6 fd00::1/64

connect-router-cooja: $(CONTIKI)/tools/tunslip6
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 aaaa::1/64
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 fd00::1/64
4 changes: 2 additions & 2 deletions examples/ipv6/sky-websense/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ To test the example in COOJA under Linux
make connect-router-cooja

3. You should now be able to browse to the nodes using your web browser:
Router: http://[aaaa::0212:7401:0001:0101]/
Node 2: http://[aaaa::0212:7402:0002:0202]/
Router: http://[fd00::0212:7401:0001:0101]/
Node 2: http://[fd00::0212:7402:0002:0202]/


To run the example on real nodes under Linux
Expand Down
4 changes: 2 additions & 2 deletions examples/ipv6/sky-websense/websense-remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@
#include <stdio.h>

/* The address of the server to register the services for this node */
#define SERVER "[aaaa::1]"
#define SERVER "[fd00::1]"

/* This command registers two services (/0 and /1) to turn the leds on or off */
#define REGISTER_COMMAND "/r?p=0&d=Turn%20off%20leds&p=1&d=Turn%20on%20leds"

/* The address of the other node to control */
#define OTHER_NODE "[aaaa::1]"
#define OTHER_NODE "[fd00::1]"

/* The commands to send to the other node */
#define SET_LEDS_ON "/1"
Expand Down
Loading

0 comments on commit cd981b2

Please sign in to comment.