summaryrefslogtreecommitdiff
path: root/sources.h
diff options
context:
space:
mode:
authorVincent Blut <vincent.debian@free.fr>2016-12-09 23:43:31 +0100
committerVincent Blut <vincent.debian@free.fr>2016-12-09 23:43:31 +0100
commit134fb69072f998f489b020c4eabe0e99ac8fa2ac (patch)
tree6c3393c756f96699c4dbbbae1d09ddbbd1ee5015 /sources.h
parent53e3fdbcd5a0daa3dba21532d87fe65c048a9dd9 (diff)
New upstream version 3.0-pre1
Diffstat (limited to 'sources.h')
-rw-r--r--sources.h39
1 files changed, 7 insertions, 32 deletions
diff --git a/sources.h b/sources.h
index 4187d13..9acf98b 100644
--- a/sources.h
+++ b/sources.h
@@ -34,6 +34,7 @@
#include "ntp.h"
#include "reports.h"
+#include "sourcestats.h"
/* Size of the source reachability register */
#define SOURCE_REACH_BITS 8
@@ -73,18 +74,8 @@ extern void SRC_ResetInstance(SRC_Instance instance);
/* Function to change the sources's reference ID and IP address */
extern void SRC_SetRefid(SRC_Instance instance, uint32_t ref_id, IPAddr *addr);
-/* Function to get the range of frequencies, relative to the given
- source, that we believe the local clock lies within. The return
- values are in terms of the number of seconds fast (+ve) or slow
- (-ve) relative to the source that the local clock becomes after a
- given amount of local time has elapsed.
-
- Suppose the initial offset relative to the source is U (fast +ve,
- slow -ve) and a time interval T elapses measured in terms of the
- local clock. Then the error relative to the source at the end of
- the interval should lie in the interval [U+T*lo, U+T*hi]. */
-
-extern void SRC_GetFrequencyRange(SRC_Instance instance, double *lo, double *hi);
+/* Function to get access to the sourcestats instance */
+extern SST_Stats SRC_GetSourcestats(SRC_Instance instance);
/* This function is called by one of the source drivers when it has
a new sample that is to be accumulated.
@@ -114,7 +105,7 @@ extern void SRC_GetFrequencyRange(SRC_Instance instance, double *lo, double *hi)
*/
-extern void SRC_AccumulateSample(SRC_Instance instance, struct timeval *sample_time, double offset, double peer_delay, double peer_dispersion, double root_delay, double root_dispersion, int stratum, NTP_Leap leap_status);
+extern void SRC_AccumulateSample(SRC_Instance instance, struct timespec *sample_time, double offset, double peer_delay, double peer_dispersion, double root_delay, double root_dispersion, int stratum, NTP_Leap leap_status);
/* This routine sets the source as receiving reachability updates */
extern void SRC_SetActive(SRC_Instance inst);
@@ -143,34 +134,18 @@ extern void SRC_ReselectSource(void);
/* Set reselect distance */
extern void SRC_SetReselectDistance(double distance);
-/* Predict the offset of the local clock relative to a given source at
- a given local cooked time. Positive indicates local clock is FAST
- relative to reference. */
-extern double SRC_PredictOffset(SRC_Instance inst, struct timeval *when);
-
-/* Return the minimum peer delay amongst the previous samples
- currently held in the register */
-extern double SRC_MinRoundTripDelay(SRC_Instance inst);
-
-/* This routine determines if a new sample is good enough that it should be
- accumulated */
-extern int SRC_IsGoodSample(SRC_Instance inst, double offset, double delay, double max_delay_dev_ratio, double clock_error, struct timeval *when);
-
extern void SRC_DumpSources(void);
-
extern void SRC_ReloadSources(void);
+extern void SRC_RemoveDumpFiles(void);
extern int SRC_IsSyncPeer(SRC_Instance inst);
extern int SRC_IsReachable(SRC_Instance inst);
extern int SRC_ReadNumberOfSources(void);
extern int SRC_ActiveSources(void);
-extern int SRC_ReportSource(int index, RPT_SourceReport *report, struct timeval *now);
+extern int SRC_ReportSource(int index, RPT_SourceReport *report, struct timespec *now);
-extern int SRC_ReportSourcestats(int index, RPT_SourcestatsReport *report, struct timeval *now);
+extern int SRC_ReportSourcestats(int index, RPT_SourcestatsReport *report, struct timespec *now);
extern SRC_Type SRC_GetType(int index);
-extern int SRC_Samples(SRC_Instance inst);
-
#endif /* GOT_SOURCES_H */
-