Function openthread_sys::otIp6PrefixToString

source ·
pub unsafe extern "C" fn otIp6PrefixToString(
    aPrefix: *const otIp6Prefix,
    aBuffer: *mut c_char,
    aSize: u16,
)
Expand description

Converts a given IPv6 prefix to a human-readable string.

The IPv6 address string is formatted as “%x:%x:%x:…[::]/plen”.

If the resulting string does not fit in @p aBuffer (within its @p aSize characters), the string will be truncated but the outputted string is always null-terminated.

@param[in] aPrefix A pointer to an IPv6 prefix (MUST NOT be NULL). @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be NULL). @param[in] aSize The size of @p aBuffer (in bytes). Recommended to use OT_IP6_PREFIX_STRING_SIZE.