diff options
author | Ivo Calado <ivocalado@embedded.ufcg.edu.br> | 2010-10-11 20:40:04 +0200 |
---|---|---|
committer | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2010-10-12 06:57:42 +0200 |
commit | d196c9a5d4e150cdff675662214c80c69b906958 (patch) | |
tree | 0819ea92cdfe9c2ae9716a3eef920849a98c01b9 /net/dccp/options.c | |
parent | baf9e782e1dc4991edecfa3b8700cf8739c40259 (diff) |
dccp: generalise data-loss condition
This patch generalises the task of determining data loss from RFC 4340, 7.7.1.
Let S_A, S_B be sequence numbers such that S_B is "after" S_A, and let
N_B be the NDP count of packet S_B. Then, using modulo-2^48 arithmetic,
D = S_B - S_A - 1 is an upper bound of the number of lost data packets,
D - N_B is an approximation of the number of lost data packets
(there are cases where this is not exact).
The patch implements this as
dccp_loss_count(S_A, S_B, N_B) := max(S_B - S_A - 1 - N_B, 0)
Signed-off-by: Ivo Calado <ivocalado@embedded.ufcg.edu.br>
Signed-off-by: Erivaldo Xavier <desadoc@gmail.com>
Signed-off-by: Leandro Sales <leandroal@gmail.com>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/options.c')
0 files changed, 0 insertions, 0 deletions