27#ifdef MODULE_GNRC_IPV6_NIB
38#define GNRC_NETIF_PKTQ_DEQUEUE_MSG (0x1233)
58#if IS_USED(MODULE_GNRC_NETIF_IPV6) || DOXYGEN
94int gnrc_netif_ipv6_addr_add_internal(
gnrc_netif_t *netif,
96 unsigned pfx_len, uint8_t flags);
108void gnrc_netif_ipv6_addr_remove_internal(
gnrc_netif_t *netif,
138static inline uint8_t gnrc_netif_ipv6_addr_get_state(
const gnrc_netif_t *netif,
154static inline uint8_t gnrc_netif_ipv6_addr_dad_trans(
const gnrc_netif_t *netif,
249int gnrc_netif_ipv6_group_join_internal(
gnrc_netif_t *netif,
262void gnrc_netif_ipv6_group_leave_internal(
gnrc_netif_t *netif,
291static inline void gnrc_netif_ipv6_bus_post(
gnrc_netif_t *netif,
int type,
294#ifdef MODULE_GNRC_NETIF_BUS
318static inline bool gnrc_netif_is_rtr(
const gnrc_netif_t *netif)
320 if (
IS_USED(MODULE_GNRC_IPV6_ROUTER)) {
341static inline bool gnrc_netif_is_rtr_adv(
const gnrc_netif_t *netif)
343 if (
IS_USED(MODULE_GNRC_IPV6_ROUTER)) {
379static inline bool gnrc_netif_is_6lo(
const gnrc_netif_t *netif)
382 IS_USED(MODULE_GNRC_SIXLOWPAN)) || \
383 IS_USED(MODULE_GNRC_SIXLOENC)) {
384 return gnrc_netif_dev_is_6lo(netif);
408static inline bool gnrc_netif_is_6ln(
const gnrc_netif_t *netif)
432static inline bool gnrc_netif_is_6lr(
const gnrc_netif_t *netif)
436 (
IS_USED(MODULE_GNRC_IPV6_ROUTER) ||
438 !
IS_USED(MODULE_GNRC_SIXLOWPAN))) {
439 return gnrc_netif_is_rtr(netif) && gnrc_netif_is_6ln(netif);
460static inline bool gnrc_netif_is_6lbr(
const gnrc_netif_t *netif)
464 gnrc_netif_is_6lr(netif);
514int gnrc_netif_eui64_from_addr(const
gnrc_netif_t *netif,
515 const uint8_t *addr,
size_t addr_len,
535#if GNRC_NETIF_L2ADDR_MAXLEN > 0
537 return gnrc_netif_eui64_from_addr(netif,
538 netif->l2addr, netif->l2addr_len,
555#if IS_USED(MODULE_GNRC_NETIF_IPV6) || defined(DOXYGEN)
588int gnrc_netif_ipv6_iid_from_addr(const
gnrc_netif_t *netif,
589 const uint8_t *addr,
size_t addr_len,
616static inline
int gnrc_netif_ipv6_iid_to_addr(const
gnrc_netif_t *netif,
617 const
eui64_t *iid, uint8_t *addr)
644#if GNRC_NETIF_L2ADDR_MAXLEN > 0
646 return gnrc_netif_ipv6_iid_from_addr(netif,
683static inline int gnrc_netif_ndp_addr_len_from_l2ao(
gnrc_netif_t *netif,
705static inline int gnrc_netif_ipv6_group_to_l2_group(
gnrc_netif_t *netif,
734 uint32_t valid, uint32_t pref);
736#define gnrc_netif_ipv6_init_mtu(netif) (void)netif
737#define gnrc_netif_ipv6_iid_from_addr(netif, addr, addr_len, iid) (-ENOTSUP)
738#define gnrc_netif_ipv6_iid_to_addr(netif, iid, addr) (-ENOTSUP)
739#define gnrc_netif_ndp_addr_len_from_l2ao(netif, opt) (-ENOTSUP)
740#define gnrc_netif_ipv6_get_iid(netif, iid) (-ENOTSUP)
741#define gnrc_netif_ipv6_group_to_l2_group(netif, ipv6_group, l2_group) (-ENOTSUP)
#define assert(cond)
abort the program if assertion is false
Common macros and compiler attributes/pragmas configuration.
#define ACCESS(mode, ptr_idx, size_idx)
Emit an attribute (if supported by the compiler) that declares how a function will access its paramet...
#define GNRC_NETIF_FLAGS_IPV6_RTR_ADV
Network interface advertises itself as an IPv6 router (implies GNRC_NETIF_FLAGS_IPV6_FORWARDING to be...
#define GNRC_NETIF_FLAGS_HAS_L2ADDR
Network interface has link-layer address.
#define GNRC_NETIF_FLAGS_6LO_ABR
This interface acts as a 6Lo border router to the LLN.
#define GNRC_NETIF_FLAGS_IPV6_FORWARDING
Network interface is enabled for IPv6 forwarding.
#define GNRC_NETIF_FLAGS_6LN
This interface represents a 6Lo node (6LN) according to RFC 6775.
#define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_TENTATIVE
Tentative states (with encoded DAD retransmissions)
#define GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_MASK
Mask for the address' state.
Definition for GNRC's network interfaces.
#define ENOTSUP
Not supported (may be the same value as [EOPNOTSUPP]).
#define CONFIG_GNRC_IPV6_NIB_6LBR
enable features for 6Lo border router
#define CONFIG_GNRC_IPV6_NIB_6LR
enable features for 6Lo router
#define CONFIG_GNRC_IPV6_NIB_6LN
enable features for 6Lo node
static bool gnrc_netif_highlander(void)
Check if there can only be one gnrc_netif_t interface.
@ GNRC_NETIF_BUS_IPV6
provides gnrc_ipv6_event_t messages to subscribers
int l2util_ndp_addr_len_from_l2ao(int dev_type, const ndp_opt_t *opt)
Derives the length of the link-layer address in an NDP link-layer address option from that option's l...
int l2util_ipv6_iid_to_addr(int dev_type, const eui64_t *iid, uint8_t *addr)
Converts an IPv6 IID to a hardware address.
int l2util_ipv6_group_to_l2_group(int dev_type, const ipv6_addr_t *ipv6_group, uint8_t *l2_group)
Converts an IPv6 multicast address to a multicast address of the respective link layer.
netopt_t
Global list of configuration options available throughout the network stack, e.g.
Configuration macro definitions for neighbor information base.
Link-layer helper function definitions.
Common macros and compiler attributes/pragmas configuration.
#define IS_USED(module)
Checks whether a module is being used or not.
#define IS_ACTIVE(macro)
Allows to verify a macro definition outside the preprocessor.
static int msg_bus_post(msg_bus_t *bus, uint8_t type, const void *arg)
Post a message to a bus.
Definition of global configuration options.
uint8_t addrs_flags[CONFIG_GNRC_NETIF_IPV6_ADDRS_NUMOF]
Flags for gnrc_netif_t::ipv6_addrs.
Representation of a network interface.
msg_bus_t bus[GNRC_NETIF_BUS_NUMOF]
Event Message Bus.
uint32_t flags
Flags for the interface.
uint8_t device_type
Device type.
uint8_t l2addr_len
Length in bytes of gnrc_netif_t::l2addr.
uint8_t l2addr[GNRC_NETIF_L2ADDR_MAXLEN]
The link-layer address currently used as the source address on this interface.
gnrc_netif_ipv6_t ipv6
IPv6 component.
General NDP option format.
Data type to represent an EUI-64.
Data type to represent an IPv6 address.