From owner-freebsd-arch@FreeBSD.ORG Wed Sep 14 17:15:01 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 2C673106564A; Wed, 14 Sep 2011 17:15:01 +0000 (UTC) (envelope-from marcel@xcllnt.net) Received: from mail.xcllnt.net (mail.xcllnt.net [70.36.220.4]) by mx1.freebsd.org (Postfix) with ESMTP id E83A08FC15; Wed, 14 Sep 2011 17:15:00 +0000 (UTC) Received: from sa-nc-common4-116.static.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mail.xcllnt.net (8.14.5/8.14.5) with ESMTP id p8EHEkdF086007 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 14 Sep 2011 10:14:53 -0700 (PDT) (envelope-from marcel@xcllnt.net) Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=iso-8859-1 From: Marcel Moolenaar In-Reply-To: <201109141230.51827.jhb@freebsd.org> Date: Wed, 14 Sep 2011 10:14:48 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <306FD881-6140-4DE2-AFF1-95C8079E4187@xcllnt.net> <201109140747.21979.jhb@freebsd.org> <201109141230.51827.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1244.3) Cc: freebsd-arch@freebsd.org Subject: Re: ntohll/htonll? [was: 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 17:15:01 -0000 [changing subject to tie *ll to *q for search purposes] On Sep 14, 2011, at 9:30 AM, John Baldwin wrote: > On Wednesday, September 14, 2011 10:39:31 am Warner Losh wrote: >>=20 >> hton64/ntoh64 is what Linux has in the kernel. htonll and ntohll is = what Solaris and AIX have. >>=20 >> So (1) I'd shy away from htonq since that's not as well established = as the other two in the OS >> (although googling suggests that many programs use it). (2) I'd = provide both htonll and hton64 >> with a note saying that hton128 is the wave of the future. >=20 > Actually, come to think of it, we use *ll rather than *q variants here = at work > as well. I'd vote for (2). The only problem I'm facing is that htonq/ntohq are well-established and heavily used within Junos. They are even exposed in the SDK. So, while I don't mind taking a slightly different route, I do need to deal with compatibility. But if I need to do that, then there's also no real reason anymore to add a 64-bit variant to FreeBSD. I need to see what is possible... Anyway: I sense a preference for a numerical suffix over any single or multi-letter suffix. --=20 Marcel Moolenaar marcel@xcllnt.net