How not to design a wire protocol
Gary E. Miller
gem at rellim.com
Thu Mar 7 20:13:38 UTC 2019
Yo Richard!
On Thu, 7 Mar 2019 13:50:20 -0600
Richard Laager via devel <devel at ntpsec.org> wrote:
> On 3/7/19 1:22 PM, Gary E. Miller via devel wrote:
> > Yo Richard!
> >
> > On Thu, 7 Mar 2019 11:06:58 -0600
> > Richard Laager via devel <devel at ntpsec.org> wrote:
> >
> >> On 3/7/19 12:56 AM, Eric S. Raymond via devel wrote:
> >>> JSON is C is normally *very* awkward, vastly worse than Go,
> >>> because full JSON parse needs to do fancy dancing with dynamic
> >>> memory to handle heterogenous arrays. The good news is that I ran
> >>> into this problem back in 2009 on GPSD, solved it then and spun
> >>> it out as a little library, microjson.
> >>
> >> ntpsec is already using (and embedding) libjsmn, right?
> >
> > Sadly so. I'd like to see it converted to microjson.
> Is microjson something I can dynamically link against, or is it embed
> only?
I'm not sure what you 'can' do. But the default is to embed microjson
in gpsd and libjsmn in ntpd.
> There's an outstanding item on my TODO list to investigate packaging
> libjsmn separately for Debian and modifying ntpsec to dynamically link
> against it. The Debian security team, in general, frowns on embedded
> libraries, as it is a mess if there is a security bug in a library
> which is commonly embedded.
I'm all for not embedding, but I'd prefer microjson over libjsmn.
RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
gem at rellim.com Tel:+1 541 382 8588
Veritas liberabit vos. -- Quid est veritas?
"If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20190307/24949019/attachment.bin>
More information about the devel
mailing list