riot_sys::bindgen

Function gnrc_netif_ipv6_addr_add_internal

Source
pub unsafe extern "C" fn gnrc_netif_ipv6_addr_add_internal(
    netif: *mut gnrc_netif_t,
    addr: *const ipv6_addr_t,
    pfx_len: c_uint,
    flags: u8,
) -> c_int
Expand description

@brief Adds an IPv6 address to the interface

@pre (netif != NULL) && (addr != NULL) @pre @p addr is not multicast (starts with ff00::/8), unspecified (::), or loopback @pre (pfx_len > 0) && (pfx_len <= 128)

@param[in,out] netif the network interface. Must not be NULL. @param[in] addr the address to add. If the address is already on the interface the function will return 0, but @p flags will be ignored. Must not be NULL or be a link-local or multicast address. @param[in] pfx_len length in bits of the prefix of @p addr @param[in] flags initial flags for the address. - Setting the address’ state to @ref GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_TENTATIVE means that this address is assumed to be added due to stateless auto-address configuration and actions related to that may be performed in the background. - Setting the address’ state to @ref GNRC_NETIF_IPV6_ADDRS_FLAGS_STATE_VALID means that the address is assumed to be manually configured and its prefix will be added to the node’s prefix list (valid and preferred lifetime will be set to infinite, but can be changed using @ref gnrc_ipv6_nib_pl_set()).

@note Only available with @ref net_gnrc_ipv6 “gnrc_ipv6”.

@return >= 0, on success @return -ENOMEM, when no space for new addresses (or its solicited nodes multicast address) is left on the interface