Report packets that are out of order, either because of reordering or
packet loss.
// Otherwise, continue processing.
len = 0;
}
// Otherwise, continue processing.
len = 0;
}
+ } else {
+#if UTCP_DEBUG
+ int32_t rcv_offset = seqdiff(hdr.seq, c->rcv.nxt);
+
+ if(rcv_offset) {
+ debug(c, "packet out of order, offset %u bytes", rcv_offset);
+ }
+
+ if(rcv_offset >= 0) {
+ c->rcv.nxt = hdr.seq + len;
+ }
+
+#endif
}
c->snd.wnd = hdr.wnd; // TODO: move below
}
c->snd.wnd = hdr.wnd; // TODO: move below