mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Initialize ctimer, add IPv6 address configuration for the aaaa prefix
This commit is contained in:
parent
e6215712ca
commit
6fcca2d545
@ -29,7 +29,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the Contiki OS
|
* This file is part of the Contiki OS
|
||||||
*
|
*
|
||||||
* $Id: contiki-main.c,v 1.19 2009/03/17 15:56:32 adamdunkels Exp $
|
* $Id: contiki-main.c,v 1.20 2009/04/29 11:49:27 adamdunkels Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -65,6 +65,8 @@ main(void)
|
|||||||
|
|
||||||
procinit_init();
|
procinit_init();
|
||||||
|
|
||||||
|
ctimer_init();
|
||||||
|
|
||||||
autostart_start(autostart_processes);
|
autostart_start(autostart_processes);
|
||||||
|
|
||||||
#if !UIP_CONF_IPV6
|
#if !UIP_CONF_IPV6
|
||||||
@ -80,6 +82,14 @@ main(void)
|
|||||||
uip_ipaddr(&addr, 192,168,1,1);
|
uip_ipaddr(&addr, 192,168,1,1);
|
||||||
printf("Def. Router: %d.%d.%d.%d\n", uip_ipaddr_to_quad(&addr));
|
printf("Def. Router: %d.%d.%d.%d\n", uip_ipaddr_to_quad(&addr));
|
||||||
uip_setdraddr(&addr);
|
uip_setdraddr(&addr);
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
uip_ipaddr_t ipaddr;
|
||||||
|
|
||||||
|
uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
uip_netif_addr_autoconf_set(&ipaddr, &uip_lladdr);
|
||||||
|
uip_netif_addr_add(&ipaddr, 16, 0, TENTATIVE);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Make standard output unbuffered. */
|
/* Make standard output unbuffered. */
|
||||||
|
Loading…
Reference in New Issue
Block a user