pub unsafe extern "C" fn coap_opt_put_block(
    buf: *mut u8,
    lastonum: u16,
    slicer: *mut coap_block_slicer_t,
    more: bool,
    option: u16
) -> size_t
Expand description

@name Functions – Options Write Buffer API

Write PDU Options directly to the array of bytes for a message.

The caller must provide the last option number written as well as the buffer position. The caller is primarily responsible for tracking and managing the space remaining in the buffer. / /@{*/ / @brief Insert block option into buffer

When calling this function to initialize a packet with a block option, the more flag must be set to prevent the creation of an option with a length too small to contain the size bit.

@param[out] buf buffer to write to @param[in] lastonum number of previous option, must be < @p option @param[in] slicer coap blockwise slicer helper struct @param[in] more more flag (1 or 0) @param[in] option option number (block1 or block2)

@returns amount of bytes written to @p buf