Skip to main content

Module nak

Module nak 

Source
Expand description

NAK (Negative Acknowledgement / Loss Report) control packet — draft-sharabayko-srt-01 §3.2.5, Figure 14, and the loss-list coding of Appendix A.

The CIF is a sequence of 31-bit sequence-number entries: a single lost packet (top bit clear), or a range [a, b] encoded as two consecutive entries — a with its top bit set, b with its top bit clear (Appendix A, Figures 21/22).

NakPacket::raw_loss_list is kept as a borrowed byte slice (the same lazy-loop convention dvb-si uses for descriptor loops) rather than eagerly decoded into an owned list — walk it with NakPacket::entries.

Structs§

LossListIter
Iterator over a NAK loss list’s decoded entries. See NakPacket::entries.
NakPacket
NAK control packet (§3.2.5, Figure 14).

Enums§

LossListEntry
One decoded entry of a NAK loss list (Appendix A). Data-carrying ADT — not a spec/field label, so it is exempt from the name()/Display convention (see tests/label_coverage.rs).

Functions§

build_loss_list
Build the raw loss-list bytes for a NAK CIF from decoded entries (Appendix A). Inverse of NakPacket::entries.