pub unsafe extern "C" fn gnrc_ipv6_nib_nc_set(
    ipv6: *const ipv6_addr_t,
    iface: c_uint,
    l2addr: *const u8,
    l2addr_len: size_t
) -> c_int
Expand description

@brief Adds an unmanaged neighbor entry to NIB

@pre ipv6 != NULL @pre l2addr_len <= CONFIG_GNRC_IPV6_NIB_L2ADDR_MAX_LEN @pre (iface > KERNEL_PID_UNDEF) && (iface <= KERNEL_PID_LAST)

@param[in] ipv6 The neighbor’s IPv6 address. @param[in] iface The interface to the neighbor. @param[in] l2addr The neighbor’s L2 address. @param[in] l2addr_len Length of @p l2addr.

A neighbor cache entry created this way is marked as persistent. Also, a non-persistent neighbor or destination cache entry already in the NIB might be removed to make room for the new entry. If an entry pointing to the same IPv6 address as @p ipv6 exists already it will be overwritten and marked as unmanaged.

If @ref CONFIG_GNRC_IPV6_NIB_ARSM == 0 @p l2addr and @p l2addr_len won’t be set and @p ipv6 must be a link-local address.

@return 0 on success. @return -ENOMEM, if no space is left in neighbor cache. @return -EINVAL, if @p ipv6 is invalid (i.e. @ref CONFIG_GNRC_IPV6_NIB_ARSM == 0 and @p ipv6 is not link-local).