#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_lorawan_defrag_fragment(
session: *mut PamojaLorawanDefrag,
n: u16,
fragment: *const u8,
fragment_len: usize,
out_done: *mut u8,
) -> PamojaStatusExpand description
Takes one fragment of a session.
§Arguments
session- the session.n- which fragment, counting from one.fragment- its bytes.fragment_len- how many, which must be at least the session’s fragment size.out_done- receives1once the block is whole.
§Returns
PamojaStatus::Ok on success.
§Errors
Returns PamojaStatus::InvalidArgument for a fragment outside the session, and
PamojaStatus::Other when more fragments were lost than there is room to solve for.
§Safety
session must be a live handle, fragment must point to fragment_len readable bytes,
and out_done must be writable.