From owner-freebsd-arch@FreeBSD.ORG Wed Sep 14 16:53:09 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 434FA106564A for ; Wed, 14 Sep 2011 16:53:09 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 15AAB8FC14 for ; Wed, 14 Sep 2011 16:53:08 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p8EGqtLq032105 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 14 Sep 2011 09:53:01 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4E70DC0A.1010407@freebsd.org> Date: Wed, 14 Sep 2011 09:53:30 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.22) Gecko/20110902 Thunderbird/3.1.14 MIME-Version: 1.0 To: Warner Losh References: <306FD881-6140-4DE2-AFF1-95C8079E4187@xcllnt.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Arch , Marcel Moolenaar Subject: Re: ntohq/htonq? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Sep 2011 16:53:09 -0000 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" > >