riot_sys

Function l2util_ipv6_iid_from_addr

Source
pub unsafe extern "C" fn l2util_ipv6_iid_from_addr(
    dev_type: c_int,
    addr: *const u8,
    addr_len: size_t,
    iid: *mut eui64_t,
) -> c_int
Expand description

@brief Converts a given hardware address to an IPv6 IID.

@attention When the link-layer of the interface has link-layer addresses, and NDEBUG is not defined, the node fails with an assertion instead returning -ENOTSUP.

@param[in] dev_type The network device type of the device @p addr came from (either because it is the configured address of the device or from a packet that came over it). @param[in] addr A hardware address. @param[in] addr_len Number of bytes in @p addr. @param[out] iid The IID based on gnrc_netif_t::device_type

@return sizeof(eui64_t) on success. @return -ENOTSUP, when @p dev_type does not support IID conversion. @return -EINVAL, when @p addr_len is invalid for the @p dev_type.