encode: fragment MF flag
Closed this issue · 2 comments
yoursunny commented
As of 09c2bb0, MF flag in ndn-riot fragmentation header has ambiguous interpretations.
ndn_fragmenter_fragment
function sets MF flag to 1 on the last fragment:
if (is_last)
fragmented[0] |= NDN_FRAG_MF_MASK;
ndn_frag_assembler_assemble_frag
function expects MF flag to be 0 on the last fragment:
uint8_t mf = frag[0] & NDN_FRAG_MF_MASK;
if (mf == 0) {
assembler->is_finished = 1;
}
It’s necessary to define the fragmentation protocol in the wiki, and then update implementation accordingly.
tianyuan129 commented
Thanks for pointing out the MF flag interpretation problem. bc40bb5 will address this issue. Fragmentation protocol's definition is added to the wiki page now.
yoursunny commented
Great. NFD Feature 4814 is to add the same fragmentation to NFD, enabling interop.