Fix protocol-dependent def of UIP_MAX_ROUTES

This commit is contained in:
Simon Duquennoy 2017-12-10 10:51:05 -08:00
parent fb8bf3d02d
commit 15b81c0fe5

View File

@ -46,13 +46,26 @@
#include "lib/list.h"
#ifdef UIP_CONF_MAX_ROUTES
#define UIP_MAX_ROUTES UIP_CONF_MAX_ROUTES
#else /* UIP_CONF_MAX_ROUTES */
#if UIP_CONF_IPV6_RPL_LITE
#define UIP_MAX_ROUTES 0 /* RPL Lite only supports non-storing, no routes */
#elif UIP_CONF_IPV6_RPL_CLASSIC
#include "net/routing/rpl-classic/rpl-conf.h"
#if RPL_WITH_STORING
#define UIP_MAX_ROUTES NETSTACK_MAX_ROUTE_ENTRIES
#else
#define UIP_MAX_ROUTES 0
#else /* RPL_WITH_STORING */
#define UIP_MAX_ROUTES 0 /* No storing mode, no need for routes */
#endif /* RPL_WITH_STORING */
#else /* Not RPL Lite nor RPL Classic */
#define UIP_MAX_ROUTES NETSTACK_MAX_ROUTE_ENTRIES
#endif
#endif /* UIP_CONF_MAX_ROUTES */
NBR_TABLE_DECLARE(nbr_routes);