mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-28 07:51:19 +01:00
gnrc/nib: Move GNRC_IPV6_NIB_CONF_DNS to 'CONFIG_' namespace
Also evaluate using IS_ACTIVE macro.
This commit is contained in:
parent
e52b93cef0
commit
bad9abd349
@ -230,7 +230,7 @@ extern "C" {
|
||||
* The expected message context is the [UDP end point](@ref sock_udp_ep_t)
|
||||
* representing the DNS server.
|
||||
*
|
||||
* @note Only handled with @ref GNRC_IPV6_NIB_CONF_DNS != 0
|
||||
* @note Only handled with @ref CONFIG_GNRC_IPV6_NIB_DNS != 0
|
||||
*/
|
||||
#define GNRC_IPV6_NIB_RDNSS_TIMEOUT (0x4fd3U)
|
||||
/** @} */
|
||||
|
||||
@ -75,7 +75,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef MODULE_GNRC_IPV6_NIB_DNS
|
||||
#define GNRC_IPV6_NIB_CONF_DNS 1
|
||||
#define CONFIG_GNRC_IPV6_NIB_DNS 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -186,8 +186,8 @@ extern "C" {
|
||||
*
|
||||
* @see [RFC 8106](https://tools.ietf.org/html/rfc8106)
|
||||
*/
|
||||
#ifndef GNRC_IPV6_NIB_CONF_DNS
|
||||
#define GNRC_IPV6_NIB_CONF_DNS 0
|
||||
#ifndef CONFIG_GNRC_IPV6_NIB_DNS
|
||||
#define CONFIG_GNRC_IPV6_NIB_DNS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
#include "net/gnrc/ndp.h"
|
||||
#include "net/gnrc/netif/internal.h"
|
||||
#include "net/gnrc/sixlowpan/nd.h"
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
#include "net/sock/dns.h"
|
||||
#endif
|
||||
|
||||
@ -142,7 +142,7 @@ static gnrc_pktsnip_t *_build_ext_opts(gnrc_netif_t *netif,
|
||||
_nib_offl_entry_t *pfx = NULL;
|
||||
unsigned id = netif->pid;
|
||||
|
||||
#if GNRC_IPV6_NIB_CONF_DNS && SOCK_HAS_IPV6
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS) && SOCK_HAS_IPV6
|
||||
uint32_t rdnss_ltime = _evtimer_lookup(&sock_dns_server,
|
||||
GNRC_IPV6_NIB_RDNSS_TIMEOUT);
|
||||
|
||||
@ -161,7 +161,7 @@ static gnrc_pktsnip_t *_build_ext_opts(gnrc_netif_t *netif,
|
||||
}
|
||||
ext_opts = rdnsso;
|
||||
}
|
||||
#endif /* GNRC_IPV6_NIB_CONF_DNS */
|
||||
#endif /* CONFIG_GNRC_IPV6_NIB_DNS */
|
||||
#if GNRC_IPV6_NIB_CONF_MULTIHOP_P6C
|
||||
uint16_t ltime;
|
||||
gnrc_pktsnip_t *abro;
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
#include "net/gnrc/sixlowpan/nd.h"
|
||||
#include "net/ndp.h"
|
||||
#include "net/sixlowpan/nd.h"
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
#include "net/sock/dns.h"
|
||||
#endif
|
||||
|
||||
@ -51,7 +51,7 @@ static char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||
static gnrc_pktqueue_t _queue_pool[GNRC_IPV6_NIB_NUMOF];
|
||||
#endif /* CONFIG_GNRC_IPV6_NIB_QUEUE_PKT */
|
||||
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
static evtimer_msg_event_t _rdnss_timeout;
|
||||
#endif
|
||||
|
||||
@ -79,7 +79,7 @@ static void _handle_rtr_timeout(_nib_dr_entry_t *router);
|
||||
static void _handle_snd_na(gnrc_pktsnip_t *pkt);
|
||||
/* needs to be exported for 6LN's ARO handling */
|
||||
void _handle_search_rtr(gnrc_netif_t *netif);
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
static void _handle_rdnss_timeout(sock_udp_ep_t *dns_server);
|
||||
#endif
|
||||
/** @} */
|
||||
@ -388,7 +388,7 @@ void gnrc_ipv6_nib_handle_timer_event(void *ctx, uint16_t type)
|
||||
case GNRC_IPV6_NIB_VALID_ADDR:
|
||||
_handle_valid_addr(ctx);
|
||||
break;
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
case GNRC_IPV6_NIB_RDNSS_TIMEOUT:
|
||||
_handle_rdnss_timeout(ctx);
|
||||
#endif
|
||||
@ -425,7 +425,7 @@ void gnrc_ipv6_nib_change_rtr_adv_iface(gnrc_netif_t *netif, bool enable)
|
||||
*/
|
||||
static void _handle_mtuo(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
|
||||
const ndp_opt_mtu_t *mtuo);
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
static uint32_t _handle_rdnsso(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
|
||||
const ndp_opt_rdnss_impl_t *rdnsso);
|
||||
#endif
|
||||
@ -742,7 +742,7 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
|
||||
#endif /* GNRC_IPV6_NIB_CONF_MULTIHOP_P6C */
|
||||
break;
|
||||
#endif /* CONFIG_GNRC_IPV6_NIB_6LN */
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
case NDP_OPT_RDNSS:
|
||||
next_timeout = _min(_handle_rdnsso(netif,
|
||||
(icmpv6_hdr_t *)rtr_adv,
|
||||
@ -1346,7 +1346,7 @@ void _handle_search_rtr(gnrc_netif_t *netif)
|
||||
#endif /* !GNRC_IPV6_NIB_CONF_NO_RTR_SOL */
|
||||
}
|
||||
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
static void _handle_rdnss_timeout(sock_udp_ep_t *dns_server)
|
||||
{
|
||||
memset(dns_server, 0, sizeof(sock_udp_ep_t));
|
||||
@ -1364,7 +1364,7 @@ static void _handle_mtuo(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
|
||||
}
|
||||
}
|
||||
|
||||
#if GNRC_IPV6_NIB_CONF_DNS
|
||||
#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_DNS)
|
||||
static uint32_t _handle_rdnsso(gnrc_netif_t *netif, const icmpv6_hdr_t *icmpv6,
|
||||
const ndp_opt_rdnss_impl_t *rdnsso)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user