From d19f08f10458f12cec705d9caa9964990b624ca7 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 16 Mar 2016 17:10:42 +0200 Subject: [PATCH] net: rpl: Enable objective function debugging via Kconfig User can activate RPL OF debugging by setting CONFIG_NETWORK_IP_STACK_DEBUG_RPL_OF config option. Change-Id: I9c7b59eb6d782702b5a9159f4915d3f58f732d5c Signed-off-by: Jukka Rissanen --- net/ip/Kconfig.debug | 7 +++++++ net/ip/contiki/rpl/rpl-mrhof.c | 4 +++- net/ip/contiki/rpl/rpl-of0.c | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/net/ip/Kconfig.debug b/net/ip/Kconfig.debug index 0de8fdd3e05..638410373cf 100644 --- a/net/ip/Kconfig.debug +++ b/net/ip/Kconfig.debug @@ -143,6 +143,13 @@ config NETWORK_IP_STACK_DEBUG_RPL_ICMPV6 help Enables RPL ICMPv6 debug messages +config NETWORK_IP_STACK_DEBUG_RPL_OF + bool "Debug RPL objective function messages" + depends on NETWORKING_WITH_RPL + default n + help + Enables RPL Objective Function related debug messages + config NETWORK_IP_STACK_DEBUG_IPV4 bool "Debug core IPv4" depends on NETWORKING_WITH_IPV4 diff --git a/net/ip/contiki/rpl/rpl-mrhof.c b/net/ip/contiki/rpl/rpl-mrhof.c index 7b7d911dcda..ad412fe8b18 100644 --- a/net/ip/contiki/rpl/rpl-mrhof.c +++ b/net/ip/contiki/rpl/rpl-mrhof.c @@ -49,7 +49,9 @@ #include "contiki/rpl/rpl-private.h" #include "contiki/nbr-table.h" -#define DEBUG DEBUG_NONE +#ifdef CONFIG_NETWORK_IP_STACK_DEBUG_RPL_OF +#define DEBUG 1 +#endif #include "contiki/ip/uip-debug.h" static void reset(rpl_dag_t *); diff --git a/net/ip/contiki/rpl/rpl-of0.c b/net/ip/contiki/rpl/rpl-of0.c index ae073da278e..f4d596b2239 100644 --- a/net/ip/contiki/rpl/rpl-of0.c +++ b/net/ip/contiki/rpl/rpl-of0.c @@ -43,7 +43,9 @@ #include "contiki/rpl/rpl-private.h" -#define DEBUG DEBUG_NONE +#ifdef CONFIG_NETWORK_IP_STACK_DEBUG_RPL_OF +#define DEBUG 1 +#endif #include "contiki/ip/uip-debug.h" static void reset(rpl_dag_t *);