openthread_sys

Function otSrpServerParseSubTypeServiceName

Source
pub unsafe extern "C" fn otSrpServerParseSubTypeServiceName(
    aSubTypeServiceName: *const c_char,
    aLabel: *mut c_char,
    aLabelSize: u8,
) -> otError
Expand description

Parses a sub-type service name (full name) and extracts the sub-type label.

The full service name for a sub-type service follows “._sub...”.

@param[in] aSubTypeServiceName A sub-type service name (full name). @param[out] aLabel A pointer to a buffer to copy the extracted sub-type label. @param[in] aLabelSize Maximum size of @p aLabel buffer.

@retval OT_ERROR_NONE Name was successfully parsed and @p aLabel was updated. @retval OT_ERROR_NO_BUFS The sub-type label could not fit in @p aLabel buffer (number of chars from label that could fit are copied in @p aLabel ensuring it is null-terminated). @retval OT_ERROR_INVALID_ARGS @p aSubTypeServiceName is not a valid sub-type format.