2017-01-11 11:54:53 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 Freie Universität Berlin
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-12-14 16:28:58 +01:00
|
|
|
* @defgroup net_gnrc_ipv6_nib_conf GNRC IPv6 NIB compile configurations
|
2017-01-11 11:54:53 +01:00
|
|
|
* @ingroup net_gnrc_ipv6_nib
|
2019-12-06 12:23:34 +01:00
|
|
|
* @ingroup net_gnrc_conf
|
2017-06-12 00:49:07 +02:00
|
|
|
* @brief Configuration macros for neighbor information base
|
2017-01-11 11:54:53 +01:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
2017-06-12 00:49:07 +02:00
|
|
|
* @brief Configuration macro definitions for neighbor information base
|
2017-01-11 11:54:53 +01:00
|
|
|
*
|
|
|
|
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
|
|
|
|
*/
|
|
|
|
#ifndef NET_GNRC_IPV6_NIB_CONF_H
|
|
|
|
#define NET_GNRC_IPV6_NIB_CONF_H
|
|
|
|
|
2020-03-11 17:38:03 +01:00
|
|
|
#include <kernel_defines.h>
|
|
|
|
|
2017-01-11 11:54:53 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2017-06-10 22:48:44 +02:00
|
|
|
/* some pseudo-module based configuration, doc: see below */
|
|
|
|
#ifdef MODULE_GNRC_IPV6_NIB_6LBR
|
2020-03-11 17:38:03 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_6LBR
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_6LBR 1
|
2017-06-10 22:48:44 +02:00
|
|
|
#endif
|
2020-03-12 14:04:20 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_SLAAC
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_SLAAC 1
|
2019-01-19 11:15:38 +01:00
|
|
|
#endif
|
2020-03-12 17:15:47 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_NUMOF
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_NUMOF (16)
|
2017-08-09 16:30:23 +02:00
|
|
|
#endif
|
2017-06-10 22:48:44 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MODULE_GNRC_IPV6_NIB_6LR
|
2020-03-12 12:15:26 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_6LR
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_6LR 1
|
2017-06-10 22:48:44 +02:00
|
|
|
#endif
|
2020-03-12 14:04:20 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_SLAAC
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_SLAAC 0
|
2017-06-10 22:48:44 +02:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MODULE_GNRC_IPV6_NIB_6LN
|
2020-03-12 13:33:35 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_6LN
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_6LN 1
|
2017-06-10 22:48:44 +02:00
|
|
|
#endif
|
2020-03-12 14:04:20 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_SLAAC
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_SLAAC 0
|
2017-06-10 22:48:44 +02:00
|
|
|
#endif
|
2020-03-12 14:09:10 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_QUEUE_PKT
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_QUEUE_PKT 0
|
2017-06-10 22:48:44 +02:00
|
|
|
#endif
|
2020-03-12 12:15:26 +01:00
|
|
|
#if !CONFIG_GNRC_IPV6_NIB_6LR
|
2020-03-12 15:48:08 +01:00
|
|
|
# ifndef CONFIG_GNRC_IPV6_NIB_ARSM
|
|
|
|
# define CONFIG_GNRC_IPV6_NIB_ARSM 0
|
2017-06-10 22:48:44 +02:00
|
|
|
# endif
|
2020-03-12 17:15:47 +01:00
|
|
|
# ifndef CONFIG_GNRC_IPV6_NIB_NUMOF
|
2017-06-10 22:48:44 +02:00
|
|
|
/* only needs to store default router */
|
2020-03-12 17:15:47 +01:00
|
|
|
# define CONFIG_GNRC_IPV6_NIB_NUMOF (1)
|
2017-06-10 22:48:44 +02:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef MODULE_GNRC_IPV6_NIB_ROUTER
|
2020-03-12 13:50:13 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_ROUTER 1
|
2017-06-10 22:48:44 +02:00
|
|
|
#endif
|
|
|
|
|
2018-02-26 17:34:43 +01:00
|
|
|
#ifdef MODULE_GNRC_IPV6_NIB_DNS
|
2020-03-12 15:53:47 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_DNS 1
|
2018-02-26 17:34:43 +01:00
|
|
|
#endif
|
|
|
|
|
2017-01-11 11:54:53 +01:00
|
|
|
/**
|
|
|
|
* @name Compile flags
|
|
|
|
* @brief Compile flags to (de-)activate certain features for NIB
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @brief enable features for 6Lo border router
|
|
|
|
*/
|
2020-03-11 17:38:03 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_6LBR
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_6LBR 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief enable features for 6Lo router
|
|
|
|
*/
|
2020-03-12 12:15:26 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_6LR
|
2020-03-11 17:38:03 +01:00
|
|
|
#if CONFIG_GNRC_IPV6_NIB_6LBR
|
2020-03-12 12:15:26 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_6LR 1
|
2017-01-11 11:54:53 +01:00
|
|
|
#else
|
2020-03-12 12:15:26 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_6LR 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief enable features for 6Lo node
|
|
|
|
*/
|
2020-03-12 13:33:35 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_6LN
|
2020-03-12 12:15:26 +01:00
|
|
|
#if CONFIG_GNRC_IPV6_NIB_6LR
|
2020-03-12 13:33:35 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_6LN 1
|
2017-01-11 11:54:53 +01:00
|
|
|
#else
|
2020-03-12 13:33:35 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_6LN 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief enable features for IPv6 routers
|
|
|
|
*/
|
2020-03-12 13:50:13 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_ROUTER
|
2020-03-12 12:15:26 +01:00
|
|
|
#if CONFIG_GNRC_IPV6_NIB_6LR
|
2020-03-12 13:50:13 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_ROUTER 1
|
2017-01-11 11:54:53 +01:00
|
|
|
#else
|
2020-03-12 13:50:13 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_ROUTER 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief (de-)activate router advertising at interface start-up
|
|
|
|
*/
|
2020-03-12 15:58:39 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_ADV_ROUTER
|
2020-03-12 13:50:13 +01:00
|
|
|
#if CONFIG_GNRC_IPV6_NIB_ROUTER && \
|
2020-03-12 12:15:26 +01:00
|
|
|
(!CONFIG_GNRC_IPV6_NIB_6LR || CONFIG_GNRC_IPV6_NIB_6LBR)
|
2020-03-12 15:58:39 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_ADV_ROUTER 1
|
2017-01-11 11:54:53 +01:00
|
|
|
#else
|
2020-03-12 15:58:39 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_ADV_ROUTER 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief (de-)activate NDP address resolution state-machine
|
|
|
|
*/
|
2020-03-12 15:48:08 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_ARSM
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_ARSM 1
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief queue packets for address resolution
|
|
|
|
*/
|
2020-03-12 14:09:10 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_QUEUE_PKT
|
2020-03-12 13:33:35 +01:00
|
|
|
#if CONFIG_GNRC_IPV6_NIB_6LN
|
2020-03-12 14:09:10 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_QUEUE_PKT 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#else
|
2020-03-12 14:09:10 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_QUEUE_PKT 1
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief handle NDP messages according for stateless address
|
|
|
|
* auto-configuration (if activated on interface)
|
|
|
|
*
|
|
|
|
* @see [RFC 4862](https://tools.ietf.org/html/rfc4862)
|
|
|
|
*/
|
2020-03-12 14:04:20 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_SLAAC
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_SLAAC 1
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief handle Redirect Messages
|
|
|
|
*/
|
2020-03-12 16:02:35 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_REDIRECT
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_REDIRECT 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief (de-)activate destination cache
|
|
|
|
*/
|
2020-03-12 16:09:12 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_DC
|
2020-03-12 16:02:35 +01:00
|
|
|
#if CONFIG_GNRC_IPV6_NIB_REDIRECT
|
2020-03-12 16:09:12 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_DC 1
|
2017-01-11 11:54:53 +01:00
|
|
|
#else
|
2020-03-12 16:09:12 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_DC 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2018-02-26 17:34:43 +01:00
|
|
|
/**
|
|
|
|
* @brief Support for DNS configuration options
|
|
|
|
*
|
|
|
|
* @see [RFC 8106](https://tools.ietf.org/html/rfc8106)
|
|
|
|
*/
|
2020-03-12 15:53:47 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_DNS
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_DNS 0
|
2018-02-26 17:34:43 +01:00
|
|
|
#endif
|
|
|
|
|
2017-01-11 11:54:53 +01:00
|
|
|
/**
|
|
|
|
* @brief Multihop prefix and 6LoWPAN context distribution
|
|
|
|
*
|
|
|
|
* @see [RFC 6775, section 8.1](https://tools.ietf.org/html/rfc6775#section-8.1)
|
|
|
|
*/
|
2020-03-12 17:07:17 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C
|
2020-03-12 12:15:26 +01:00
|
|
|
#if CONFIG_GNRC_IPV6_NIB_6LR
|
2020-03-12 17:07:17 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C 1
|
2017-08-09 16:30:23 +02:00
|
|
|
#else
|
2020-03-12 17:07:17 +01:00
|
|
|
#define CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
2017-08-09 16:30:23 +02:00
|
|
|
#endif
|
2017-01-11 11:54:53 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Multihop duplicate address detection
|
|
|
|
*
|
|
|
|
* @see [RFC 6775, section 8.2](https://tools.ietf.org/html/rfc6775#section-8.2)
|
|
|
|
*/
|
2020-03-12 16:14:26 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_MULTIHOP_DAD 0
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Reset time in milliseconds for the reachability time
|
|
|
|
*
|
|
|
|
* @see [RFC 4861, section 6.3.4](https://tools.ietf.org/html/rfc4861#section-6.3.4)
|
|
|
|
*/
|
2020-03-12 17:19:08 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_REACH_TIME_RESET
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_REACH_TIME_RESET (7200000U)
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
|
2018-08-06 14:47:01 +02:00
|
|
|
/**
|
|
|
|
* @brief Disable router solicitations
|
|
|
|
*
|
|
|
|
* @warning Only do this if you know what you're doing
|
|
|
|
*/
|
2020-03-12 17:12:07 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_NO_RTR_SOL
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_NO_RTR_SOL 0
|
2018-08-06 14:47:01 +02:00
|
|
|
#endif
|
|
|
|
|
2017-01-11 11:54:53 +01:00
|
|
|
/**
|
|
|
|
* @brief Maximum link-layer address length (aligned)
|
|
|
|
*/
|
2017-07-31 17:51:20 +02:00
|
|
|
#ifndef GNRC_IPV6_NIB_L2ADDR_MAX_LEN
|
|
|
|
#define GNRC_IPV6_NIB_L2ADDR_MAX_LEN (8U)
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Number of default routers in the default router list.
|
|
|
|
*
|
2017-06-21 17:10:30 +02:00
|
|
|
* @attention This number has direct influence on the maximum number of
|
|
|
|
* default routers
|
2017-01-11 11:54:53 +01:00
|
|
|
*/
|
|
|
|
#ifndef GNRC_IPV6_NIB_DEFAULT_ROUTER_NUMOF
|
|
|
|
#define GNRC_IPV6_NIB_DEFAULT_ROUTER_NUMOF (1)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Number of entries in NIB
|
|
|
|
*
|
2017-06-21 17:10:30 +02:00
|
|
|
* @attention This number has direct influence on the maximum number of
|
|
|
|
* neighbors and duplicate address detection table entries
|
2017-01-11 11:54:53 +01:00
|
|
|
*/
|
2020-03-12 17:15:47 +01:00
|
|
|
#ifndef CONFIG_GNRC_IPV6_NIB_NUMOF
|
|
|
|
#define CONFIG_GNRC_IPV6_NIB_NUMOF (4)
|
2017-01-11 11:54:53 +01:00
|
|
|
#endif
|
|
|
|
|
2017-06-20 10:23:20 +02:00
|
|
|
/**
|
|
|
|
* @brief Number of off-link entries in NIB
|
|
|
|
*
|
|
|
|
* @attention This number is equal to the maximum number of forwarding table
|
|
|
|
* and prefix list entries in NIB
|
|
|
|
*/
|
|
|
|
#ifndef GNRC_IPV6_NIB_OFFL_NUMOF
|
|
|
|
#define GNRC_IPV6_NIB_OFFL_NUMOF (8)
|
|
|
|
#endif
|
|
|
|
|
2020-03-12 17:07:17 +01:00
|
|
|
#if CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C || defined(DOXYGEN)
|
2017-06-28 19:18:48 +02:00
|
|
|
/**
|
|
|
|
* @brief Number of authoritative border router entries in NIB
|
|
|
|
*/
|
|
|
|
#ifndef GNRC_IPV6_NIB_ABR_NUMOF
|
|
|
|
#define GNRC_IPV6_NIB_ABR_NUMOF (1)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2017-01-11 11:54:53 +01:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* NET_GNRC_IPV6_NIB_CONF_H */
|
|
|
|
/** @} */
|