Function openthread_sys::otIp6SockAddrToString
source · pub unsafe extern "C" fn otIp6SockAddrToString(
aSockAddr: *const otSockAddr,
aBuffer: *mut c_char,
aSize: u16,
)
Expand description
Converts a given IPv6 socket address to a human-readable string.
The IPv6 socket address string is formatted as [address
]:port
where address
is shown
as 16 hex values separated by :
and port
is the port number in decimal format,
for example “[%x:%x:…:%x]:%u”.
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] aSockAddr A pointer to an IPv6 socket address (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_SOCK_ADDR_STRING_SIZE
.