2015-03-24 12:35:16 +00:00
|
|
|
#include "contiki.h"
|
|
|
|
#include "contiki-net.h"
|
2017-09-22 13:06:44 +00:00
|
|
|
#include "ip64/ip64.h"
|
2015-03-24 12:35:16 +00:00
|
|
|
#include "net/netstack.h"
|
2017-12-09 08:53:48 +00:00
|
|
|
#include "net/routing/routing.h"
|
2017-07-03 15:20:22 +00:00
|
|
|
#include "sys/autostart.h"
|
2015-03-24 12:35:16 +00:00
|
|
|
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
PROCESS(router_node_process, "Router node");
|
|
|
|
AUTOSTART_PROCESSES(&router_node_process);
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
PROCESS_THREAD(router_node_process, ev, data)
|
|
|
|
{
|
|
|
|
PROCESS_BEGIN();
|
|
|
|
|
|
|
|
/* Set us up as a RPL root node. */
|
2017-12-09 13:23:35 +00:00
|
|
|
NETSTACK_ROUTING.root_start();
|
2015-03-24 12:35:16 +00:00
|
|
|
|
|
|
|
/* Initialize the IP64 module so we'll start translating packets */
|
|
|
|
ip64_init();
|
|
|
|
|
|
|
|
/* ... and do nothing more. */
|
|
|
|
while(1) {
|
|
|
|
PROCESS_WAIT_EVENT();
|
|
|
|
}
|
|
|
|
|
|
|
|
PROCESS_END();
|
|
|
|
}
|
|
|
|
/*---------------------------------------------------------------------------*/
|