Subject: Re: hton64
To: Chris G. Demetriou <cgd@pa.dec.com>
From: Matt Thomas <matt@3am-software.com>
List: current-users
Date: 06/28/1997 09:54:39
At 12:18 AM 6/28/97 -0700, Chris G. Demetriou wrote:
>> 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.

Hear.  Hear.  Think of MD5 needing to byte swap on big-endian platforms.

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

(being able to mount Sun FFS on i386 or the opposite.)
-- 
Matt Thomas               Internet:   matt@3am-software.com
3am Software Foundry      WWW URL:    http://www.3am-software.com/bio/matt.html
Westford, MA              Disclaimer: I disavow all knowledge of this message