Cleanup of the Contiki network layer configuration. Now using CONTIKI_WITH_IPV6, CONTIKI_WITH_IPV4, and CONTIKI_WITH_RIME in makefiles, and UIP_CONF_IPV6, UIP_CONF_IPV4, UIP_CONF_RIME in c code. Now only the stacks that are used are compiled (via makefile MODULES). Make IPv6 the default network stack.

This commit is contained in:
Simon Duquennoy 2014-11-12 10:18:29 +01:00
parent d3d33c5699
commit 722b3258d1
161 changed files with 475 additions and 455 deletions

View file

@ -73,7 +73,7 @@ init_net(uint8_t node_id)
uint16_t shortaddr;
uint64_t longaddr;
linkaddr_t addr;
#if WITH_UIP6
#if UIP_CONF_IPV6
uip_ds6_addr_t *lladdr;
uip_ipaddr_t ipaddr;
#endif
@ -135,7 +135,7 @@ init_net(uint8_t node_id)
CLOCK_SECOND / (NETSTACK_RDC.channel_check_interval() == 0 ? 1 :
NETSTACK_RDC.channel_check_interval()), RF_CHANNEL);
#if WITH_UIP6
#if UIP_CONF_IPV6
#if LINKADDR_CONF_SIZE == 2
memset(&uip_lladdr.addr, 0, sizeof(uip_lladdr.addr));
@ -146,7 +146,9 @@ init_net(uint8_t node_id)
memcpy(&uip_lladdr.addr, &longaddr, sizeof(uip_lladdr.addr));
#endif
#if UIP_CONF_IPV6 || UIP_CONF_IPV4
process_start(&tcpip_process, NULL);
#endif
lladdr = uip_ds6_get_link_local(-1);