[DCCP]: Provide function for RTT sampling
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Tue, 20 Mar 2007 18:23:18 +0000 (15:23 -0300)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:27:00 +0000 (22:27 -0700)
commit4712a792ee661921374c163eb6a4d06e33fd305f
tree0c5ecf7973a195bff36101904417bb7b90fd18aa
parent0c150efb280986db7958cf2a559b91d826241e59
[DCCP]: Provide function for RTT sampling

A recurring problem, in particular in the CCID code, is that RTT samples
from packets with timestamp echo and elapsed time options need to be taken.

This service is provided via a new function dccp_sample_rtt in this patch.
Furthermore, to protect against `insane' RTT samples, the sampled value
is bounded between 100 microseconds and 4 seconds - for which u32 is sufficient.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/dccp.h
net/dccp/input.c