[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: openntpd and ntpq
On Mon, Sep 06, 2004 at 12:28:13AM -0600, Theo de Raadt wrote:
>
> Keep in network byte order until later. Having structures which are
> obviously on-the-wire order swap back and forth just creates more
> chances for error.
Agreed - but you really need to make it obvious that the structures are
in wire order. The author may find it easy to distinguish but making
it obvious would help someone else trying to maintain the code.
> You don't see people byte swapping IP addresses
> in sockaddr's after getting them back from accept(), after all.
True... but you rarely do numerical operations on IP addreses.
--
Brett Lymn