From aaf5deabe268a1f43d211f2d01f5b8f63ac081b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Dawans?= Date: Tue, 5 Feb 2013 15:18:56 +0100 Subject: [PATCH] Allow user configuration of RPL Lifetime and Lifetime Unit --- core/net/rpl/rpl-private.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/net/rpl/rpl-private.h b/core/net/rpl/rpl-private.h index 71f634409..3c5c293d2 100644 --- a/core/net/rpl/rpl-private.h +++ b/core/net/rpl/rpl-private.h @@ -113,10 +113,18 @@ #define RPL_ZERO_LIFETIME 0 /* Default route lifetime unit. */ +#ifndef RPL_CONF_DEFAULT_LIFETIME_UNIT #define RPL_DEFAULT_LIFETIME_UNIT 0xffff +#else +#define RPL_DEFAULT_LIFETIME_UNIT RPL_CONF_DEFAULT_LIFETIME_UNIT +#endif /* Default route lifetime as a multiple of the lifetime unit. */ +#ifndef RPL_CONF_DEFAULT_LIFETIME #define RPL_DEFAULT_LIFETIME 0xff +#else +#define RPL_DEFAULT_LIFETIME RPL_CONF_DEFAULT_LIFETIME +#endif #define RPL_LIFETIME(instance, lifetime) \ ((unsigned long)(instance)->lifetime_unit * (lifetime))