[ntp:questions] new driver development

Terje Mathisen "terje.mathisen at tmsw.no" at ntp.org
Fri Mar 18 07:38:13 UTC 2011


Bruce Lilly wrote:
> 4. Assuming specific sizes for an integer is a really bad idea...
> "(64 bits making up the) clockTimeStamp* and receiveTimeStamp* fields"

Bruce, I tend to agree with your wish for totally separate drivers, but 
it is a fact of live around here that it is far, far simpler to get 
permission to add an extra mode to an existing driver.

I.e. using a flag1 value on the existing SHM driver to indicate that 
your version should be used instead is just another way to specify how 
ntp.conf should be parsed.

OTOH, re. fixed sizes for timestamp fields: This is NOT just a "good 
idea", it is an absolute requirement for all (binary) network-based 
protocols!

On the gripping hand, until quite recently the ntp timestamp processing 
code used 32-bit operations only, even on platforms that did support 
64-bit ints.

The key issue is that all network protocols  have code to take 
individual bytes in network order and merge/combine them into whatever 
the best local integer size happens to be.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"




More information about the questions mailing list