Count the number of correctly received UDP packets.
Keep track of the number of correct, non-replayed UDP packets that have been received, regardless of their content. This can be compared to the sequence number to determine the real packet loss.
This commit is contained in:
parent
b50a92d0c3
commit
eef25266cb
5 changed files with 9 additions and 0 deletions
|
|
@ -486,6 +486,10 @@ static bool sptps_receive_data_datagram(sptps_t *s, const char *data, size_t len
|
|||
if(seqno > s->inseqno)
|
||||
s->inseqno = seqno + 1;
|
||||
|
||||
if(!s->inseqno)
|
||||
s->received = 0;
|
||||
else
|
||||
s->received++;
|
||||
|
||||
// Decrypt.
|
||||
cipher_set_counter(&s->incipher, &seqno, sizeof seqno);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue