|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: openntpd and ntpq
From: Brett Lymn (blymn
baesystems.com.au)
Date: Thu Sep 02 2004 - 21:07:01 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]