RPL Multicast group management with MOP 3

This commit is contained in:
George Oikonomou 2011-12-09 12:15:04 +00:00 committed by George Oikonomou
parent 0ad09aa842
commit da4ce5b54d
5 changed files with 109 additions and 0 deletions

View file

@ -44,6 +44,7 @@
#include "sys/clock.h"
#include "sys/ctimer.h"
#include "net/ipv6/uip-ds6.h"
#include "net/ipv6/multicast/uip-mcast6.h"
/*---------------------------------------------------------------------------*/
/** \brief Is IPv6 address addr the link-local, all-RPL-nodes
@ -177,8 +178,24 @@
#ifdef RPL_CONF_MOP
#define RPL_MOP_DEFAULT RPL_CONF_MOP
#else /* RPL_CONF_MOP */
#if RPL_CONF_MULTICAST
#define RPL_MOP_DEFAULT RPL_MOP_STORING_MULTICAST
#else
#define RPL_MOP_DEFAULT RPL_MOP_STORING_NO_MULTICAST
#endif /* UIP_IPV6_MULTICAST_RPL */
#endif /* RPL_CONF_MOP */
/* Emit a pre-processor error if the user configured multicast with bad MOP */
#if RPL_CONF_MULTICAST && (RPL_MOP_DEFAULT != RPL_MOP_STORING_MULTICAST)
#error "RPL Multicast requires RPL_MOP_DEFAULT==3. Check contiki-conf.h"
#endif
/* Multicast Route Lifetime as a multiple of the lifetime unit */
#ifdef RPL_CONF_MCAST_LIFETIME
#define RPL_MCAST_LIFETIME RPL_CONF_MCAST_LIFETIME
#else
#define RPL_MCAST_LIFETIME 3
#endif
/*