[Git][NTPsec/ntpsec][master] Explain the decision nor to split the ttl field for refclocks.
Eric S. Raymond
gitlab at mg.gitlab.com
Fri Feb 3 04:17:16 UTC 2017
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
21b762d9 by Eric S. Raymond at 2017-02-02T23:17:06-05:00
Explain the decision nor to split the ttl field for refclocks.
Addresses RFE #173 on GitLab.
- - - - -
1 changed file:
- include/ntp.h
Changes:
=====================================
include/ntp.h
=====================================
--- a/include/ntp.h
+++ b/include/ntp.h
@@ -247,6 +247,11 @@ typedef struct __endpt {
* The peer structure. Holds state information relating to the guys
* we are peering with. Most of this stuff is from section 3.2 of the
* spec.
+ *
+ * The ttl field is overloaded; it's used in the refclock case to pass
+ * in a mode byte that may contain a baud rate or subtype. Splitting
+ * this fields would complicate some call sequences that are already
+ * unpleasantly intricate.
*/
struct peer {
struct peer *p_link; /* link pointer in free & peer lists */
@@ -268,7 +273,7 @@ struct peer {
uint8_t cast_flags; /* additional flags */
uint8_t last_event; /* last peer error code */
uint8_t num_events; /* number of error events */
- uint32_t ttl; /* ttl/refclock mode */
+ uint32_t ttl; /* time-to-live/refclock mode */
/*
* Variables used by reference clock support
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/21b762d966cf3607875db60870b375005a39db61
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170203/c0f0e1f7/attachment.html>
More information about the vc
mailing list