riot_sys::bindgen

Function l2util_eui64_from_addr

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

@brief Converts a given hardware address to an EUI-64.

@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] eui64 The EUI-64 based on gnrc_netif_t::device_type

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