gnrc/nib: Move GNRC_IPV6_NIB_CONF_MULTIHOP_DAD to 'CONFIG_' namespace
Also evaluate using IS_ACTIVE macro.
This commit is contained in:
parent
3ec296400d
commit
22b4df9537
@ -208,8 +208,8 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* @see [RFC 6775, section 8.2](https://tools.ietf.org/html/rfc6775#section-8.2)
|
* @see [RFC 6775, section 8.2](https://tools.ietf.org/html/rfc6775#section-8.2)
|
||||||
*/
|
*/
|
||||||
#ifndef GNRC_IPV6_NIB_CONF_MULTIHOP_DAD
|
#ifndef CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD
|
||||||
#define GNRC_IPV6_NIB_CONF_MULTIHOP_DAD 0
|
#define CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD 0
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|||||||
@ -62,9 +62,9 @@ uint8_t _reg_addr_upstream(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
|
|||||||
aro->eui64.uint8[6], aro->eui64.uint8[7]);
|
aro->eui64.uint8[6], aro->eui64.uint8[7]);
|
||||||
if ((nce == NULL) || !(nce->mode & _NC) ||
|
if ((nce == NULL) || !(nce->mode & _NC) ||
|
||||||
(memcmp(&nce->eui64, &aro->eui64, sizeof(aro->eui64)) == 0)) {
|
(memcmp(&nce->eui64, &aro->eui64, sizeof(aro->eui64)) == 0)) {
|
||||||
#if GNRC_IPV6_NIB_CONF_MULTIHOP_DAD
|
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD)
|
||||||
/* TODO */
|
/* TODO */
|
||||||
#endif /* GNRC_IPV6_NIB_CONF_MULTIHOP_DAD */
|
#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD */
|
||||||
if (aro->ltime.u16 != 0) {
|
if (aro->ltime.u16 != 0) {
|
||||||
_handle_sl2ao(netif, ipv6, icmpv6, sl2ao);
|
_handle_sl2ao(netif, ipv6, icmpv6, sl2ao);
|
||||||
/* re-get NCE in case it was updated */
|
/* re-get NCE in case it was updated */
|
||||||
@ -112,12 +112,12 @@ gnrc_pktsnip_t *_copy_and_handle_aro(gnrc_netif_t *netif,
|
|||||||
DEBUG("nib: No space left in packet buffer. Not replying NS");
|
DEBUG("nib: No space left in packet buffer. Not replying NS");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#if GNRC_IPV6_NIB_CONF_MULTIHOP_DAD
|
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD)
|
||||||
else if (status != _ADDR_REG_STATUS_IGNORE) {
|
else if (status != _ADDR_REG_STATUS_IGNORE) {
|
||||||
DEBUG("nib: Address was marked TENTATIVE => not replying NS, "
|
DEBUG("nib: Address was marked TENTATIVE => not replying NS, "
|
||||||
"waiting for DAC\n");
|
"waiting for DAC\n");
|
||||||
}
|
}
|
||||||
#endif /* GNRC_IPV6_NIB_CONF_MULTIHOP_DAD */
|
#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD */
|
||||||
}
|
}
|
||||||
return reply_aro;
|
return reply_aro;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,7 +121,7 @@ void _handle_sl2ao(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
|
|||||||
if (icmpv6->type == ICMPV6_NBR_SOL) {
|
if (icmpv6->type == ICMPV6_NBR_SOL) {
|
||||||
nce->info &= ~GNRC_IPV6_NIB_NC_INFO_IS_ROUTER;
|
nce->info &= ~GNRC_IPV6_NIB_NC_INFO_IS_ROUTER;
|
||||||
}
|
}
|
||||||
#if GNRC_IPV6_NIB_CONF_MULTIHOP_DAD && IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LR)
|
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD) && IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LR)
|
||||||
else if (_rtr_sol_on_6lr(netif, icmpv6)) {
|
else if (_rtr_sol_on_6lr(netif, icmpv6)) {
|
||||||
DEBUG("nib: Setting newly created entry to tentative\n");
|
DEBUG("nib: Setting newly created entry to tentative\n");
|
||||||
_set_ar_state(nce, GNRC_IPV6_NIB_NC_INFO_AR_STATE_TENTATIVE);
|
_set_ar_state(nce, GNRC_IPV6_NIB_NC_INFO_AR_STATE_TENTATIVE);
|
||||||
@ -129,7 +129,7 @@ void _handle_sl2ao(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
|
|||||||
&nce->addr_reg_timeout,
|
&nce->addr_reg_timeout,
|
||||||
SIXLOWPAN_ND_TENTATIVE_NCE_SEC_LTIME * MS_PER_SEC);
|
SIXLOWPAN_ND_TENTATIVE_NCE_SEC_LTIME * MS_PER_SEC);
|
||||||
}
|
}
|
||||||
#endif /* GNRC_IPV6_NIB_CONF_MULTIHOP_DAD && CONFIG_GNRC_IPV6_NIB_6LR */
|
#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD && CONFIG_GNRC_IPV6_NIB_6LR */
|
||||||
}
|
}
|
||||||
#if ENABLE_DEBUG
|
#if ENABLE_DEBUG
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -312,14 +312,14 @@ void gnrc_ipv6_nib_handle_pkt(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
|
|||||||
/* TODO */
|
/* TODO */
|
||||||
break;
|
break;
|
||||||
#endif /* CONFIG_GNRC_IPV6_NIB_REDIRECT */
|
#endif /* CONFIG_GNRC_IPV6_NIB_REDIRECT */
|
||||||
#if GNRC_IPV6_NIB_CONF_MULTIHOP_DAD
|
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD)
|
||||||
case ICMPV6_DAR:
|
case ICMPV6_DAR:
|
||||||
/* TODO */
|
/* TODO */
|
||||||
break;
|
break;
|
||||||
case ICMPV6_DAC:
|
case ICMPV6_DAC:
|
||||||
/* TODO */
|
/* TODO */
|
||||||
break;
|
break;
|
||||||
#endif /* GNRC_IPV6_NIB_CONF_MULTIHOP_DAD */
|
#endif /* CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD */
|
||||||
}
|
}
|
||||||
_nib_release();
|
_nib_release();
|
||||||
gnrc_netif_release(netif);
|
gnrc_netif_release(netif);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user