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

next in thread | previous in thread | raw e-mail | index | archive | help
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.

Warner


On Sep 13, 2011, at 9:36 PM, Marcel Moolenaar wrote:
> All,
>=20
> Is there a reason not to add ntohq and htonq to the short
> and long versions we (and everyone else) already has?
>=20
> 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.
>=20
> 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?
>=20
> --=20
> Marcel Moolenaar
> marcel@xcllnt.net
>=20
>=20
> _______________________________________________
> 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"
>=20
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D716EC90-B036-4D1A-9DD3-5C18E65DF386>