[ntp:questions] Looking for clean C source code of algorithms in RFC 1305

Micky guuwwe at hotmail.com
Tue Sep 30 21:05:02 UTC 2008

On Sep 30, 4:38 pm, David Woolley
<da... at ex.djwhome.demon.co.uk.invalid> wrote:
> Micky wrote:
> > The C source code for clock selection algorithms included in RFC 1305
> RFC 1305 should be considered obsolete, even though it's replacement is
> still in draft.  The replacement is unlikely to help you any more,
> except that it does match the implementation of NTP that has been
> current for several years now.
> I thought there was only pseudo code in RFC 1305, not C code.

 It has both.

> > is not very clean. The inputs are not well defined, global variables
> > with plenty of side effects, etc. You really have to dig through the
> > whole document to make sense out of it and I do not have the time for
> > it.
> My gut feeling is that RFC 1305 is unnecessarily difficult to read,
> partly because it tries to be written for mathematicians, not for
> software developers.  However, I doubt that anything easier to read
> exists.  If it does, I imagince it is covered by commercial confidentiality.

  The issue is not whether it is easy or difficult to read. The issue
   that you are forced to read it and you should not have to.
   The algorithm should be self-contained with well defined input
   and well defined output. You should not have to spend your time
   to figure out how a bunch of global C variables are related to
   the data received in each response.

More information about the questions mailing list