Subject: Re: hton64
To: Bill Studenmund <>
From: Chris G. Demetriou <>
List: current-users
Date: 06/28/1997 00:18:13
> But I'd vote for us adding them. I think they will be useful (isn't IPv6
> going to some huge address size?), and we could help set a standard.
> I'd actually vote that we move towards numbering, as ntohl & ntohs
> implicitly assume that a long is 32 bits and a short is 16. Shouldn't
> htonl really convert whatever a "long" is from NBO to HBO, even if a long
> is 64 bits?

better yet: create generic byte-in-Nbyteinteger swap functions.  Then
define ntoh* and hton* to use them, if appropriate for the port.

Lots of things want to byte swap integers, regardless of the
network-order-ness of the data involved.  (think: file systems!)