From 6d324bbb750fa23a8197b8ff11c49645b2a988fd Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Wed, 28 Nov 2018 16:12:45 +0100 Subject: [PATCH] gnrc_netif: introduce `is_6lo()` as alias to `is_6ln()` Preparation step to introduce a semantic difference between an interface being a 6Lo interface and a 6LN according to RFC 6775 [[1]] (i.e. performs Neighbor Discovery as defined there). [1]: https://tools.ietf.org/html/rfc6775#section-2 --- sys/include/net/gnrc/netif/internal.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/include/net/gnrc/netif/internal.h b/sys/include/net/gnrc/netif/internal.h index fcbd6ec50d..c8b78cb3c2 100644 --- a/sys/include/net/gnrc/netif/internal.h +++ b/sys/include/net/gnrc/netif/internal.h @@ -329,6 +329,22 @@ static inline bool gnrc_netif_is_rtr_adv(const gnrc_netif_t *netif) #define gnrc_netif_is_rtr_adv(netif) (false) #endif +/** + * @brief Checks if the interface uses a protocol that requires 6Lo to run + * + * @attention Requires prior locking + * @note Assumed to be true, when @ref GNRC_NETIF_NUMOF == 1 and + * @ref net_gnrc_sixlowpan module is included (and + * @ref GNRC_IPV6_NIB_CONF_6LN is not 0, otherwise assumed to be + * false). + * + * @param[in] netif the network interface + * + * @return true, if the interface represents a 6LN + * @return false, if the interface does not represent a 6LN + */ +#define gnrc_netif_is_6lo(netif) gnrc_netif_is_6ln(netif) + /** * @brief Checks if the interface represents a 6Lo node (6LN) according to * RFC 6775