openthread_sys

Type Alias otCoapBlockwiseReceiveHook

Source
pub type otCoapBlockwiseReceiveHook = Option<unsafe extern "C" fn(aContext: *mut c_void, aBlock: *const u8, aPosition: u32, aBlockLength: u16, aMore: bool, aTotalLength: u32) -> otError>;
Expand description

Pointer is called when a CoAP message with a block-wise transfer option is received.

Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled.

@param[in] aContext A pointer to application-specific context. @param[in] aBlock A pointer to the block segment. @param[in] aPosition The position of @p aBlock in a sequence in bytes. @param[in] aBlockLength The length of the block segment in bytes. @param[in] aMore Flag if more block segments are following. @param[in] aTotalLength The total length in bytes of the transferred information (indicated by a Size1 or Size2 option).

@retval OT_ERROR_NONE Block segment was stored successfully. @retval OT_ERROR_NO_BUFS No more memory to store blocks. @retval OT_ERROR_NO_FRAME_RECEIVED Block segment missing.

Aliased Type§

enum otCoapBlockwiseReceiveHook {
    None,
    Some(unsafe extern "C" fn(_: *mut c_void, _: *const u8, _: u32, _: u16, _: bool, _: u32) -> u32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut c_void, _: *const u8, _: u32, _: u16, _: bool, _: u32) -> u32)

Some value of type T.