Commit 7adfb92b authored by Simon Duquennoy's avatar Simon Duquennoy
Browse files

Routing module configuration through netstack.h

parent f1177701
......@@ -139,7 +139,7 @@ ifeq ($(WITH_IP64),1)
endif
# Configure Routing protocol
MAKE_ROUTING_NONE = 0
MAKE_ROUTING_NULLROUTING = 0
MAKE_ROUTING_RPL_CLASSIC = 1
MAKE_ROUTING_RPL_LITE = 2
......@@ -147,20 +147,17 @@ MAKE_ROUTING_RPL_LITE = 2
ifeq ($(MAKE_NET),MAKE_NET_IPV6)
MAKE_ROUTING ?= MAKE_ROUTING_RPL_LITE
else
MAKE_ROUTING ?= MAKE_ROUTING_NONE
MAKE_ROUTING ?= MAKE_ROUTING_NULLROUTING
endif
ifeq ($(MAKE_ROUTING),MAKE_ROUTING_RPL_CLASSIC)
CFLAGS += -DUIP_CONF_IPV6_RPL_CLASSIC=1
CFLAGS += -DNETSTACK_ROUTING=rpl_classic_driver
MODULES += os/net/routing/rpl-classic
else ifeq ($(MAKE_ROUTING),MAKE_ROUTING_RPL_LITE)
CFLAGS += -DUIP_CONF_IPV6_RPL_LITE=1
CFLAGS += -DNETSTACK_ROUTING=rpl_lite_driver
MODULES += os/net/routing/rpl-lite
else
else ifeq ($(MAKE_ROUTING),MAKE_ROUTING_NULLROUTING)
CFLAGS += -DUIP_CONF_IPV6_NULLROUTING=1
CFLAGS += -DNETSTACK_ROUTING=nullrouting_driver
MODULES += os/net/routing/nullrouting
endif
......
......@@ -4,7 +4,7 @@ PROJECT_SOURCEFILES += test-sf.c
CONTIKI = ../../../
MAKE_MAC = MAKE_MAC_TSCH
MAKE_ROUTING = MAKE_ROUTING_NONE
MAKE_ROUTING = MAKE_ROUTING_NULLROUTING
MODULES += os/net/mac/tsch/sixtop
include $(CONTIKI)/Makefile.include
CONTIKI_PROJECT = blink-hello
MAKE_ROUTING = MAKE_ROUTING_NONE
MAKE_ROUTING = MAKE_ROUTING_NULLROUTING
MAKE_MAC=MAKE_MAC_NULLMAC
NRF52_WITHOUT_SOFTDEVICE=1
......
......@@ -21,6 +21,6 @@ MODULES_REL += ./resources
# REST Engine shall use Erbium CoAP implementation
MODULES += os/net/app-layer/coap
MAKE_ROUTING = MAKE_ROUTING_NONE
MAKE_ROUTING = MAKE_ROUTING_NULLROUTING
include $(CONTIKI)/Makefile.include
all: mqtt-demo
MAKE_ROUTING = MAKE_ROUTING_NONE
MAKE_ROUTING = MAKE_ROUTING_NULLROUTING
MODULES += os/net/app-layer/mqtt
......
CONTIKI_PROJECT = timer-test
MAKE_ROUTING = MAKE_ROUTING_NONE
MAKE_ROUTING = MAKE_ROUTING_NULLROUTING
MAKE_MAC=MAKE_MAC_NULLMAC
NRF52_WITHOUT_SOFTDEVICE=1
......
......@@ -10,5 +10,5 @@ PROJECT_SOURCEFILES += slip-net.c
# custom net layer, but with IPv6 enabled
MAKE_NET = MAKE_NET_IPV6
MAKE_ROUTING = MAKE_ROUTING_NONE
MAKE_ROUTING = MAKE_ROUTING_NULLROUTING
include $(CONTIKI)/Makefile.include
......@@ -43,6 +43,22 @@
#include "contiki.h"
/* Routing protocol configuration. The Routing protocol is configured through the Makefile,
via the flag MAC_ROUTING */
#ifdef NETSTACK_CONF_ROUTING
#define NETSTACK_ROUTING NETSTACK_CONF_ROUTING
#else /* NETSTACK_CONF_ROUTING */
#if UIP_CONF_IPV6_RPL_LITE
#define NETSTACK_ROUTING rpl_lite_driver
#elif UIP_CONF_IPV6_RPL_CLASSIC
#define NETSTACK_ROUTING rpl_classic_driver
#elif UIP_CONF_IPV6_NULLROUTING
#define NETSTACK_ROUTING nullrouting_driver
#else
#error Unknown ROUTING configuration
#endif
#endif /* NETSTACK_CONF_ROUTING */
/* Network layer configuration. The NET layer is configured through the Makefile,
via the flag MAC_NET */
#ifdef NETSTACK_CONF_NETWORK
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment