made UIP_ND6_SEND_RA configurable from platforms and projects

This commit is contained in:
joxe 2010-03-16 18:27:22 +00:00
parent 36b995cc9a
commit d113577a8e
2 changed files with 6 additions and 0 deletions

View file

@ -63,8 +63,10 @@ struct etimer uip_ds6_timer_periodic; /** \brief Timer
#if UIP_CONF_ROUTER #if UIP_CONF_ROUTER
struct stimer uip_ds6_timer_ra; /** \brief RA timer, to schedule RA sending */ struct stimer uip_ds6_timer_ra; /** \brief RA timer, to schedule RA sending */
#if UIP_ND6_SEND_RA
static uint8_t racount; /** \brief number of RA already sent */ static uint8_t racount; /** \brief number of RA already sent */
static uint16_t rand_time; /** \brief random time value for timers */ static uint16_t rand_time; /** \brief random time value for timers */
#endif
#else /* UIP_CONF_ROUTER */ #else /* UIP_CONF_ROUTER */
struct etimer uip_ds6_timer_rs; /** \brief RS timer, to schedule RS sending */ struct etimer uip_ds6_timer_rs; /** \brief RS timer, to schedule RS sending */
static uint8_t rscount; /** \brief number of rs already sent */ static uint8_t rscount; /** \brief number of rs already sent */

View file

@ -85,7 +85,11 @@
/** \name RFC 4861 Router constants */ /** \name RFC 4861 Router constants */
/** @{ */ /** @{ */
#ifndef UIP_CONF_ND6_SEND_RA
#define UIP_ND6_SEND_RA 1 /* enable/disable RA sending */ #define UIP_ND6_SEND_RA 1 /* enable/disable RA sending */
#else
#define UIP_ND6_SEND_RA UIP_CONF_ND6_SEND_RA
#endif
#define UIP_ND6_MAX_RA_INTERVAL 600 #define UIP_ND6_MAX_RA_INTERVAL 600
#define UIP_ND6_MIN_RA_INTERVAL (UIP_ND6_MAX_RA_INTERVAL / 3) #define UIP_ND6_MIN_RA_INTERVAL (UIP_ND6_MAX_RA_INTERVAL / 3)
#define UIP_ND6_M_FLAG 0 #define UIP_ND6_M_FLAG 0