riot_sys

Function l2util_addr_to_str

Source
pub unsafe extern "C" fn l2util_addr_to_str(
    addr: *const u8,
    addr_len: size_t,
    out: *mut c_char,
) -> *mut c_char
Expand description

@brief Converts a hardware address to a human readable string.

@details The format will be like xx:xx:xx:xx where xx are the bytes of @p addr in hexadecimal representation.

@pre (out != NULL) && ((addr != NULL) || (addr_len == 0)) @pre @p out MUST have allocated at least 3 * @p addr_len bytes.

@param[in] addr A hardware address. @param[in] addr_len Length of @p addr. @param[out] out A string to store the output in. Must at least have 3 * @p addr_len bytes allocated.

@return @p out.