Function openthread_sys::otIp4CidrToString

source ·
pub unsafe extern "C" fn otIp4CidrToString(
    aCidr: *const otIp4Cidr,
    aBuffer: *mut c_char,
    aSize: u16,
)
Expand description

Converts the IPv4 CIDR to a string.

The string format uses quad-dotted notation of four bytes in the address with the length of prefix (e.g., “127.0.0.1/32”).

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] aCidr A pointer to an IPv4 CIDR (MUST NOT be NULL). @param[out] aBuffer A pointer to a char array to output the string (MUST NOT be nullptr). @param[in] aSize The size of @p aBuffer (in bytes).