pub unsafe extern "C" fn coap_opt_remove(
pkt: *mut coap_pkt_t,
optnum: u16,
) -> ssize_t
Expand description
@brief Removes an option previously added with function in [the coap_opt_add_…() group](@ref net_nanocoap_opt_add)
@param[in] pkt Packet to remove option from. @param[in] optnum Option number of the option to remove. If the option appears more than once, the first occurrence will be removed
@pre pkt != NULL @pre The packet was finished using @ref coap_opt_finish() and any payload is in its final configuration.
@return The new size of the packet with option of number @p optnum removed. In turn this means if there is no such option in the packet, the original size of the packet will be removed. @return -EINVAL if there was a parsing error for the existing options