riot_sys::bindgen

Function l2util_ipv6_iid_to_addr

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

@brief Converts an IPv6 IID to a hardware address

@pre @p iid was based on a hardware address @pre The number of bytes available at @p addr is less or equal to @ref L2UTIL_ADDR_MAX_LEN.

@attention When NDEBUG is not defined, the node fails with an assertion instead of returning -ENOTSUP

@param[in] dev_type The network device type of the device the @p iid came from (either because it is based on the configured address of the device or from a packet that came over it). @param[in] iid An IID based on @p dev_type. @param[out] addr The hardware address. It is assumed that @p iid was based on a hardware address and that the available number of bytes in @p addr are greater or equal to @ref L2UTIL_ADDR_MAX_LEN.

@return Length of resulting @p addr on success. @return -ENOTSUP, when @p dev_type does not support reverse IID conversion.