From owner-freebsd-arch@FreeBSD.ORG Wed Sep 14 12:51:32 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 A00421065673 for ; Wed, 14 Sep 2011 12:51:32 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 64E908FC14 for ; Wed, 14 Sep 2011 12:51:31 +0000 (UTC) Received: from critter.freebsd.dk (critter-phk.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 82F285DC8; Wed, 14 Sep 2011 12:51:30 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id p8EBPn8H002334; Wed, 14 Sep 2011 11:25:49 GMT (envelope-from phk@phk.freebsd.dk) To: Marcel Moolenaar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 13 Sep 2011 19:36:49 MST." <306FD881-6140-4DE2-AFF1-95C8079E4187@xcllnt.net> Content-Type: text/plain; charset=ISO-8859-1 Date: Wed, 14 Sep 2011 11:25:49 +0000 Message-ID: <2333.1315999549@critter.freebsd.dk> Cc: FreeBSD Arch 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 12:51:32 -0000 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 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.