Skip to main content

otMessageClone

Function otMessageClone 

Source
pub unsafe extern "C" fn otMessageClone(
    aMessage: *const otMessage,
) -> *mut otMessage
Expand description

Creates a clone of a given message.

The new message is allocated from the same message pool as @p aMessage. The entire message content from @p aMessage is copied to the new message.

The caller takes ownership of the returned message and must free it by calling otMessageFree() when it is no longer needed.

@param[in] aMessage A pointer to the message to clone.

@returns A pointer to the new message clone, or nullptr if no message buffers are available.