Date: Wed, 14 Sep 2011 11:25:49 +0000 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: FreeBSD Arch <freebsd-arch@freebsd.org> Subject: Re: ntohq/htonq? Message-ID: <2333.1315999549@critter.freebsd.dk> In-Reply-To: Your message of "Tue, 13 Sep 2011 19:36:49 MST." <306FD881-6140-4DE2-AFF1-95C8079E4187@xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <306FD881-6140-4DE2-AFF1-95C8079E4187@xcllnt.net>, Marcel Moolenaar writes: >Is there a reason not to add ntohq and htonq to the short >and long versions we (and everyone else) already has? > >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? I prefer the explicit encode/decode functions in <sys/endian.h> because they don't need to be arch specific and they don't make assumptions about alignment. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2333.1315999549>