1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc/nib: Move GNRC_IPV6_NIB_NUMOF to 'CONFIG_' namespace

This commit is contained in:
Leandro Lanzieri 2020-03-12 17:15:47 +01:00
parent 1f20ffc150
commit 07771de08f
No known key found for this signature in database
GPG Key ID: 39607DE6080007A3
10 changed files with 59 additions and 59 deletions

View File

@ -25,7 +25,7 @@ USEMODULE += prng_minstd
CFLAGS += -DLOG_LEVEL=LOG_NONE # disable log output
CFLAGS += -DGNRC_PKTBUF_SIZE=512 -DCONFIG_GNRC_NETIF_IPV6_ADDRS_NUMOF=2 \
-DGNRC_NETIF_IPV6_GROUPS_NUMOF=2 -DGNRC_IPV6_NIB_NUMOF=1 \
-DGNRC_NETIF_IPV6_GROUPS_NUMOF=2 -DCONFIG_GNRC_IPV6_NIB_NUMOF=1 \
-DGNRC_IPV6_NIB_OFFL_NUMOF=1 # be able to configure at least one route
# Enable single interface optimization. Set to 0 if more than one interface is

View File

@ -35,8 +35,8 @@ extern "C" {
#ifndef CONFIG_GNRC_IPV6_NIB_SLAAC
#define CONFIG_GNRC_IPV6_NIB_SLAAC 1
#endif
#ifndef GNRC_IPV6_NIB_NUMOF
#define GNRC_IPV6_NIB_NUMOF (16)
#ifndef CONFIG_GNRC_IPV6_NIB_NUMOF
#define CONFIG_GNRC_IPV6_NIB_NUMOF (16)
#endif
#endif
@ -63,9 +63,9 @@ extern "C" {
# ifndef CONFIG_GNRC_IPV6_NIB_ARSM
# define CONFIG_GNRC_IPV6_NIB_ARSM 0
# endif
# ifndef GNRC_IPV6_NIB_NUMOF
# ifndef CONFIG_GNRC_IPV6_NIB_NUMOF
/* only needs to store default router */
# define GNRC_IPV6_NIB_NUMOF (1)
# define CONFIG_GNRC_IPV6_NIB_NUMOF (1)
# endif
#endif
#endif
@ -254,8 +254,8 @@ extern "C" {
* @attention This number has direct influence on the maximum number of
* neighbors and duplicate address detection table entries
*/
#ifndef GNRC_IPV6_NIB_NUMOF
#define GNRC_IPV6_NIB_NUMOF (4)
#ifndef CONFIG_GNRC_IPV6_NIB_NUMOF
#define CONFIG_GNRC_IPV6_NIB_NUMOF (4)
#endif
/**

View File

@ -36,7 +36,7 @@
_nib_dr_entry_t *_prime_def_router = NULL;
static clist_node_t _next_removable = { NULL };
static _nib_onl_entry_t _nodes[GNRC_IPV6_NIB_NUMOF];
static _nib_onl_entry_t _nodes[CONFIG_GNRC_IPV6_NIB_NUMOF];
static _nib_offl_entry_t _dsts[GNRC_IPV6_NIB_OFFL_NUMOF];
static _nib_dr_entry_t _def_routers[GNRC_IPV6_NIB_DEFAULT_ROUTER_NUMOF];
@ -93,7 +93,7 @@ _nib_onl_entry_t *_nib_onl_alloc(const ipv6_addr_t *addr, unsigned iface)
DEBUG("nib: Allocating on-link node entry (addr = %s, iface = %u)\n",
(addr == NULL) ? "NULL" : ipv6_addr_to_str(addr_str, addr,
sizeof(addr_str)), iface);
for (unsigned i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (unsigned i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *tmp = &_nodes[i];
if ((_nib_onl_get_if(tmp) == iface) && _addr_equals(addr, tmp)) {
@ -204,7 +204,7 @@ _nib_onl_entry_t *_nib_nc_add(const ipv6_addr_t *addr, unsigned iface,
_nib_onl_entry_t *_nib_onl_iter(const _nib_onl_entry_t *last)
{
for (const _nib_onl_entry_t *node = (last) ? last + 1 : _nodes;
node < (_nodes + GNRC_IPV6_NIB_NUMOF);
node < (_nodes + CONFIG_GNRC_IPV6_NIB_NUMOF);
node++) {
if (node->mode != _EMPTY) {
/* const modifier provided to assure internal consistency.
@ -220,7 +220,7 @@ _nib_onl_entry_t *_nib_onl_get(const ipv6_addr_t *addr, unsigned iface)
assert(addr != NULL);
DEBUG("nib: Getting on-link node entry (addr = %s, iface = %u)\n",
ipv6_addr_to_str(addr_str, addr, sizeof(addr_str)), iface);
for (unsigned i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (unsigned i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *node = &_nodes[i];
if ((node->mode != _EMPTY) &&

View File

@ -48,7 +48,7 @@
static char addr_str[IPV6_ADDR_MAX_STR_LEN];
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_QUEUE_PKT)
static gnrc_pktqueue_t _queue_pool[GNRC_IPV6_NIB_NUMOF];
static gnrc_pktqueue_t _queue_pool[CONFIG_GNRC_IPV6_NIB_NUMOF];
#endif /* CONFIG_GNRC_IPV6_NIB_QUEUE_PKT */
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
@ -1118,7 +1118,7 @@ static void _handle_nbr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_QUEUE_PKT)
static gnrc_pktqueue_t *_alloc_queue_entry(gnrc_pktsnip_t *pkt)
{
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
if (_queue_pool[i].pkt == NULL) {
_queue_pool[i].pkt = pkt;
return &_queue_pool[i];

View File

@ -29,7 +29,7 @@ LOW_MEMORY_BOARDS := nucleo-f334r8 msb-430 msb-430h
ifeq ($(BOARD),$(filter $(BOARD),$(LOW_MEMORY_BOARDS)))
CFLAGS += -DGNRC_PKTBUF_SIZE=512 -DCONFIG_GNRC_NETIF_IPV6_ADDRS_NUMOF=2 \
-DGNRC_NETIF_IPV6_GROUPS_NUMOF=2 -DGNRC_IPV6_NIB_NUMOF=1 \
-DGNRC_NETIF_IPV6_GROUPS_NUMOF=2 -DCONFIG_GNRC_IPV6_NIB_NUMOF=1 \
-DNRC_IPV6_NIB_OFFL_NUMOF=1
endif

View File

@ -2,7 +2,7 @@ USEMODULE += gnrc_ipv6_nib
USEMODULE += gnrc_sixlowpan_nd # required for CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C
CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ROUTER=1
CFLAGS += -DGNRC_IPV6_NIB_NUMOF=16
CFLAGS += -DCONFIG_GNRC_IPV6_NIB_NUMOF=16
CFLAGS += -DGNRC_IPV6_NIB_OFFL_NUMOF=25
CFLAGS += -DGNRC_IPV6_NIB_DEFAULT_ROUTER_NUMOF=4
CFLAGS += -DGNRC_IPV6_NIB_ABR_NUMOF=4

View File

@ -212,9 +212,9 @@ static void test_nib_ft_add__EINVAL_iface0(void)
&next_hop, 0, 0));
}
#if GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF
#define MAX_NUMOF (GNRC_IPV6_NIB_NUMOF)
#else /* GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF */
#if CONFIG_GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF
#define MAX_NUMOF (CONFIG_GNRC_IPV6_NIB_NUMOF)
#else /* CONFIG_GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF */
#define MAX_NUMOF (GNRC_IPV6_NIB_OFFL_NUMOF)
#endif

View File

@ -39,7 +39,7 @@ static void set_up(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF persistent entries with different IP addresses
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF persistent entries with different IP addresses
* and then tries to add another.
* Expected result: should return NULL
*/
@ -48,7 +48,7 @@ static void test_nib_alloc__no_space_left_diff_addr(void)
ipv6_addr_t addr = { .u64 = { { .u8 = GLOBAL_PREFIX },
{ .u64 = TEST_UINT64 } } };
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *node;
TEST_ASSERT_NOT_NULL((node = _nib_onl_alloc(&addr, IFACE)));
@ -59,7 +59,7 @@ static void test_nib_alloc__no_space_left_diff_addr(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF persistent entries with different interface
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF persistent entries with different interface
* identifiers and then tries to add another.
* Expected result: should return NULL
*/
@ -69,7 +69,7 @@ static void test_nib_alloc__no_space_left_diff_iface(void)
{ .u64 = TEST_UINT64 } } };
unsigned iface = 1;
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *node;
TEST_ASSERT_NOT_NULL((node = _nib_onl_alloc(&addr, iface)));
@ -80,7 +80,7 @@ static void test_nib_alloc__no_space_left_diff_iface(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF persistent entries with different IP addresses
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF persistent entries with different IP addresses
* and interface identifiers and then tries to add another.
* Expected result: should return NULL
*/
@ -90,7 +90,7 @@ static void test_nib_alloc__no_space_left_diff_addr_iface(void)
{ .u64 = TEST_UINT64 } } };
unsigned iface = 1;
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *node;
TEST_ASSERT_NOT_NULL((node = _nib_onl_alloc(&addr, iface)));
@ -102,7 +102,7 @@ static void test_nib_alloc__no_space_left_diff_addr_iface(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF persistent entries with different IP addresses
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF persistent entries with different IP addresses
* and interface identifiers and then tries to add another that is equal to the
* last.
* Expected result: should return not NULL (the last)
@ -114,7 +114,7 @@ static void test_nib_alloc__success_duplicate(void)
{ .u64 = TEST_UINT64 } } };
unsigned iface = 1;
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
addr.u64[1].u64++;
iface++;
TEST_ASSERT_NOT_NULL((node = _nib_onl_alloc(&addr, iface)));
@ -362,7 +362,7 @@ static void test_nib_get__empty(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* addresses and a non-garbage-collectible AR state and then tries to add
* another.
* Expected result: should return NULL
@ -372,7 +372,7 @@ static void test_nib_nc_add__no_space_left_diff_addr(void)
ipv6_addr_t addr = { .u64 = { { .u8 = GLOBAL_PREFIX },
{ .u64 = TEST_UINT64 } } };
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *node;
TEST_ASSERT_NOT_NULL((node = _nib_nc_add(&addr, IFACE,
@ -385,7 +385,7 @@ static void test_nib_nc_add__no_space_left_diff_addr(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different interface
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different interface
* identifiers and a non-garbage-collectible AR state and then tries to add
* another.
* Expected result: should return NULL
@ -396,7 +396,7 @@ static void test_nib_nc_add__no_space_left_diff_iface(void)
{ .u64 = TEST_UINT64 } } };
unsigned iface = 1;
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *node;
TEST_ASSERT_NOT_NULL((node = _nib_nc_add(&addr, iface,
@ -409,7 +409,7 @@ static void test_nib_nc_add__no_space_left_diff_iface(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* addresses and interface identifiers and a non-garbage-collectible AR state
* and then tries to add another.
* Expected result: should return NULL
@ -420,7 +420,7 @@ static void test_nib_nc_add__no_space_left_diff_addr_iface(void)
{ .u64 = TEST_UINT64 } } };
unsigned iface = 1;
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *node;
TEST_ASSERT_NOT_NULL((node = _nib_nc_add(&addr, iface,
@ -434,7 +434,7 @@ static void test_nib_nc_add__no_space_left_diff_addr_iface(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* addresses and interface identifiers and a non-garbage-collectible AR state
* and then tries to add another that is equal to the last.
* Expected result: should return not NULL (the last)
@ -446,7 +446,7 @@ static void test_nib_nc_add__success_duplicate(void)
{ .u64 = TEST_UINT64 } } };
unsigned iface = 0;
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
addr.u64[1].u64++;
iface++;
TEST_ASSERT_NOT_NULL((node = _nib_nc_add(&addr, iface,
@ -477,7 +477,7 @@ static void test_nib_nc_add__success(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP address.
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP address.
* Expected result: new entries should still be able to be created and further
* should be different than the previous created ones
*/
@ -487,7 +487,7 @@ static void test_nib_nc_add__success_full_but_garbage_collectible(void)
ipv6_addr_t addr = { .u64 = { { .u8 = GLOBAL_PREFIX },
{ .u64 = TEST_UINT64 } } };
for (int i = 0; i < (3 * GNRC_IPV6_NIB_NUMOF); i++) {
for (int i = 0; i < (3 * CONFIG_GNRC_IPV6_NIB_NUMOF); i++) {
TEST_ASSERT_NOT_NULL((node = _nib_nc_add(&addr, IFACE,
GNRC_IPV6_NIB_NC_INFO_NUD_STATE_STALE)));
TEST_ASSERT(last != node);
@ -499,7 +499,7 @@ static void test_nib_nc_add__success_full_but_garbage_collectible(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* addresses and a garbage-collectible AR state and then tries to add
* 3 more after removing two.
* Expected result: should not crash
@ -512,7 +512,7 @@ static void test_nib_nc_add__cache_out_crash(void)
ipv6_addr_t addr = { .u64 = { { .u8 = GLOBAL_PREFIX },
{ .u64 = TEST_UINT64 } } };
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF - 2; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF - 2; i++) {
TEST_ASSERT_NOT_NULL(_nib_nc_add(&addr, IFACE,
GNRC_IPV6_NIB_NC_INFO_NUD_STATE_STALE));
addr.u64[1].u64++;
@ -603,7 +603,7 @@ static void test_nib_drl_add__no_space_left_diff_addr(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF persistent enties entries with
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF persistent enties entries with
* different IP addresses and then tries to add a default router list entry with
* yet another address.
* Expected result: should return NULL
@ -613,7 +613,7 @@ static void test_nib_drl_add__no_space_left_nib_full(void)
ipv6_addr_t addr = { .u64 = { { .u8 = GLOBAL_PREFIX },
{ .u64 = TEST_UINT64 } } };
for (int i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (int i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
_nib_onl_entry_t *node;
TEST_ASSERT_NOT_NULL((node = _nib_onl_alloc(&addr, IFACE)));
@ -1021,9 +1021,9 @@ static void test_nib_drl_get_dr__success4(void)
TEST_ASSERT(nib_res != node2);
}
#if GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF
#define MAX_NUMOF (GNRC_IPV6_NIB_NUMOF)
#else /* GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF */
#if CONFIG_GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF
#define MAX_NUMOF (CONFIG_GNRC_IPV6_NIB_NUMOF)
#else /* CONFIG_GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF */
#define MAX_NUMOF (GNRC_IPV6_NIB_OFFL_NUMOF)
#endif

View File

@ -36,7 +36,7 @@ static void set_up(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different addresses
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different addresses
* and then tries to create another one
* Expected result: gnrc_ipv6_nib_nc_set() returns -ENOMEM
*/
@ -46,7 +46,7 @@ static void test_nib_nc_set__ENOMEM_diff_addr(void)
{ .u64 = TEST_UINT64 } } };
uint8_t l2addr[] = L2ADDR;
for (unsigned i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (unsigned i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
TEST_ASSERT_EQUAL_INT(0, gnrc_ipv6_nib_nc_set(&addr, IFACE, l2addr,
sizeof(l2addr)));
addr.u64[1].u64++;
@ -57,7 +57,7 @@ static void test_nib_nc_set__ENOMEM_diff_addr(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different interfaces
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different interfaces
* and then tries to create another one
* Expected result: gnrc_ipv6_nib_nc_set() returns -ENOMEM
*/
@ -68,7 +68,7 @@ static void test_nib_nc_set__ENOMEM_diff_iface(void)
static const uint8_t l2addr[] = L2ADDR;
unsigned iface = IFACE;
for (unsigned i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (unsigned i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
TEST_ASSERT_EQUAL_INT(0, gnrc_ipv6_nib_nc_set(&addr, iface, l2addr,
sizeof(l2addr)));
iface++;
@ -78,7 +78,7 @@ static void test_nib_nc_set__ENOMEM_diff_iface(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different addresses
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different addresses
* and interfaces and then tries to create another one
* Expected result: gnrc_ipv6_nib_nc_set() returns -ENOMEM
*/
@ -89,7 +89,7 @@ static void test_nib_nc_set__ENOMEM_diff_addr_iface(void)
uint8_t l2addr[] = L2ADDR;
unsigned iface = IFACE;
for (unsigned i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (unsigned i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
TEST_ASSERT_EQUAL_INT(0, gnrc_ipv6_nib_nc_set(&addr, iface, l2addr,
sizeof(l2addr)));
addr.u64[1].u64++;
@ -128,7 +128,7 @@ static void test_nib_nc_set__success(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different IP
* addresses and interface identifiers and then tries to add another that is
* equal to the last.
* Expected result: gnrc_ipv6_nib_nc_set() returns 0
@ -140,7 +140,7 @@ static void test_nib_nc_set__success_duplicate(void)
uint8_t l2addr[] = L2ADDR;
unsigned iface = 0;
for (unsigned i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (unsigned i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
addr.u64[1].u64++;
iface++;
l2addr[7]++;
@ -152,9 +152,9 @@ static void test_nib_nc_set__success_duplicate(void)
}
/*
* Creates GNRC_IPV6_NIB_NUMOF neighbor cache entries with different addresses
* Creates CONFIG_GNRC_IPV6_NIB_NUMOF neighbor cache entries with different addresses
* and interfaces and then tries to delete one with yet another address.
* Expected result: There should be still GNRC_IPV6_NIB_NUMOF entries in the
* Expected result: There should be still CONFIG_GNRC_IPV6_NIB_NUMOF entries in the
* neighbor cache
*/
static void test_nib_nc_del__unknown(void)
@ -166,7 +166,7 @@ static void test_nib_nc_del__unknown(void)
gnrc_ipv6_nib_nc_t nce;
unsigned iface = IFACE, count = 0;
for (unsigned i = 0; i < GNRC_IPV6_NIB_NUMOF; i++) {
for (unsigned i = 0; i < CONFIG_GNRC_IPV6_NIB_NUMOF; i++) {
TEST_ASSERT_EQUAL_INT(0, gnrc_ipv6_nib_nc_set(&addr, iface, l2addr,
sizeof(l2addr)));
addr.u64[1].u64++;
@ -177,7 +177,7 @@ static void test_nib_nc_del__unknown(void)
while (gnrc_ipv6_nib_nc_iter(0, &iter_state, &nce)) {
count++;
}
TEST_ASSERT_EQUAL_INT(GNRC_IPV6_NIB_NUMOF, count);
TEST_ASSERT_EQUAL_INT(CONFIG_GNRC_IPV6_NIB_NUMOF, count);
}
/*

View File

@ -96,9 +96,9 @@ static void test_nib_pl_set__EINVAL_pfx_len(void)
UINT32_MAX));
}
#if GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF
#define MAX_NUMOF (GNRC_IPV6_NIB_NUMOF)
#else /* GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF */
#if CONFIG_GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF
#define MAX_NUMOF (CONFIG_GNRC_IPV6_NIB_NUMOF)
#else /* CONFIG_GNRC_IPV6_NIB_NUMOF < GNRC_IPV6_NIB_OFFL_NUMOF */
#define MAX_NUMOF (GNRC_IPV6_NIB_OFFL_NUMOF)
#endif
@ -335,7 +335,7 @@ static void test_nib_pl_set__success(void)
/*
* Creates MAX_NUMOF prefix list entries with different prefix and interfaces
* and then tries to delete one with yet another prefix and interface.
* Expected result: There should be still GNRC_IPV6_NIB_NUMOF entries in the
* Expected result: There should be still CONFIG_GNRC_IPV6_NIB_NUMOF entries in the
* neighbor cache
*/
static void test_nib_pl_del__unknown(void)