From 2fe2a28439221620f64917aa163f1a54798e0eff Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Wed, 3 Feb 2016 19:08:00 +0100 Subject: [PATCH] Make some of the rpl examples configurable in non-storing mode --- examples/ipv6/rpl-border-router/project-conf.h | 11 +++++++++++ examples/ipv6/rpl-collect/project-conf.h | 11 +++++++++++ examples/ipv6/rpl-udp/project-conf.h | 13 ++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/examples/ipv6/rpl-border-router/project-conf.h b/examples/ipv6/rpl-border-router/project-conf.h index 9d9116795..c73735be6 100644 --- a/examples/ipv6/rpl-border-router/project-conf.h +++ b/examples/ipv6/rpl-border-router/project-conf.h @@ -31,6 +31,17 @@ #ifndef PROJECT_ROUTER_CONF_H_ #define PROJECT_ROUTER_CONF_H_ +#ifndef RPL_CONF_WITH_NON_STORING +#define RPL_CONF_WITH_NON_STORING 0 /* Set this to run with non-storing mode */ +#endif /* RPL_CONF_WITH_NON_STORING */ + +#if RPL_CONF_WITH_NON_STORING +#undef RPL_CONF_WITH_STORING +#define RPL_CONF_WITH_STORING 0 +#undef RPL_CONF_MOP +#define RPL_CONF_MOP RPL_MOP_NON_STORING +#endif /* RPL_CONF_WITH_NON_STORING */ + #ifndef UIP_FALLBACK_INTERFACE #define UIP_FALLBACK_INTERFACE rpl_interface #endif diff --git a/examples/ipv6/rpl-collect/project-conf.h b/examples/ipv6/rpl-collect/project-conf.h index c33ca27fb..e45518b73 100644 --- a/examples/ipv6/rpl-collect/project-conf.h +++ b/examples/ipv6/rpl-collect/project-conf.h @@ -63,4 +63,15 @@ #undef SICSLOWPAN_CONF_FRAG #define SICSLOWPAN_CONF_FRAG 0 +#ifndef RPL_CONF_WITH_NON_STORING +#define RPL_CONF_WITH_NON_STORING 0 /* Set this to run with non-storing mode */ +#endif /* RPL_CONF_WITH_NON_STORING */ + +#if RPL_CONF_WITH_NON_STORING +#undef RPL_CONF_WITH_STORING +#define RPL_CONF_WITH_STORING 0 +#undef RPL_CONF_MOP +#define RPL_CONF_MOP RPL_MOP_NON_STORING +#endif /* RPL_CONF_WITH_NON_STORING */ + #endif /* PROJECT_CONF_H_ */ diff --git a/examples/ipv6/rpl-udp/project-conf.h b/examples/ipv6/rpl-udp/project-conf.h index 4b39f7de9..0217200b4 100644 --- a/examples/ipv6/rpl-udp/project-conf.h +++ b/examples/ipv6/rpl-udp/project-conf.h @@ -56,4 +56,15 @@ #define RPL_CONF_DEFAULT_ROUTE_INFINITE_LIFETIME 1 -#endif /* PROJECT_CONF_H_ */ +#ifndef RPL_CONF_WITH_NON_STORING +#define RPL_CONF_WITH_NON_STORING 0 /* Set this to run with non-storing mode */ +#endif /* RPL_CONF_WITH_NON_STORING */ + +#if RPL_CONF_WITH_NON_STORING +#undef RPL_CONF_WITH_STORING +#define RPL_CONF_WITH_STORING 0 +#undef RPL_CONF_MOP +#define RPL_CONF_MOP RPL_MOP_NON_STORING +#endif /* RPL_CONF_WITH_NON_STORING */ + +#endif