Skip to content

Commit

Permalink
Code for building an IP64 router
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdunkels committed May 10, 2015
1 parent 3337294 commit bc222ed
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/ip64-router/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
all: ip64-router
CONTIKI=../..

include $(CONTIKI)/Makefile.include

27 changes: 27 additions & 0 deletions examples/ip64-router/ip64-router.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "contiki.h"
#include "contiki-net.h"
#include "ip64.h"
#include "net/netstack.h"

/*---------------------------------------------------------------------------*/
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. */
rpl_dag_root_init_dag();

/* Initialize the IP64 module so we'll start translating packets */
ip64_init();

/* ... and do nothing more. */
while(1) {
PROCESS_WAIT_EVENT();
}

PROCESS_END();
}
/*---------------------------------------------------------------------------*/
Empty file.

0 comments on commit bc222ed

Please sign in to comment.