[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: openntpd and ntpq



On Thu, Sep 02, 2004 at 10:35:54AM +0200, Siegbert Marschall wrote:
> 
> read and learn.
>

At the risk of extending this thread... that's just a little trite.

I had read the code it was simply that the ntoh was not where I 
expected it.  Yes, I should have grepped, that was my error.  The
idea of storing things in structures used internally in network
order is slightly unusual, it works if you are really really careful
about doing the conversion every time.  If it were me, I would do the
conversion to/from wire format when handling the packet - which is
the only place it is required and keep the integers in host format so
if someone naively used the integer elsewhere they would get the correct
value.

-- 
Brett Lymn