Fix the leftover mentions of aaaa as a prefix to be UIP_DS6_DEFAULT_PREFIX (now fd00)

This commit is contained in:
Mohamed Seliem 2016-12-02 19:01:18 +02:00 committed by Mohamed seliem
parent 9ccc1697cf
commit 82b5fb5073
8 changed files with 30 additions and 30 deletions

View file

@ -172,7 +172,7 @@ set_global_address(void)
{ {
uip_ipaddr_t ipaddr; 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_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
@ -183,23 +183,23 @@ set_global_address(void)
* *
* For correct Wireshark decoding using a sniffer, add the /64 prefix to the * For correct Wireshark decoding using a sniffer, add the /64 prefix to the
* 6LowPAN protocol preferences, * 6LowPAN protocol preferences,
* e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and * e.g. set Context 0 to fd00::. At present Wireshark copies Context/128 and
* then overwrites it. * then overwrites it.
* (Setting Context 0 to aaaa::1111:2222:3333:4444 will report a 16 bit * (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit
* compressed address of aaaa::1111:22ff:fe33:xxxx) * compressed address of fd00::1111:22ff:fe33:xxxx)
* *
* Note the IPCMV6 checksum verification depends on the correct uncompressed addresses. * Note the IPCMV6 checksum verification depends on the correct uncompressed addresses.
*/ */
#if 0 #if 0
/* Mode 1 - 64 bits inline */ /* 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 #elif 1
/* Mode 2 - 16 bits inline */ /* 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 #else
/* Mode 3 - derived from server link-local (MAC) address */ /* 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 #endif
/* Voravit Added */ /* Voravit Added */
/* PRINTF("VORAVIT CLIENT: SERVER IPv6 addresses: \n"); */ /* PRINTF("VORAVIT CLIENT: SERVER IPv6 addresses: \n"); */

View file

@ -227,21 +227,21 @@ PROCESS_THREAD(coap_server_process, ev, data)
* 6LowPAN protocol preferences, * 6LowPAN protocol preferences,
* e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and * e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and
* then overwrites it. * then overwrites it.
* (Setting Context 0 to aaaa::1111:2222:3333:4444 will report a 16 bit * (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit
* compressed address of aaaa::1111:22ff:fe33:xxxx) * compressed address of fd00::1111:22ff:fe33:xxxx)
* Note Wireshark's IPCMV6 checksum verification depends on the correct * Note Wireshark's IPCMV6 checksum verification depends on the correct
* uncompressed addresses. * uncompressed addresses.
*/ */
#if 0 #if 0
/* Mode 1 - 64 bits inline */ /* 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 #elif 1
/* Mode 2 - 16 bits inline */ /* 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 #else
/* Mode 3 - derived from link local (MAC) address */ /* 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); uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
#endif #endif
@ -250,7 +250,7 @@ PROCESS_THREAD(coap_server_process, ev, data)
if(root_if != NULL) { if(root_if != NULL) {
rpl_dag_t *dag; rpl_dag_t *dag;
dag = rpl_set_root(RPL_DEFAULT_INSTANCE, (uip_ip6addr_t *)&ipaddr); 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); rpl_set_prefix(dag, &ipaddr, 64);
PRINTF("created a new RPL dag\n"); PRINTF("created a new RPL dag\n");
} else { } else {

View file

@ -370,7 +370,7 @@ PROCESS_THREAD(border_router_process, ev, data)
NETSTACK_MAC.off(1); NETSTACK_MAC.off(1);
/* Derived from link local (MAC) address */ /* 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);
set_prefix_64(&ipaddr); set_prefix_64(&ipaddr);
print_local_addresses(); print_local_addresses();

View file

@ -143,7 +143,7 @@ set_global_address(void)
{ {
uip_ipaddr_t ipaddr; 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_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
@ -153,10 +153,10 @@ set_global_address(void)
* *
* For correct Wireshark decoding using a sniffer, add the /64 prefix to the * For correct Wireshark decoding using a sniffer, add the /64 prefix to the
* 6LowPAN protocol preferences, * 6LowPAN protocol preferences,
* e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and * e.g. set Context 0 to fd00::. At present Wireshark copies Context/128 and
* then overwrites it. * then overwrites it.
* (Setting Context 0 to aaaa::1111:2222:3333:4444 will report a 16 bit * (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit
* compressed address of aaaa::1111:22ff:fe33:xxxx) * compressed address of fd00::1111:22ff:fe33:xxxx)
* *
* Note the IPCMV6 checksum verification depends on the correct uncompressed * Note the IPCMV6 checksum verification depends on the correct uncompressed
* addresses. * addresses.
@ -164,13 +164,13 @@ set_global_address(void)
#if 0 #if 0
/* Mode 1 - 64 bits inline */ /* 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 #elif 1
/* Mode 2 - 16 bits inline */ /* 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 #else
/* Mode 3 - derived from server link-local (MAC) address */ /* 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 #endif
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View file

@ -124,21 +124,21 @@ PROCESS_THREAD(udp_server_process, ev, data)
* 6LowPAN protocol preferences, * 6LowPAN protocol preferences,
* e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and * e.g. set Context 0 to aaaa::. At present Wireshark copies Context/128 and
* then overwrites it. * then overwrites it.
* (Setting Context 0 to aaaa::1111:2222:3333:4444 will report a 16 bit * (Setting Context 0 to fd00::1111:2222:3333:4444 will report a 16 bit
* compressed address of aaaa::1111:22ff:fe33:xxxx) * compressed address of fd00::1111:22ff:fe33:xxxx)
* Note Wireshark's IPCMV6 checksum verification depends on the correct * Note Wireshark's IPCMV6 checksum verification depends on the correct
* uncompressed addresses. * uncompressed addresses.
*/ */
#if 0 #if 0
/* Mode 1 - 64 bits inline */ /* 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 #elif 1
/* Mode 2 - 16 bits inline */ /* 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 #else
/* Mode 3 - derived from link local (MAC) address */ /* 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); uip_ds6_set_addr_iid(&ipaddr, &uip_lladdr);
#endif #endif
@ -147,7 +147,7 @@ PROCESS_THREAD(udp_server_process, ev, data)
if(root_if != NULL) { if(root_if != NULL) {
rpl_dag_t *dag; rpl_dag_t *dag;
dag = rpl_set_root(RPL_DEFAULT_INSTANCE,(uip_ip6addr_t *)&ipaddr); 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); rpl_set_prefix(dag, &ipaddr, 64);
PRINTF("created a new RPL dag\n"); PRINTF("created a new RPL dag\n");
} else { } else {

View file

@ -118,7 +118,7 @@ static void
set_global_address(void) set_global_address(void)
{ {
uip_ipaddr_t ipaddr; 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_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
} }

View file

@ -70,7 +70,7 @@ static void
set_global_address(void) set_global_address(void)
{ {
uip_ipaddr_t ipaddr; 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_set_addr_iid(&ipaddr, &uip_lladdr);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
} }

View file

@ -376,7 +376,7 @@ initialize(void)
#if 0 #if 0
{ {
uip_ip6addr_t ipaddr; uip_ip6addr_t ipaddr;
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0); uip_ip6addr(&ipaddr, 0xfd00, 0, 0, 0, 0, 0, 0, 0);
uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF); uip_ds6_addr_add(&ipaddr, 0, ADDR_AUTOCONF);
/* uip_ds6_prefix_add(&ipaddr,64,0); */ /* uip_ds6_prefix_add(&ipaddr,64,0); */
} }