Skip to main content

validate_ulpfec_scheme

Function validate_ulpfec_scheme 

Source
pub fn validate_ulpfec_scheme(
    packets: &[&[ProtectionLevel]],
) -> Result<(), UlpfecError>
Expand description

Check the mask rules of RFC 5109 7.4 that relate the FEC packets of one group.

packets holds the levels of each FEC packet, level 0 first.

  • Rule a. A media packet is protected at most once at each level above 0. At level 0 it may be protected by several FEC packets when their level-0 protection lengths are equal.
  • Rule b. A media packet protected at level p is protected at level p - 1, in this or another FEC packet of the group.

Rule c is not checked here because it cannot be broken: a FEC packet’s levels are a list.