diff --git a/examples/ip64-router/Makefile b/examples/ip64-router/Makefile new file mode 100644 index 000000000..c44c677ad --- /dev/null +++ b/examples/ip64-router/Makefile @@ -0,0 +1,5 @@ +all: ip64-router +CONTIKI=../.. + +include $(CONTIKI)/Makefile.include + diff --git a/examples/ip64-router/ip64-router.c b/examples/ip64-router/ip64-router.c new file mode 100644 index 000000000..391b5038b --- /dev/null +++ b/examples/ip64-router/ip64-router.c @@ -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(); +} +/*---------------------------------------------------------------------------*/ diff --git a/examples/ip64-router/project-conf.h b/examples/ip64-router/project-conf.h new file mode 100644 index 000000000..e69de29bb