riot_sys

Function gnrc_netif_ipv6_add_prefix

Source
pub unsafe extern "C" fn gnrc_netif_ipv6_add_prefix(
    netif: *mut gnrc_netif_t,
    pfx: *const ipv6_addr_t,
    pfx_len: u8,
    valid: u32,
    pref: u32,
) -> c_int
Expand description

@brief Configures a prefix on a network interface.

     If the interface is a 6LoWPAN interface, this will also
     take care of setting up a compression context.

@param[in] netif Network interface the prefix should be added to @param[in] pfx Prefix to configure @param[in] pfx_len Length of @p pfx in bits @param[in] valid Valid lifetime of the prefix in seconds @param[in] pref Preferred lifetime of the prefix in seconds

@return >= 0, on success The returned value is the index of the newly created address based on the prefix and the interfaces IID in the interface’s address array. @return -ENOMEM, when no space for new addresses (or its solicited nodes multicast address) is left on the interface