Subject: byte order conversion (Re: 1.4A problem on 5000/200)
To: None <>
From: Izumi Tsutsui <>
List: port-pmax
Date: 04/16/1999 18:07:40 wrote:

> Loosely coupled with the issue, the byte order conversion, htonl,
> htons, ntohl, ntohs are misused by non-network portions of NetBSD
> kernel.  I think it would be good programming practice to have
> explicit #if BYTEORDER == ...  and bswap*() calls where the byte-order
> sensive data are manipulated rather than to run 'network byte order
> conversion' to solve byte orderness.

I think it is better to make new functions (or macros) which
convert the byte-order between host-endian and {big,lettle}-endian,
which were suggested by Lennart Augustsson on tech-kern in last December.
They would be required in some pci and usb device drivers and
better rather than to use many #ifdefs.
Izumi Tsutsui