diff --git a/core/net/ipv6/sicslowpan.c b/core/net/ipv6/sicslowpan.c index 3b722d598fc2a3201fa9986e6d9f20a4e7963d90..de9d78181e3de1cda2f2c002f84cf91ccc07559b 100644 --- a/core/net/ipv6/sicslowpan.c +++ b/core/net/ipv6/sicslowpan.c @@ -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 */ diff --git a/core/net/ipv6/uip-ds6.h b/core/net/ipv6/uip-ds6.h index 1c00a50b056818aae10629e2f456ec0867b3669b..294eb230c944515fe86f172aa5a2abdc5ee41256 100644 --- a/core/net/ipv6/uip-ds6.h +++ b/core/net/ipv6/uip-ds6.h @@ -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 diff --git a/core/net/rpl/rpl-dag-root.c b/core/net/rpl/rpl-dag-root.c index efbdb40353dbf8e56833ff9367ad4c920f4d8dc0..d053a1a132412afcd341c84b8426d1ef45729bcf 100644 --- a/core/net/rpl/rpl-dag-root.c +++ b/core/net/rpl/rpl-dag-root.c @@ -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); @@ -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; diff --git a/cpu/native/net/wpcap.c b/cpu/native/net/wpcap.c index f32ba980f7ee3867f3024a6fc96b2376513299bd..301b07d91eaad584c596b2c5cdaeea1890a18d57 100644 --- a/cpu/native/net/wpcap.c +++ b/cpu/native/net/wpcap.c @@ -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 diff --git a/examples/cc2530dk/border-router/README.md b/examples/cc2530dk/border-router/README.md index ebb9545a203a776c3f7633352f6c6d85d8fe4976..8c5025c4d568aff34211b7d623955b3d0115a0f5 100644 --- a/examples/cc2530dk/border-router/README.md +++ b/examples/cc2530dk/border-router/README.md @@ -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. diff --git a/examples/cc2530dk/udp-ipv6/client.c b/examples/cc2530dk/udp-ipv6/client.c index 77d50b0df5c4a86e14049e1b1581d5bf04787fb7..065c070893917783bfbbd7b29fb420f4a3e5629c 100644 --- a/examples/cc2530dk/udp-ipv6/client.c +++ b/examples/cc2530dk/udp-ipv6/client.c @@ -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"); diff --git a/examples/cc2530dk/udp-ipv6/ping6.c b/examples/cc2530dk/udp-ipv6/ping6.c index e19a368955937281bf33082608ee9016277d289d..3f6fce89bcade6bcd0ba592c9bc36fe2f6d24546 100644 --- a/examples/cc2530dk/udp-ipv6/ping6.c +++ b/examples/cc2530dk/udp-ipv6/ping6.c @@ -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); diff --git a/examples/cc2530dk/udp-ipv6/server.c b/examples/cc2530dk/udp-ipv6/server.c index 0b61194aa11e662f3c86665ce0e9ee41b0ed0e85..ab381ccf5a6a7a409f9c7e82be0bb6ca722f1925 100644 --- a/examples/cc2530dk/udp-ipv6/server.c +++ b/examples/cc2530dk/udp-ipv6/server.c @@ -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); @@ -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); diff --git a/examples/cc2538-common/mqtt-demo/project-conf.h b/examples/cc2538-common/mqtt-demo/project-conf.h index 0aaef655dc8021011556178b3781de54b52e2b7b..bcdabff20b48a1755e3c110664a88794ba376b02 100644 --- a/examples/cc2538-common/mqtt-demo/project-conf.h +++ b/examples/cc2538-common/mqtt-demo/project-conf.h @@ -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_ */ /*---------------------------------------------------------------------------*/ diff --git a/examples/er-rest-example/Makefile b/examples/er-rest-example/Makefile index a20d814ee2ed614efb8b315748b003f6e7556947..817a83b9df8dce9c974e1438e7ddd1ebe8e0c40d 100644 --- a/examples/er-rest-example/Makefile +++ b/examples/er-rest-example/Makefile @@ -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 diff --git a/examples/er-rest-example/README.md b/examples/er-rest-example/README.md index fe82ed9b5f06ad4f2d826966bc51fb9e792627de..25abd60e4adeba20192dd99167216840bf58f7be 100644 --- a/examples/er-rest-example/README.md +++ b/examples/er-rest-example/README.md @@ -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) @@ -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 diff --git a/examples/hello-world/README.md b/examples/hello-world/README.md index c4cbd2c6e68736340a4edfa2a47a51254174df71..a92c242ab8e8c7d1d52334cbb89bde103c197c24 100644 --- a/examples/hello-world/README.md +++ b/examples/hello-world/README.md @@ -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 diff --git a/examples/ipv6/json-ws/json-ws.c b/examples/ipv6/json-ws/json-ws.c index 6c6177f16ea7b5f988e224786473b247cd36ecad..6a290a1949c873e3e1cf2f3d7d61aaf14b95dc49 100644 --- a/examples/ipv6/json-ws/json-ws.c +++ b/examples/ipv6/json-ws/json-ws.c @@ -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/"; diff --git a/examples/ipv6/multicast/root.c b/examples/ipv6/multicast/root.c index 0f27e7d1769fa2cc844b5041d2cebad59ef0fdb1..cb7d2b4a6f460620904249ebd5b66aaa14bd978a 100644 --- a/examples/ipv6/multicast/root.c +++ b/examples/ipv6/multicast/root.c @@ -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); diff --git a/examples/ipv6/multicast/sink.c b/examples/ipv6/multicast/sink.c index 4c272869a23be5a446755a9512075eb3ef1699c1..ea2ef1085fce0a9a3b821e28083f7f3bc3818b14 100644 --- a/examples/ipv6/multicast/sink.c +++ b/examples/ipv6/multicast/sink.c @@ -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); diff --git a/examples/ipv6/native-border-router/Makefile b/examples/ipv6/native-border-router/Makefile index d781ed35c65be67f928b75ff12e4da3127354923..dc60e18d9063b2d682a4e7783b0cc12e66e3e04a 100644 --- a/examples/ipv6/native-border-router/Makefile +++ b/examples/ipv6/native-border-router/Makefile @@ -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 diff --git a/examples/ipv6/native-border-router/slip-config.c b/examples/ipv6/native-border-router/slip-config.c index 84d256127c8e06369858cee75728f265d45348fb..782259f8c21b1a8c3bd11609bfe0a47e9a34cd73 100644 --- a/examples/ipv6/native-border-router/slip-config.c +++ b/examples/ipv6/native-border-router/slip-config.c @@ -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"); diff --git a/examples/ipv6/rpl-border-router/Makefile b/examples/ipv6/rpl-border-router/Makefile index ce90a4eace90e5e828a197e3aa60a4bb98d670da..6595186be556faa81ffb6e0bddc2a8f1cdf55b90 100644 --- a/examples/ipv6/rpl-border-router/Makefile +++ b/examples/ipv6/rpl-border-router/Makefile @@ -33,7 +33,7 @@ CFLAGS += -DWEBSERVER=2 endif ifeq ($(PREFIX),) - PREFIX = aaaa::1/64 + PREFIX = fd00::1/64 endif CONTIKI_WITH_IPV6 = 1 diff --git a/examples/ipv6/rpl-collect/udp-sender.c b/examples/ipv6/rpl-collect/udp-sender.c index dd279cc7f778d96194ecc0f470598b224e7c09ee..469d5e6f0ab831d70446e94c3b127e7bead30277 100644 --- a/examples/ipv6/rpl-collect/udp-sender.c +++ b/examples/ipv6/rpl-collect/udp-sender.c @@ -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); } /*---------------------------------------------------------------------------*/ diff --git a/examples/ipv6/rpl-collect/udp-sink.c b/examples/ipv6/rpl-collect/udp-sink.c index dbdde2d017d4e51f65ad05160e4d7baf6f59404d..7834c7cbc526239422ffc32caeef3badd26c26ef 100644 --- a/examples/ipv6/rpl-collect/udp-sink.c +++ b/examples/ipv6/rpl-collect/udp-sink.c @@ -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 { diff --git a/examples/ipv6/rpl-udp/udp-client.c b/examples/ipv6/rpl-udp/udp-client.c index c16b0ba4809e340933a8d8665bb41a2e1f731f1e..27970388010d250b47e55e2e5241e7cf77640734 100644 --- a/examples/ipv6/rpl-udp/udp-client.c +++ b/examples/ipv6/rpl-udp/udp-client.c @@ -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); @@ -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 } /*---------------------------------------------------------------------------*/ diff --git a/examples/ipv6/rpl-udp/udp-server.c b/examples/ipv6/rpl-udp/udp-server.c index b735d3bb2ab4bce585a5610db0cf167e97ae768c..17c1b1fb8a36de65d01c369c6688ab980249185d 100644 --- a/examples/ipv6/rpl-udp/udp-server.c +++ b/examples/ipv6/rpl-udp/udp-server.c @@ -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 @@ -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 { diff --git a/examples/ipv6/simple-udp-rpl/unicast-receiver.c b/examples/ipv6/simple-udp-rpl/unicast-receiver.c index 1100886b441d2ba1f154e25fafca6b41a549279f..7c6205daba96f25899373bf5687e7b708b2a79fa 100644 --- a/examples/ipv6/simple-udp-rpl/unicast-receiver.c +++ b/examples/ipv6/simple-udp-rpl/unicast-receiver.c @@ -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); @@ -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 { diff --git a/examples/ipv6/simple-udp-rpl/unicast-sender.c b/examples/ipv6/simple-udp-rpl/unicast-sender.c index 60cb91204c09f2f8df0a69a2da2f424f768d1355..f441ec728c8b0e4345382e74db98fff8223d9be2 100644 --- a/examples/ipv6/simple-udp-rpl/unicast-sender.c +++ b/examples/ipv6/simple-udp-rpl/unicast-sender.c @@ -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); diff --git a/examples/ipv6/sky-websense/Makefile b/examples/ipv6/sky-websense/Makefile index 17385c016e60125e48181be3728c264350008a38..7096128a42629dcebbc0d9453156eb0007733243 100644 --- a/examples/ipv6/sky-websense/Makefile +++ b/examples/ipv6/sky-websense/Makefile @@ -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 diff --git a/examples/ipv6/sky-websense/README.md b/examples/ipv6/sky-websense/README.md index 64e566b179427656b932de1ddc30f85905045a15..ab644f88734636b6380a4013ac3aa7dc8d97b37b 100644 --- a/examples/ipv6/sky-websense/README.md +++ b/examples/ipv6/sky-websense/README.md @@ -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 diff --git a/examples/ipv6/sky-websense/websense-remote.c b/examples/ipv6/sky-websense/websense-remote.c index 75737b4848b7245a3f2d7b00209ed81013a0a5b5..76fc7d0a7f6595cc1c98f3f903ad69959fdf8e52 100644 --- a/examples/ipv6/sky-websense/websense-remote.c +++ b/examples/ipv6/sky-websense/websense-remote.c @@ -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" diff --git a/examples/jn516x/rpl/README.md b/examples/jn516x/rpl/README.md index 39a213268942721b2197908a2f640d63abf5d8dd..fb8cd49b4190fb133716b290bc1f36b66caa6221 100644 --- a/examples/jn516x/rpl/README.md +++ b/examples/jn516x/rpl/README.md @@ -28,7 +28,7 @@ From a Linux terminal, go to `contiki/examples/jn516x/rpl/border-router` and do or `make connect-router-sw` if you have **SW flow control** This will start a tunnel interface (tun0) on the host machine. -All traffic towards our network (prefix aaaa::1/64) will now be routed to the border router. +All traffic towards our network (prefix fd00::1/64) will now be routed to the border router. ## RPL Node diff --git a/examples/jn516x/rpl/border-router/Makefile b/examples/jn516x/rpl/border-router/Makefile index de68ecde8e23921ee400fd85befc8e92ef71ec02..1904e5ce827636a83ceaf73d70b92d33b698aefb 100644 --- a/examples/jn516x/rpl/border-router/Makefile +++ b/examples/jn516x/rpl/border-router/Makefile @@ -14,7 +14,7 @@ CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\" PROJECT_SOURCEFILES += slip-bridge.c slip.c ifeq ($(PREFIX),) - PREFIX = aaaa::1/64 + PREFIX = fd00::1/64 endif include $(CONTIKI)/Makefile.include diff --git a/examples/jn516x/rpl/coap-dongle-node/dongle-node.c b/examples/jn516x/rpl/coap-dongle-node/dongle-node.c index ab5845dffe5f13c0277cc794a9a8185d7cca209a..2338346102ad5588193453612d5d8f349ae47286 100644 --- a/examples/jn516x/rpl/coap-dongle-node/dongle-node.c +++ b/examples/jn516x/rpl/coap-dongle-node/dongle-node.c @@ -33,6 +33,7 @@ */ #include "contiki.h" #include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "tools/rpl-tools.h" #include "rest-engine.h" #include "sys/ctimer.h" @@ -130,7 +131,7 @@ PROCESS_THREAD(start_app, ev, data) /* Start net stack */ if(is_coordinator) { uip_ipaddr_t prefix; - 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_tools_init(&prefix); } else { rpl_tools_init(NULL); diff --git a/examples/jn516x/rpl/coap-dr1175-node/dr1175-node.c b/examples/jn516x/rpl/coap-dr1175-node/dr1175-node.c index f377dc3b3b8c92e450b967934c468ef7467f70b0..641f3eca5a6c6e09d781598265aa281c40c90679 100644 --- a/examples/jn516x/rpl/coap-dr1175-node/dr1175-node.c +++ b/examples/jn516x/rpl/coap-dr1175-node/dr1175-node.c @@ -34,6 +34,7 @@ #include "contiki.h" #include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "tools/rpl-tools.h" #include "rest-engine.h" #include "light-sensor.h" @@ -350,7 +351,7 @@ PROCESS_THREAD(start_app, ev, data) /* Start net stack */ if(is_coordinator) { uip_ipaddr_t prefix; - 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_tools_init(&prefix); } else { rpl_tools_init(NULL); diff --git a/examples/jn516x/rpl/coap-dr1199-node/dr1199-node.c b/examples/jn516x/rpl/coap-dr1199-node/dr1199-node.c index 373922e5808b88fd3c9332f83fcf7278038e0438..933b247d6d702885c5bea4534ea9bfbd31dc1c0f 100644 --- a/examples/jn516x/rpl/coap-dr1199-node/dr1199-node.c +++ b/examples/jn516x/rpl/coap-dr1199-node/dr1199-node.c @@ -33,6 +33,7 @@ */ #include "contiki.h" #include "net/ip/uip.h" +#include "net/ipv6/uip-ds6.h" #include "tools/rpl-tools.h" #include "rest-engine.h" #include "dev/leds.h" @@ -351,7 +352,7 @@ PROCESS_THREAD(start_app, ev, data) /* Start net stack */ if(is_coordinator) { uip_ipaddr_t prefix; - 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_tools_init(&prefix); } else { rpl_tools_init(NULL); diff --git a/examples/jn516x/rpl/node/node.c b/examples/jn516x/rpl/node/node.c index 59b812357d0008ef3b629f5cac0da471b96d7c79..b6a6f3096eecd5582d5ffde2b344cdc59a394d13 100644 --- a/examples/jn516x/rpl/node/node.c +++ b/examples/jn516x/rpl/node/node.c @@ -36,6 +36,7 @@ */ #include "contiki.h" +#include "net/ipv6/uip-ds6.h" #include "net/rpl/rpl.h" #include "tools/rpl-tools.h" @@ -98,7 +99,7 @@ PROCESS_THREAD(node_process, ev, data) if(is_coordinator) { uip_ipaddr_t prefix; - 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_tools_init(&prefix); } else { rpl_tools_init(NULL); diff --git a/examples/mbxxx/mbxxx-websense/Makefile b/examples/mbxxx/mbxxx-websense/Makefile index 6239a70430188949062427655953451053116859..accb4e4126a2487e43bbbde2c201d8fae7ea8327 100644 --- a/examples/mbxxx/mbxxx-websense/Makefile +++ b/examples/mbxxx/mbxxx-websense/Makefile @@ -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 diff --git a/examples/mbxxx/udp-ipv6-sleep/udp-client.c b/examples/mbxxx/udp-ipv6-sleep/udp-client.c index 4408a2c1976dfea0b97c62c4acbcbda8678e9c87..3c6f7934de64f069e8b640537367df7606d19af4 100644 --- a/examples/mbxxx/udp-ipv6-sleep/udp-client.c +++ b/examples/mbxxx/udp-ipv6-sleep/udp-client.c @@ -107,7 +107,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); } @@ -123,7 +123,7 @@ set_connection_address(uip_ipaddr_t *ipaddr) PRINTF("UDP client failed to parse address '%s'\n", QUOTEME(UDP_CONNECTION_ADDR)); } #elif UIP_CONF_ROUTER - uip_ip6addr(ipaddr,0xaaaa,0,0,0,0x0280,0xe102,0x0000,0x008a); + uip_ip6addr(ipaddr,UIP_DS6_DEFAULT_PREFIX,0,0,0,0x0280,0xe102,0x0000,0x008a); #else uip_ip6addr(ipaddr,0xfe80,0,0,0,0x0280,0xe102,0x0000,0x008a); #endif /* UDP_CONNECTION_ADDR */ diff --git a/examples/mbxxx/udp-ipv6-sleep/udp-server.c b/examples/mbxxx/udp-ipv6-sleep/udp-server.c index 68fc1915c9ec9e347de5976708842918bf23b23a..78c6f9d3a8420290d4c4d0e21869152f542cc696 100644 --- a/examples/mbxxx/udp-ipv6-sleep/udp-server.c +++ b/examples/mbxxx/udp-ipv6-sleep/udp-server.c @@ -95,7 +95,7 @@ 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, 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); #endif /* UIP_CONF_ROUTER */ diff --git a/examples/servreg-hack/example-servreg-client.c b/examples/servreg-hack/example-servreg-client.c index 108d40aeb9f42a649fbfdb37c8fb2c472c7b3166..4557fab71682f0f0fda582717d146a930328dba8 100644 --- a/examples/servreg-hack/example-servreg-client.c +++ b/examples/servreg-hack/example-servreg-client.c @@ -54,7 +54,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); } diff --git a/examples/servreg-hack/example-servreg-server.c b/examples/servreg-hack/example-servreg-server.c index 01dd7175ac67da86d6d53a67a3c7b991c4aa4952..4ff70060c344aedcbc9b88983215686c6fb17306 100644 --- a/examples/servreg-hack/example-servreg-server.c +++ b/examples/servreg-hack/example-servreg-server.c @@ -53,7 +53,7 @@ PROCESS_THREAD(example_servreg_server_process, ev, data) PROCESS_BEGIN(); /* Set a global 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); uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); diff --git a/examples/udp-ipv6/udp-client.c b/examples/udp-ipv6/udp-client.c index 7f9b7659e00ee9a963f35e6aee4fbf10b31b54a8..85854a48ba23a157140a21106462f7476c081e77 100644 --- a/examples/udp-ipv6/udp-client.c +++ b/examples/udp-ipv6/udp-client.c @@ -98,7 +98,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); } @@ -111,7 +111,7 @@ set_connection_address(uip_ipaddr_t *ipaddr) #if RESOLV_CONF_SUPPORTS_MDNS #define UDP_CONNECTION_ADDR contiki-udp-server.local #elif UIP_CONF_ROUTER -#define UDP_CONNECTION_ADDR aaaa:0:0:0:0212:7404:0004:0404 +#define UDP_CONNECTION_ADDR fd00:0:0:0:0212:7404:0004:0404 #else #define UDP_CONNECTION_ADDR fe80:0:0:0:6466:6666:6666:6666 #endif diff --git a/examples/udp-ipv6/udp-server.c b/examples/udp-ipv6/udp-server.c index c56720f9ae83dd9a19820c01ee8924ad639b95de..eeb7de7000da24340d720c0f1f31b047bb8fcb99 100644 --- a/examples/udp-ipv6/udp-server.c +++ b/examples/udp-ipv6/udp-server.c @@ -99,7 +99,7 @@ PROCESS_THREAD(udp_server_process, ev, data) #endif #if UIP_CONF_ROUTER - 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); #endif /* UIP_CONF_ROUTER */ diff --git a/examples/udp-stream/udp-stream.c b/examples/udp-stream/udp-stream.c index c10e8d6a559df51e774ed9e07d89501e2b524fd9..875b594d80b404637a651fe637ecc4e8ce1de17c 100644 --- a/examples/udp-stream/udp-stream.c +++ b/examples/udp-stream/udp-stream.c @@ -74,7 +74,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); @@ -102,7 +102,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 { diff --git a/examples/webserver-ipv6/README.md b/examples/webserver-ipv6/README.md index ddeb5cb8782bb3cc7a771e5a58fae71a6150f4a8..fae6057a1732ab66b90ea7d360c743f9da7db9ac 100644 --- a/examples/webserver-ipv6/README.md +++ b/examples/webserver-ipv6/README.md @@ -41,7 +41,7 @@ On linux you can set up router advertisements as follows: - You might need to add a route: - ip -6 route add aaaa:0000:0000:0000:0206:98ff:fe00:0232/64 dev tap0 + ip -6 route add fd00: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. diff --git a/examples/zolertia/z1/ipv6/z1-websense/Makefile b/examples/zolertia/z1/ipv6/z1-websense/Makefile index 717802ae962e87c5f594bfdb945c773105dc34da..8db74458e591552c2d7feb30c3bdce01fa13a68c 100644 --- a/examples/zolertia/z1/ipv6/z1-websense/Makefile +++ b/examples/zolertia/z1/ipv6/z1-websense/Makefile @@ -18,10 +18,10 @@ $(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 CUSTOM_RULE_LINK=1 %.$(TARGET): %.co $(PROJECT_OBJECTFILES) $(PROJECT_LIBRARIES) contiki-$(TARGET).a $(LD) $(LDFLAGS) $(TARGET_STARTFILES) ${filter-out %.a,$^} ${filter %.a,$^} $(TARGET_LIBFILES) -o $@ -lm diff --git a/examples/zolertia/z1/ipv6/z1-websense/README.md b/examples/zolertia/z1/ipv6/z1-websense/README.md index af373adc68564920f4f81d96b8d0a0e7180523c1..82e7f34ee34f117da2e29f9aa386c1d764b4be2f 100644 --- a/examples/zolertia/z1/ipv6/z1-websense/README.md +++ b/examples/zolertia/z1/ipv6/z1-websense/README.md @@ -19,8 +19,8 @@ To test the example in COOJA under Linux 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 diff --git a/examples/zolertia/z1/ipv6/z1-websense/websense-remote.c b/examples/zolertia/z1/ipv6/z1-websense/websense-remote.c index 7cfebd3557c40aecdf6bf4f948ccf4ead2ca4d10..a6336260d796dba22c02fb6f59a69f6bc9ea62bc 100644 --- a/examples/zolertia/z1/ipv6/z1-websense/websense-remote.c +++ b/examples/zolertia/z1/ipv6/z1-websense/websense-remote.c @@ -45,13 +45,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::212:7403:3:303" +#define OTHER_NODE "fd00::212:7403:3:303" /* The commands to send to the other node */ #define SET_LEDS_ON "/1" diff --git a/platform/avr-atmega128rfa1/apps/raven-ipso/raven-ipso.c b/platform/avr-atmega128rfa1/apps/raven-ipso/raven-ipso.c index 214a64efe2421fe1c6b24111ec38c9722b1b3e72..04802951a828ea84769b52ab2c8ee4bba898a24c 100644 --- a/platform/avr-atmega128rfa1/apps/raven-ipso/raven-ipso.c +++ b/platform/avr-atmega128rfa1/apps/raven-ipso/raven-ipso.c @@ -95,7 +95,7 @@ raven_ping6(void) /* ping ipv6.google.com*/ uip_ip6addr(&ping_addr,0x2001,0x420,0x5FFF,0x7D,0x2D0,0xB7FF,0xFE23,0xE6DB); //uip_ip6addr(&ping_addr, 0x2001, 0x4860, 0, 0x2001, 0, 0, 0, 0x68); - //uip_ip6addr(&ping_addr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1); + //uip_ip6addr(&ping_addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1); UIP_IP_BUF->vtc = 0x60; UIP_IP_BUF->tcflow = 1; diff --git a/platform/avr-atmega128rfa1/contiki-conf.h b/platform/avr-atmega128rfa1/contiki-conf.h index 9dfbd9518b7c51066d41cce71bc61f02de861799..9cad6d3b8c8af1c9a6f050b7ac0d3fa66ac074ee 100644 --- a/platform/avr-atmega128rfa1/contiki-conf.h +++ b/platform/avr-atmega128rfa1/contiki-conf.h @@ -151,10 +151,10 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_LLH_LEN 0 /* 10 bytes per stateful address context - see sicslowpan.c */ -/* Default is 1 context with prefix aaaa::/64 */ +/* Default is 1 context with prefix fd00::/64 */ /* These must agree with all the other nodes or there will be a failure to communicate! */ #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1 -#define SICSLOWPAN_CONF_ADDR_CONTEXT_0 {addr_contexts[0].prefix[0]=0xaa;addr_contexts[0].prefix[1]=0xaa;} +#define SICSLOWPAN_CONF_ADDR_CONTEXT_0 {addr_contexts[0].prefix[0]=UIP_DS6_DEFAULT_PREFIX_0;addr_contexts[0].prefix[1]=UIP_DS6_DEFAULT_PREFIX_1;} #define SICSLOWPAN_CONF_ADDR_CONTEXT_1 {addr_contexts[1].prefix[0]=0xbb;addr_contexts[1].prefix[1]=0xbb;} #define SICSLOWPAN_CONF_ADDR_CONTEXT_2 {addr_contexts[2].prefix[0]=0x20;addr_contexts[2].prefix[1]=0x01;addr_contexts[2].prefix[2]=0x49;addr_contexts[2].prefix[3]=0x78,addr_contexts[2].prefix[4]=0x1d;addr_contexts[2].prefix[5]=0xb1;} diff --git a/platform/avr-atmega128rfa1/contiki-main.c b/platform/avr-atmega128rfa1/contiki-main.c index 8d2d8f9b7d37e38afa761a79d9e9a051155cee4c..ec22d58f63b98ddbe21ac9eaa6981045e77dd0c4 100644 --- a/platform/avr-atmega128rfa1/contiki-main.c +++ b/platform/avr-atmega128rfa1/contiki-main.c @@ -340,7 +340,7 @@ uint8_t i; #if 0 { 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); uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); // uip_ds6_prefix_add(&ipaddr,64,0); } diff --git a/platform/avr-raven/apps/raven-ipso/raven-ipso.c b/platform/avr-raven/apps/raven-ipso/raven-ipso.c index 2b51ac519d711108e0c860f2dde94c93113e6786..5779e814bd8677357db426e7aff49ad18f16eedf 100644 --- a/platform/avr-raven/apps/raven-ipso/raven-ipso.c +++ b/platform/avr-raven/apps/raven-ipso/raven-ipso.c @@ -95,7 +95,7 @@ raven_ping6(void) /* ping ipv6.google.com*/ uip_ip6addr(&ping_addr,0x2001,0x420,0x5FFF,0x7D,0x2D0,0xB7FF,0xFE23,0xE6DB); //uip_ip6addr(&ping_addr, 0x2001, 0x4860, 0, 0x2001, 0, 0, 0, 0x68); - //uip_ip6addr(&ping_addr, 0xaaaa, 0, 0, 0, 0, 0, 0, 1); + //uip_ip6addr(&ping_addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 1); UIP_IP_BUF->vtc = 0x60; UIP_IP_BUF->tcflow = 1; diff --git a/platform/avr-raven/contiki-conf.h b/platform/avr-raven/contiki-conf.h index aa97db2e57f6b447d250f6b543d85b088e29a0a1..ab770540d0d3326a1ce3926051042471fad78b65 100644 --- a/platform/avr-raven/contiki-conf.h +++ b/platform/avr-raven/contiki-conf.h @@ -167,10 +167,10 @@ typedef unsigned short uip_stats_t; #define UIP_CONF_LLH_LEN 0 /* 10 bytes per stateful address context - see sicslowpan.c */ -/* Default is 1 context with prefix aaaa::/64 */ +/* Default is 1 context with prefix fd00::/64 */ /* These must agree with all the other nodes or there will be a failure to communicate! */ #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1 -#define SICSLOWPAN_CONF_ADDR_CONTEXT_0 {addr_contexts[0].prefix[0]=0xaa;addr_contexts[0].prefix[1]=0xaa;} +#define SICSLOWPAN_CONF_ADDR_CONTEXT_0 {addr_contexts[0].prefix[0]=UIP_DS6_DEFAULT_PREFIX_0;addr_contexts[0].prefix[1]=UIP_DS6_DEFAULT_PREFIX_1;} #define SICSLOWPAN_CONF_ADDR_CONTEXT_1 {addr_contexts[1].prefix[0]=0xbb;addr_contexts[1].prefix[1]=0xbb;} #define SICSLOWPAN_CONF_ADDR_CONTEXT_2 {addr_contexts[2].prefix[0]=0x20;addr_contexts[2].prefix[1]=0x01;addr_contexts[2].prefix[2]=0x49;addr_contexts[2].prefix[3]=0x78,addr_contexts[2].prefix[4]=0x1d;addr_contexts[2].prefix[5]=0xb1;} diff --git a/platform/avr-raven/contiki-raven-default-init-net.c b/platform/avr-raven/contiki-raven-default-init-net.c index 61fc23213e9597aed3d886467842aa5c58d5672a..ca29e34fb13c292fe9543d77f87e6f0b01795647 100644 --- a/platform/avr-raven/contiki-raven-default-init-net.c +++ b/platform/avr-raven/contiki-raven-default-init-net.c @@ -44,7 +44,7 @@ init_net(void) /* uip_ipaddr_t ipprefix; - uip_ip6addr(&ipprefix, 0xaaaa, 0, 0, 0, 0, 0, 0, 0); + uip_ip6addr(&ipprefix, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 0); uip_netif_addr_add(&ipprefix, UIP_DEFAULT_PREFIX_LEN, 0, AUTOCONF); uip_nd6_prefix_add(&ipprefix, UIP_DEFAULT_PREFIX_LEN, 0); diff --git a/platform/avr-raven/contiki-raven-main.c b/platform/avr-raven/contiki-raven-main.c index 723bd943666d821e91c3d22bc438d569df9dc80a..274bdf2ffc480a051faf1a038d5f139bbae30c84 100644 --- a/platform/avr-raven/contiki-raven-main.c +++ b/platform/avr-raven/contiki-raven-main.c @@ -357,7 +357,7 @@ uint8_t i; #if 0 { 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); uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); // uip_ds6_prefix_add(&ipaddr,64,0); } diff --git a/platform/avr-ravenusb/contiki-conf.h b/platform/avr-ravenusb/contiki-conf.h index c6cab8c549b1599315470ab0f4aa789bd174ad85..71d56e248de54b7cdbd64cafa5d5abd7b991f273 100644 --- a/platform/avr-ravenusb/contiki-conf.h +++ b/platform/avr-ravenusb/contiki-conf.h @@ -236,10 +236,10 @@ extern void mac_log_802_15_4_rx(const uint8_t* buffer, size_t total_len); #define UIP_CONF_BUFSIZE UIP_LINK_MTU + UIP_LLH_LEN + 4 /* +4 for vlan on macosx */ /* 10 bytes per stateful address context - see sicslowpan.c */ -/* Default is 1 context with prefix aaaa::/64 */ +/* Default is 1 context with prefix fd00::/64 */ /* These must agree with all the other nodes or there will be a failure to communicate! */ #//define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1 -#define SICSLOWPAN_CONF_ADDR_CONTEXT_0 {addr_contexts[0].prefix[0]=0xaa;addr_contexts[0].prefix[1]=0xaa;} +#define SICSLOWPAN_CONF_ADDR_CONTEXT_0 {addr_contexts[0].prefix[0]=UIP_DS6_DEFAULT_PREFIX_0;addr_contexts[0].prefix[1]=UIP_DS6_DEFAULT_PREFIX_1;} #define SICSLOWPAN_CONF_ADDR_CONTEXT_1 {addr_contexts[1].prefix[0]=0xbb;addr_contexts[1].prefix[1]=0xbb;} #define SICSLOWPAN_CONF_ADDR_CONTEXT_2 {addr_contexts[2].prefix[0]=0x20;addr_contexts[2].prefix[1]=0x01;addr_contexts[2].prefix[2]=0x49;addr_contexts[2].prefix[3]=0x78,addr_contexts[2].prefix[4]=0x1d;addr_contexts[2].prefix[5]=0xb1;} diff --git a/platform/cc2530dk/contiki-conf.h b/platform/cc2530dk/contiki-conf.h index 5d3beb6bbd3e2d33814a59c9360e507ea19e971d..9c79aa82854bcc15735a7152d8c8876ee08ce756 100644 --- a/platform/cc2530dk/contiki-conf.h +++ b/platform/cc2530dk/contiki-conf.h @@ -259,8 +259,8 @@ /* Define our IPv6 prefixes/contexts here */ #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1 #define SICSLOWPAN_CONF_ADDR_CONTEXT_0 { \ - 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; \ } #define MAC_CONF_CHANNEL_CHECK_RATE 8 diff --git a/platform/cc2538dk/README.md b/platform/cc2538dk/README.md index 998a574b362ca5736d57b05cb445afa4128e982b..4bcb2c6f4962a2555de9904465e86fd8e823086d 100644 --- a/platform/cc2538dk/README.md +++ b/platform/cc2538dk/README.md @@ -308,14 +308,14 @@ Start by building a border router from `examples/ipv6/rpl-border-router` * Connect device to Linux or OS X over its XDS port. * `cd $(CONTIKI)/tools` * `make tunslip6` - * `sudo $(CONTIKI)/tools/tunslip6 -s /dev/<device> aaaa::1/64` + * `sudo $(CONTIKI)/tools/tunslip6 -s /dev/<device> fd00::1/64` * The router will print its own IPv6 address. Use it below. Got configuration message of type P - Setting prefix aaaa:: + Setting prefix fd00:: created a new RPL dag Server IPv6 addresses: - aaaa::212:4b00:89ab:cdef + fd00::212:4b00:89ab:cdef fe80::212:4b00:89ab:cdef * `ping6 <address>` diff --git a/platform/cc2538dk/contiki-conf.h b/platform/cc2538dk/contiki-conf.h index 34a7f1673154b678b3b5b77898bf7fecc75ec99e..ad9aafeeb4f78f2cd5eda3ad72e44a6365fd0ea8 100644 --- a/platform/cc2538dk/contiki-conf.h +++ b/platform/cc2538dk/contiki-conf.h @@ -472,8 +472,8 @@ typedef uint32_t rtimer_clock_t; #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1 #ifndef SICSLOWPAN_CONF_ADDR_CONTEXT_0 #define SICSLOWPAN_CONF_ADDR_CONTEXT_0 { \ - 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 diff --git a/platform/cooja-ip64/contiki-cooja-ip64-main.c b/platform/cooja-ip64/contiki-cooja-ip64-main.c index 3bc94f8646a326a1631e8ba2c4ba49c2602d04fc..02576a3bea730d82f497972f0706a0e5be5e4d17 100644 --- a/platform/cooja-ip64/contiki-cooja-ip64-main.c +++ b/platform/cooja-ip64/contiki-cooja-ip64-main.c @@ -217,7 +217,7 @@ contiki_init(void) printf("%02x%02x\n", lladdr->ipaddr.u8[14], lladdr->ipaddr.u8[15]); - 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_TENTATIVE); printf("Tentative global IPv6 address "); diff --git a/platform/cooja/contiki-cooja-main.c b/platform/cooja/contiki-cooja-main.c index f251c9178a3d801976694029445e9172d980f511..40dd49d1c6780282056ebdfceed88feecdf40509 100644 --- a/platform/cooja/contiki-cooja-main.c +++ b/platform/cooja/contiki-cooja-main.c @@ -304,7 +304,7 @@ contiki_init() if(1) { uip_ipaddr_t ipaddr; int i; - 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_TENTATIVE); printf("Tentative global IPv6 address "); diff --git a/platform/ev-aducrf101mkxz/README.md b/platform/ev-aducrf101mkxz/README.md index a4cf4dcb4de9f67b27e70af3516ed5b6fc7264ba..5dd7c5b06597945f427035ca5c8e4f3745d42975 100644 --- a/platform/ev-aducrf101mkxz/README.md +++ b/platform/ev-aducrf101mkxz/README.md @@ -71,9 +71,9 @@ the SLIP tunnel on the host machine: sudo contiki/tools/tunslip6 \ -s /dev/serial/by-id/usb-SEGGER_J-Link_000541011111-if00 \ - -B 115200 -v3 aaaa::1/64 + -B 115200 -v3 fd00::1/64 -Open the border router's home page at: http://[aaaa::3230:3030:3132:3334]/ +Open the border router's home page at: http://[fd00::3230:3030:3132:3334]/ #### Web Server #### @@ -90,7 +90,7 @@ router: adi-cm3sd/cm3sd.py -a contiki/examples/webserver-ipv6/webserver6.ev-aducrf101mkxz.hex \ /dev/serial/by-id/usb-SEGGER_J-Link_000541022222-if00 -Open the web server's home page at: http://[aaaa::3230:3030:3536:3738]/ +Open the web server's home page at: http://[fd00::3230:3030:3536:3738]/ On Windows: ----------- diff --git a/platform/eval-adf7xxxmb4z/README.md b/platform/eval-adf7xxxmb4z/README.md index 1faa1a6254f4ba13559d6081707ebaf7042694df..dc023e7662e64d368cb563bf8b5ebc662195e8ff 100644 --- a/platform/eval-adf7xxxmb4z/README.md +++ b/platform/eval-adf7xxxmb4z/README.md @@ -51,9 +51,9 @@ Build and run the SLIP tunnel on the host machine. Here it is assumed that the Secondary UART USB port (J3) is attached to /dev/ttyUSB1: make -C contiki/tools tunslip6 - sudo contiki/tools/tunslip6 -B 38400 -s /dev/ttyUSB1 -v3 aaaa::1/64 + sudo contiki/tools/tunslip6 -B 38400 -s /dev/ttyUSB1 -v3 fd00::1/64 -Open the border router home page at http://[aaaa::302:304:506:708]/ +Open the border router home page at http://[fd00::302:304:506:708]/ Build and run the IPv6 web server example on another eval board. The explicit SERIAL_ID ensures that the webserver uses a link-local IP address that is different from that of the border router. @@ -61,7 +61,7 @@ The explicit SERIAL_ID ensures that the webserver uses a link-local IP address t make -C contiki/examples/webserver-ipv6 TARGET=eval-adf7xxxmb4z SERIAL_ID='"\x01\x02\x03\x04\x05\x06\x07\x09"' webserver6.eval-adf7xxxmb4z.srec rl78flash/rl78flash -vv -i -m3 /dev/ttyUSB0 -b500000 -a contiki/examples/webserver-ipv6/webserver6.eval-adf7xxxmb4z.srec -Open the web server's home page at http://[aaaa::7a30:3178:3032:7830] +Open the web server's home page at http://[fd00::7a30:3178:3032:7830] On Windows: diff --git a/platform/exp5438/contiki-exp5438-main.c b/platform/exp5438/contiki-exp5438-main.c index 2f85f6ba27de8b62b4c6a3da2a57b8b008bb1400..321bb91713352051df1e53b72b2ea530502325db 100644 --- a/platform/exp5438/contiki-exp5438-main.c +++ b/platform/exp5438/contiki-exp5438-main.c @@ -236,7 +236,7 @@ main(int argc, char **argv) if(!UIP_CONF_IPV6_RPL) { uip_ipaddr_t ipaddr; int i; - 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_TENTATIVE); printf("Tentative global IPv6 address "); diff --git a/platform/jn516x/contiki-jn516x-main.c b/platform/jn516x/contiki-jn516x-main.c index 8c88a10df0020e75c4373cd0805310b858379e57..171b94a2a61ce766baae946d26168c402849e4d0 100644 --- a/platform/jn516x/contiki-jn516x-main.c +++ b/platform/jn516x/contiki-jn516x-main.c @@ -226,7 +226,7 @@ start_uip6(void) if(!UIP_CONF_IPV6_RPL) { uip_ipaddr_t ipaddr; int i; - 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_TENTATIVE); PRINTF("Tentative global IPv6 address "); diff --git a/platform/mbxxx/contiki-main.c b/platform/mbxxx/contiki-main.c index c383b0f610f8772921864e519d4ee372d565cded..700fbb5ccedcd6a85915a9e4522a5144bb8e5ca4 100644 --- a/platform/mbxxx/contiki-main.c +++ b/platform/mbxxx/contiki-main.c @@ -214,7 +214,7 @@ main(void) if(!UIP_CONF_IPV6_RPL) { uip_ipaddr_t ipaddr; int i; - 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_TENTATIVE); printf("Tentative global IPv6 address "); diff --git a/platform/micaz/init-net.c b/platform/micaz/init-net.c index 271b402c8bfc1ab04f66fb3dd10906a90d2a2130..9c09fe4ae568a735d731f537948612ecbd6cad03 100644 --- a/platform/micaz/init-net.c +++ b/platform/micaz/init-net.c @@ -177,7 +177,7 @@ init_net(void) if(!UIP_CONF_IPV6_RPL) { uip_ipaddr_t ipaddr; int i; - 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_TENTATIVE); printf_P(PSTR("Tentative global IPv6 address ")); diff --git a/platform/minimal-net/contiki-main.c b/platform/minimal-net/contiki-main.c index 35b466a39b784f30d49630d2e0a37a66e1467e74..90d700876b36aac6ff7229c3671cad8a7b5ce605 100644 --- a/platform/minimal-net/contiki-main.c +++ b/platform/minimal-net/contiki-main.c @@ -289,7 +289,7 @@ main(int argc, char **argv) #ifdef HARD_CODED_ADDRESS uiplib_ipaddrconv(HARD_CODED_ADDRESS, &ipaddr); #else - 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); #endif if((ipaddr.u16[0] != 0) || (ipaddr.u16[1] != 0) || diff --git a/platform/sky/contiki-sky-main.c b/platform/sky/contiki-sky-main.c index ea3afd93a4040adb5b840e5b4af19ecd3f0e48b6..7fe0339007c0c27f3ac1fa09f1e490f9d1c3e836 100644 --- a/platform/sky/contiki-sky-main.c +++ b/platform/sky/contiki-sky-main.c @@ -330,7 +330,7 @@ main(int argc, char **argv) if(!UIP_CONF_IPV6_RPL) { uip_ipaddr_t ipaddr; int i; - 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_TENTATIVE); PRINTF("Tentative global IPv6 address "); diff --git a/platform/wismote/contiki-wismote-main.c b/platform/wismote/contiki-wismote-main.c index d65ccaf1eade12b068d364a5902db602b82b51a9..f2a41a48e6428e616c4154111a08130c50a15889 100644 --- a/platform/wismote/contiki-wismote-main.c +++ b/platform/wismote/contiki-wismote-main.c @@ -324,7 +324,7 @@ main(int argc, char **argv) if(!UIP_CONF_IPV6_RPL) { uip_ipaddr_t ipaddr; int i; - 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_TENTATIVE); printf("Tentative global IPv6 address "); diff --git a/platform/z1/contiki-z1-main.c b/platform/z1/contiki-z1-main.c index 45e97bde91fe0a5c27db8cb38618c163d0c6015f..477bab9753c47067afeda5f3313b7bbdb37fdec1 100644 --- a/platform/z1/contiki-z1-main.c +++ b/platform/z1/contiki-z1-main.c @@ -345,7 +345,7 @@ main(int argc, char **argv) if(!UIP_CONF_IPV6_RPL) { uip_ipaddr_t ipaddr; int i; - 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_TENTATIVE); printf("Tentative global IPv6 address "); diff --git a/platform/zoul/contiki-conf.h b/platform/zoul/contiki-conf.h index cef99108c961a0a89e3addd276ff23d1f35ece08..52cd22dfd0228a0ead378ed4e3949631413349ad 100644 --- a/platform/zoul/contiki-conf.h +++ b/platform/zoul/contiki-conf.h @@ -540,8 +540,8 @@ typedef uint32_t rtimer_clock_t; #define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1 #ifndef SICSLOWPAN_CONF_ADDR_CONTEXT_0 #define SICSLOWPAN_CONF_ADDR_CONTEXT_0 { \ - 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 diff --git a/regression-tests/11-ipv6/code/receiver/udp-receiver.c b/regression-tests/11-ipv6/code/receiver/udp-receiver.c index 564c2672ee4cb803b68577e14cf6603d3b4952b1..e84c57637db43b12c344037d1328633c7815c1f7 100644 --- a/regression-tests/11-ipv6/code/receiver/udp-receiver.c +++ b/regression-tests/11-ipv6/code/receiver/udp-receiver.c @@ -39,7 +39,7 @@ PROCESS_THREAD(udp_process, ev, data) PROCESS_BEGIN(); - uip_ip6addr(&addr, 0xaaaa, 0, 0, 0, 0, 0, 0, 2); + uip_ip6addr(&addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 2); uip_ds6_addr_add(&addr, 0, ADDR_AUTOCONF); simple_udp_register(&broadcast_connection, UDP_PORT, diff --git a/regression-tests/11-ipv6/code/sender/unicast-sender.c b/regression-tests/11-ipv6/code/sender/unicast-sender.c index 071e3ac37ec583e09eb4afb11383693b2053c545..10a1399861b4fe9fe37ee081fcec97476ab574c0 100644 --- a/regression-tests/11-ipv6/code/sender/unicast-sender.c +++ b/regression-tests/11-ipv6/code/sender/unicast-sender.c @@ -40,12 +40,12 @@ PROCESS_THREAD(udp_process, ev, data) PROCESS_BEGIN(); - uip_ip6addr(&addr, 0xaaaa, 0, 0, 0, 0, 0, 0, 3); + uip_ip6addr(&addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 3); uip_ds6_addr_add(&addr, 0, ADDR_AUTOCONF); rpl_set_root(RPL_DEFAULT_INSTANCE, &addr); /* 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);*/ @@ -63,7 +63,7 @@ PROCESS_THREAD(udp_process, ev, data) etimer_reset(&periodic_timer); printf("Sending unicast\n"); - uip_ip6addr(&addr, 0xaaaa, 0, 0, 0, 0, 0, 0, 2); + uip_ip6addr(&addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0, 0, 0, 2); simple_udp_sendto(&broadcast_connection, buf, sizeof(buf), &addr); } diff --git a/regression-tests/12-rpl/code/receiver-node.c b/regression-tests/12-rpl/code/receiver-node.c index 4ba3cb1488e7623682cfa79d67b6258a8c0142b9..727a23f841f8c2a37596a9959cc03874787de865 100644 --- a/regression-tests/12-rpl/code/receiver-node.c +++ b/regression-tests/12-rpl/code/receiver-node.c @@ -73,7 +73,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); diff --git a/regression-tests/12-rpl/code/root-node.c b/regression-tests/12-rpl/code/root-node.c index 0609e1bd8eedd76c2756029843b0fda860693bf6..fdea828f8f103c4399b47199598c00c45f140224 100644 --- a/regression-tests/12-rpl/code/root-node.c +++ b/regression-tests/12-rpl/code/root-node.c @@ -77,7 +77,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); @@ -106,7 +106,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 { diff --git a/regression-tests/12-rpl/code/sender-node.c b/regression-tests/12-rpl/code/sender-node.c index 08d81b62dc62a5184a57a46d4b855bd9c31e8f85..55dfdd15fd60fae44871fb03b1eec0c4fc9e0ac8 100644 --- a/regression-tests/12-rpl/code/sender-node.c +++ b/regression-tests/12-rpl/code/sender-node.c @@ -72,7 +72,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); @@ -109,7 +109,7 @@ PROCESS_THREAD(sender_node_process, ev, data) PROCESS_WAIT_EVENT_UNTIL(etimer_expired(&send_timer)); - uip_ip6addr(&addr, 0xaaaa, 0, 0, 0, 0x0201, 0x001, 0x001, 0x001); + uip_ip6addr(&addr, UIP_DS6_DEFAULT_PREFIX, 0, 0, 0, 0x0201, 0x001, 0x001, 0x001); { static unsigned int message_number; diff --git a/regression-tests/13-ipv6-apps/x02-sky-coap.csc b/regression-tests/13-ipv6-apps/x02-sky-coap.csc index ad3155f3dce1245e62eed4ca71f5823aad33d27a..d3d284a2d8f0ba123fe7fe62d1ad8857fd8e7ecc 100644 --- a/regression-tests/13-ipv6-apps/x02-sky-coap.csc +++ b/regression-tests/13-ipv6-apps/x02-sky-coap.csc @@ -181,14 +181,14 @@ PROCESS_CONF_NO_PROCESS_NAMES=1 The test script communicates with the REST server via the RPL border router using external commands. (* $ make connect-router-cooja) -* $ ping6 -c 10 -I tun0 aaaa::212:7401:1:101 -* $ ping6 -c 10 -I tun0 aaaa::212:7402:2:202 -* $ wget -t 1 -T 10 -O - http://[aaaa::212:7402:2:202] +* $ ping6 -c 10 -I tun0 fd00::212:7401:1:101 +* $ ping6 -c 10 -I tun0 fd00::212:7402:2:202 +* $ wget -t 1 -T 10 -O - http://[fd00::212:7402:2:202] The final test uses the CoAP Java implementation by Matthias Kovatsch, downloaded from: https://github.com/mkovatsc/Californium/blob/master/run/ExampleClient.jar -* $ java -jar ExampleClient.jar DISCOVER coap://[aaaa::212:7402:2:202] -* $ java -jar ExampleClient.jar GET coap://[aaaa::212:7402:2:202]/hello</notes> +* $ java -jar ExampleClient.jar DISCOVER coap://[fd00::212:7402:2:202] +* $ java -jar ExampleClient.jar GET coap://[fd00::212:7402:2:202]/hello</notes> <decorations>true</decorations> </plugin_config> <width>751</width> diff --git a/tools/sky/uip6-bridge/Makefile b/tools/sky/uip6-bridge/Makefile index 492dc9b771557363b4e9347787c4650ecc9ce48b..11fa74356332dd45a2b902cc44d94ada9b64fbd9 100644 --- a/tools/sky/uip6-bridge/Makefile +++ b/tools/sky/uip6-bridge/Makefile @@ -36,5 +36,5 @@ connect: ../../tapslip6 bridge: @sudo service radvd restart || echo radvd could not be restarted - sudo route add -6 aaaa::/64 tap0 - sudo ip -6 address add aaaa::1/64 dev tap0 + sudo route add -6 fd00::/64 tap0 + sudo ip -6 address add fd00::1/64 dev tap0 diff --git a/tools/stm32w/wpcapslip6/README.md b/tools/stm32w/wpcapslip6/README.md index f3c277efbc71f57e1372b2282bf7d9564bd8119d..63bb6dccdf3f20d83e6ec5186cabe29294fcc17c 100644 --- a/tools/stm32w/wpcapslip6/README.md +++ b/tools/stm32w/wpcapslip6/README.md @@ -14,9 +14,9 @@ rpl-border-router (the latter on Windows Vista and later only). An example of usage with the RPL border router: - wpcapslip6 -s COMXX -b aaaa:: -a aaaa:1::1/128 02-00-00-00-00-01 + wpcapslip6 -s COMXX -b fd00:: -a fd00:1::1/128 02-00-00-00-00-01 where 02-00-00-00-00-01 is the MAC address of the local network adapter. --a aaaa:1::1/128 can be omitted if an IP address is already set to the network +-a fd00:1::1/128 can be omitted if an IP address is already set to the network adapter. diff --git a/tools/tunslip6.c b/tools/tunslip6.c index 369f16ec8584f7156cba0bb10eea17c3ccbcafe0..49019a66b8bc7c9e8aab464cf2fded8b4d6b2a37 100644 --- a/tools/tunslip6.c +++ b/tools/tunslip6.c @@ -837,7 +837,7 @@ main(int argc, char **argv) case 'h': default: fprintf(stderr,"usage: %s [options] ipaddress\n", prog); -fprintf(stderr,"example: tunslip6 -L -v2 -s ttyUSB1 aaaa::1/64\n"); +fprintf(stderr,"example: tunslip6 -L -v2 -s ttyUSB1 fd00::1/64\n"); fprintf(stderr,"Options are:\n"); #ifndef __APPLE__ fprintf(stderr," -B baudrate 9600,19200,38400,57600,115200 (default),230400,460800,921600\n");