• Gerrit Renker's avatar
    dccp ccid-3: Fix error in loss detection · 2013c7e3
    Gerrit Renker authored
    The TFRC loss detection code used the wrong loss condition (RFC 4340, 7.7.1):
     * the difference between sequence numbers s1 and s2 instead of 
     * the number of packets missing between s1 and s2 (one less than the distance).
    
    Since this condition appears in many places of the code, it has been put into a
    separate function, dccp_loss_free().
    
    Further changes:
    ----------------
     * tidied up incorrect typing (it was using `int' for u64/s64 types);
     * optimised conditional statements for common case of non-reordered packets;
     * rewrote comments/documentation to match the changes.
    Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
    2013c7e3
packet_history.c 13.8 KB