From 88d0003b75d0a81cd8f04647d01c687872c068d9 Mon Sep 17 00:00:00 2001 From: Laurent Deru Date: Fri, 13 Jan 2017 15:28:09 +0100 Subject: [PATCH] Make all NDP configuration parameters user configurable --- core/net/ipv6/uip-nd6.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/net/ipv6/uip-nd6.h b/core/net/ipv6/uip-nd6.h index 9831747a2..446ad448c 100644 --- a/core/net/ipv6/uip-nd6.h +++ b/core/net/ipv6/uip-nd6.h @@ -60,11 +60,23 @@ /** \name RFC 4861 Host constant */ /** @{ */ /** \brief Maximum router solicitation delay */ +#ifndef UIP_CONF_ND6_MAX_RTR_SOLICITATION_DELAY #define UIP_ND6_MAX_RTR_SOLICITATION_DELAY 1 +#else +#define UIP_ND6_MAX_RTR_SOLICITATION_DELAY UIP_CONF_ND6_MAX_RTR_SOLICITATION_DELAY +#endif /** \brief Router solicitation interval */ +#ifndef UIP_CONF_ND6_RTR_SOLICITATION_INTERVAL #define UIP_ND6_RTR_SOLICITATION_INTERVAL 4 +#else +#define UIP_ND6_RTR_SOLICITATION_INTERVAL UIP_CONF_ND6_RTR_SOLICITATION_INTERVAL +#endif /** \brief Maximum router solicitations */ +#ifndef UIP_CONF_ND6_MAX_RTR_SOLICITATIONS #define UIP_ND6_MAX_RTR_SOLICITATIONS 3 +#else +#define UIP_ND6_MAX_RTR_SOLICITATIONS UIP_CONF_ND6_MAX_RTR_SOLICITATIONS +#endif /** @} */ /** \name RFC 4861 Router constants */ @@ -91,7 +103,11 @@ #endif #define UIP_ND6_M_FLAG 0 #define UIP_ND6_O_FLAG (UIP_ND6_RA_RDNSS || UIP_ND6_RA_DNSSL) +#ifndef UIP_CONF_ROUTER_LIFETIME #define UIP_ND6_ROUTER_LIFETIME 3 * UIP_ND6_MAX_RA_INTERVAL +#else +#define UIP_ND6_ROUTER_LIFETIME UIP_CONF_ROUTER_LIFETIME +#endif #define UIP_ND6_MAX_INITIAL_RA_INTERVAL 16 /*seconds*/ #define UIP_ND6_MAX_INITIAL_RAS 3 /*transmissions*/