Proposal - drop the GPSD JSON driver

Eric S. Raymond esr at thyrsus.com
Thu Oct 20 11:11:20 UTC 2016


Gary E. Miller <gem at rellim.com>:
> Oh, please not!  That is one of the big problems in the existing driver.
> Way too compiler, CPU and OS dependent.  Plus not extensible.  The
> exsting C struct has been nothing but problems.  Maybe you don't buy into
> JSON, but the C struct is a non-starter.

Way too compiler, CPU and OS dependent?

Dependent on lots of things, but important variables (endianness,
word length, CPU, OS) are coupled on either side because the sending and
receiving processes are running in the same memory space on the same hardware.

I can see a theoretical possibility that we could get messed over if
ntpd and its symbiont were built with different compilers.  But ntpd
convinces me this is not a problem in practice; look at the old
version of struct pkt.  Turns out ntpd got away for over a quarter
century with the assumption that, on every host, struct fields are
self-alligned with minimal padding. So much for that supposed variable
(yes, this surprised me too).

Plus not extensible?

As Hal points out, if you version-number the struct properly you can add
fields at the end ad libitum.

The existing C struct has been nothing but problems?  OK, list them for me.
I'm not seeing it.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 811 bytes
Desc: not available
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20161020/0197fb44/attachment.bin>


More information about the devel mailing list