Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Sep 2011 09:53:30 -0700
From:      Julian Elischer <julian@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        FreeBSD Arch <freebsd-arch@freebsd.org>, Marcel Moolenaar <marcel@xcllnt.net>
Subject:   Re: ntohq/htonq?
Message-ID:  <4E70DC0A.1010407@freebsd.org>
In-Reply-To: <D716EC90-B036-4D1A-9DD3-5C18E65DF386@bsdimp.com>
References:  <306FD881-6140-4DE2-AFF1-95C8079E4187@xcllnt.net> <D716EC90-B036-4D1A-9DD3-5C18E65DF386@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9/14/11 7:34 AM, Warner Losh wrote:
> Linux has hton64, but last time I checked it was kernel only.  NetBSD has talked about different flavors of hton64 or htonq, but it appears none made it into the tree.
>
> htonll is in both AIX and Solaris (well, OpenSolaris 2009.06).
>
> It isn't standardized, so the standards wonks will say "be sure not to pollute namespace with these if you implement them."
>
> If I was doing it, I'd be tempted to implement all three with two being simple aliases to the third canonical implementation, but I think that might get me shot when I posted the patch.  Nobody wants 1/3 of a baby.

what he said.. and I'd go further by making the numeric ones the base 
definitions.

there are also the types in BYTEORDER(9)  which use the numeric style  
if you want a precedence.


> Warner
>
>
> On Sep 13, 2011, at 9:36 PM, Marcel Moolenaar wrote:
>> All,
>>
>> Is there a reason not to add ntohq and htonq to the short
>> and long versions we (and everyone else) already has?
>>
>> Juniper has 64-bit entities that go over the wire in
>> network byte order and, while these macros are absolutely
>> arcane, I see no reason not to complete them with 64-bit
>> variants.
>>
>> I did some googling and htonq and ntohq seem to be de
>> facto names used, but oddly enough no OS has them defined.
>> It's surreal. Are there better alternatives we should
>> migrate to?
>>
>> -- 
>> Marcel Moolenaar
>> marcel@xcllnt.net
>>
>>
>> _______________________________________________
>> freebsd-arch@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
>> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
>>
>>
> _______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
>
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E70DC0A.1010407>