openthread_sys

Type Alias otCoapBlockwiseTransmitHook

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

Pointer is called before the next block in a block-wise transfer is sent.

Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled.

@param[in] aContext A pointer to application-specific context. @param[in,out] aBlock A pointer to where the block segment can be written to. @param[in] aPosition The position in a sequence from which to obtain the block segment. @param[in,out] aBlockLength On entry, the maximum block segment length in bytes. @param[out] aMore A pointer to the flag if more block segments will follow.

@warning By changing the value of aBlockLength, the block size of the whole exchange is renegotiated. It is recommended to do this after the first block has been received as later changes could cause problems with other CoAP implementations.

@retval OT_ERROR_NONE No error occurred. @retval OT_ERROR_INVALID_ARGS Block at @p aPosition does not exist.

Aliased Type§

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

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.