Subject: Re: hton64
To: Todd Vierling <firstname.lastname@example.org>
From: Bill Studenmund <email@example.com>
Date: 06/26/1997 09:58:12
On Wed, 25 Jun 1997, Todd Vierling wrote:
> On Wed, 25 Jun 1997, Jason Thorpe wrote:
> : > I'm helping port the Appleshare IP stuff to netbsd (it's a patched
> : > netatalk), and it needs hton64 & ntoh64. Rather than impliment them just
> : > in netatalk, I'm wondering if we could add them to -current?
> : What else uses them? Are they a good general-purpose thing?
> That I know of, nothing, but they would be useful down the line if you need
> to have an arch-independent structure with a 64 bit size integer--like a
> Sounds good to me, but I'd prefer 'htonq' and 'ntohq' to follow the existing
> letter-based system. (And #define them in netatalk to make the existing
> code work.)
They (ntoh64 & hton64) are only used in a few places. In fact, only one
file. So for now they go into the file.
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?
As a compromise, how about we make both letter and number names, and
recomend people migrate towards the numbers. ??