Update comments referencing RFC 1305

This commit is contained in:
Miroslav Lichvar 2014-10-13 12:49:40 +02:00
parent 8fbfe55e92
commit 2c033989b6
6 changed files with 5 additions and 12 deletions

View file

@ -1071,7 +1071,7 @@ REF_GetReferenceParams
*ref_id = LOCAL_REFERENCE_ID; *ref_id = LOCAL_REFERENCE_ID;
/* Make the reference time be now less a second - this will /* Make the reference time be now less a second - this will
scarcely affect the client, but will ensure that the transmit scarcely affect the client, but will ensure that the transmit
timestamp cannot come before this (which would cause test 6 to timestamp cannot come before this (which would cause test 7 to
fail in the client's read routine) if the local system clock's fail in the client's read routine) if the local system clock's
read routine is broken in any way. */ read routine is broken in any way. */
*ref_time = *local_time; *ref_time = *local_time;

View file

@ -848,9 +848,7 @@ SRC_SelectSource(SRC_Instance updated_inst)
sel_prefer = 0; sel_prefer = 0;
} }
/* Now find minimum stratum. If none are left now, /* Now find minimum stratum. If none are left now, tough. */
tough. RFC1305 is not so harsh on pruning sources due to
excess variance, which prevents this from happening */
index = sel_sources[0]; index = sel_sources[0];
min_stratum = sources[index]->sel_info.stratum; min_stratum = sources[index]->sel_info.stratum;

View file

@ -104,7 +104,7 @@ extern void SRC_GetFrequencyRange(SRC_Instance instance, double *lo, double *hi)
indicates that the local clock is FAST relative to it. indicates that the local clock is FAST relative to it.
root_delay and root_dispersion are in seconds, and are as per root_delay and root_dispersion are in seconds, and are as per
RFC1305. root_dispersion only includes the peer's root dispersion RFC 5905. root_dispersion only includes the peer's root dispersion
+ local sampling precision + skew dispersion accrued during the + local sampling precision + skew dispersion accrued during the
measurement. It is the job of the source statistics algorithms + measurement. It is the job of the source statistics algorithms +
track.c to add on the extra dispersion due to the residual standard track.c to add on the extra dispersion due to the residual standard

View file

@ -119,8 +119,7 @@ struct SST_Stats_Record {
sample times. In this module, we use the convention that sample times. In this module, we use the convention that
positive means the local clock is FAST of the source and negative positive means the local clock is FAST of the source and negative
means it is SLOW. This is contrary to the convention in the NTP means it is SLOW. This is contrary to the convention in the NTP
stuff; that part of the code is written to correspond with stuff. */
RFC1305 conventions. */
double offsets[MAX_SAMPLES * REGRESS_RUNS_RATIO]; double offsets[MAX_SAMPLES * REGRESS_RUNS_RATIO];
/* This is an array of the offsets as originally measured. Local /* This is an array of the offsets as originally measured. Local

View file

@ -55,10 +55,6 @@ extern void SST_ResetInstance(SST_Stats inst);
seconds. Positive indicates that the local clock if FAST (contrary seconds. Positive indicates that the local clock if FAST (contrary
to the NTP parts of the software) to the NTP parts of the software)
root_distance is the Lambda+Delta/2 term in RFC1305, but excluding
the extra dispersion due to the residual standard deviation after
we have done the regression fit.
stratum is the stratum of the source from which the sample came. stratum is the stratum of the source from which the sample came.
*/ */

2
util.c
View file

@ -549,7 +549,7 @@ UTI_DoubleToInt32(double x)
/* ================================================== */ /* ================================================== */
/* Seconds part of RFC1305 timestamp correponding to the origin of the /* Seconds part of NTP timestamp correponding to the origin of the
struct timeval format. */ struct timeval format. */
#define JAN_1970 0x83aa7e80UL #define JAN_1970 0x83aa7e80UL