Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
ntpsec
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
NTPsec
ntpsec
Commits
9b3899c5
Commit
9b3899c5
authored
8 years ago
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
Convert libparse/README to asciidoc.
parent
1e14e64d
No related branches found
No related tags found
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libparse/README
+55
-61
55 additions, 61 deletions
libparse/README
with
55 additions
and
61 deletions
libparse/README
+
55
−
61
View file @
9b3899c5
PARSE reference clock driver:
= PARSE reference clock driver =
by Frank Kardel
This directory contains the files making up the parser for
the parse refclock driver. For reasonably sane clocks this refclock
...
...
@@ -8,66 +9,59 @@ support can run as low as 3k code with the parse refclock driver.
The structure of the parse reference clock driver is as follows:
ntpd - contains NTP implementation and calls a reference clock
127.127.8.x which is implemented by
refclock_parse.c
- which contains several refclock decriptions. These are
selected by the x part of the refclock address.
The lower two bits specify the device to use. Thus the
value (x % 4) determines the device to open
(/dev/refclock-0 - /dev/refclock-3).
The kind of clock is selected by the mode parameter. This parameter
selects the clock type which deterimines how I/O is done,
the tty parameters and the NTP parameters.
refclock_parse operates on an abstract reference clock
that delivers time stamps and statuses. Offsets and sychron-
isation information is derived from this data and passed
on to refclock_receive of ntpd which uses that data for
syncronisation.
The abstract reference clock is generated by the parse*
routines. They parse the incoming data stream from the
clock and convert it to the appropriate time stamps.
The data is also mapped into the abstract clock states
POWERUP - clock has no valid phase and time code
information
NOSYNC - Time code is not confirmed, phase is probably
ok.
SYNC - Time code and phase are correct.
A clock is trusted for a certain time (type parameter) when
it leaves the SYNC state. This is derived from the
observation that quite a few clocks can still generate good
time code information when losing contact to their
synchronisation source. When the clock does not reagain
synchronisation in that trust period it will be deemed
unsynchronised until it regains synchronisation. The same
will happen if xntp sees the clock unsynchronised at
startup.
The upper bit of x specifies that all samples delivered
from the clock should be used to discipline the NTP
loopfilter. For clock with accurate once a second time
information this means big improvements for time keeping.
A prerequisite for passing on the time stamps to
the loopfilter is that the clock is in synchronised state.
parse.c These are the general routines to parse the incoming data
stream. Usually these routines should not require
modification.
clk_*.c These files hold the conversion code for the time stamps
and the description how the time code can be parsed and
where the time stamps are to be taken.
If you want to add a new clock type, this is the file
you need to write in addition to mentioning it in
parse_conf.c and setting up the NTP and TTY parameters
in refclock_parse.c.
ntpd contains the contains NTP implementation and calls a reference
clock 127.127.8.x which is implemented by refclock_parse.c, which
contains several refclock decriptions. These are selected by the x
part of the refclock address. The lower two bits specify the device
to use. Thus the value (x % 4) determines the device to open
(/dev/refclock-0 - /dev/refclock-3).
The kind of clock is selected by the mode parameter. This parameter
selects the clock type which determines how I/O is done, the tty
parameters and the NTP parameters.
refclock_parse operates on an abstract reference clock that delivers
time stamps and statuses. Offsets and sychron- isation information is
derived from this data and passed on to refclock_receive of ntpd which
uses that data for syncronisation.
The abstract reference clock is generated by the parse* routines. They
parse the incoming data stream from the clock and convert it to the
appropriate time stamps. The data is also mapped into the abstract
clock states
POWERUP:: clock has no valid phase and time code information.
NOSYNC:: Time code is not confirmed, phase is probably OK.
SYNC:: Time code and phase are correct.
A clock is trusted for a certain time (type parameter) when it leaves
the SYNC state. This is derived from the observation that quite a few
clocks can still generate good time code information when losing
contact to their synchronisation source. When the clock does not
reagain synchronisation in that trust period it will be deemed
unsynchronised until it regains synchronisation. The same will happen
if ntpd sees the clock unsynchronised at startup.
The upper bit of x specifies that all samples delivered from the clock
should be used to discipline the NTP loopfilter. For clock with
accurate once a second time information this means big improvements
for time keeping. A prerequisite for passing on the time stamps to
the loopfilter is that the clock is in synchronised state.
Here is how to read the files in this (libparse) directory:
parse.c:: These are the general routines to parse the incoming data
stream. Usually these routines should not require
modification.
clk_*.c:: These files hold the conversion code for the time stamps and
the description how the time code can be parsed and where
the time stamps are to be taken. If you want to add a new
clock type, this is the file you need to write in addition
to mentioning it in parse_conf.c and setting up the NTP and
TTY parameters in refclock_parse.c.
Further information can be found in the various source files.
Frank Kardel
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment