From owner-freebsd-net@FreeBSD.ORG Tue Jun 22 22:17:01 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CC881065670 for ; Tue, 22 Jun 2010 22:17:01 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id F03708FC13 for ; Tue, 22 Jun 2010 22:17:00 +0000 (UTC) Received: from [32.177.5.176] ([32.177.5.176]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o5MMGoB9057964 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 22 Jun 2010 18:16:58 -0400 (EDT) (envelope-from rrs@lakerest.net) DKIM-Signature: a=rsa-sha1; c=simple/simple; d=lakerest.net; s=mail; t=1277245020; h=Cc:Message-Id:From:To:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mime-Version:Subject:Date:References: X-Mailer; b=lCD9Uu3y6mUsxgVSHTw7AVkrD43NcyCcdjOnpiYU1opt2lnnJYNeuwJ pigx08ikeT8kS362loa/pGIQnB+HuWA== Message-Id: <8D3FD4E4-B089-4081-837C-9C4D82DA141E@lakerest.net> From: Randall Stewart To: Max Laier In-Reply-To: <201006230001.17407.max@love2party.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Tue, 22 Jun 2010 18:16:43 -0400 References: <201006230001.17407.max@love2party.net> X-Mailer: Apple Mail (2.936) Cc: freebsd-net@freebsd.org Subject: Re: Observations from an old timer playing with 64 bit numbers... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2010 22:17:01 -0000 On Jun 22, 2010, at 6:01 PM, Max Laier wrote: > On Tuesday 22 June 2010 23:46:02 Randall Stewart wrote: >> Hi all: >> >> I have had some fun in my day job playing with exchanging 64bit >> numbers. Unfortunately >> there is no ntohll() OR htonll() which would be the logical thing >> (for >> us old farts) to use. >> >> Yes, I have found htobe64() and friends.. and that would work.. but I >> still cannot >> help but feeling we should have the ntohll() and htonll().. for >> consistency if nothing >> else. >> >> Any objections to this showing up in a head near you soon (speak soon >> or I will commit >> the patches to add these ;-D) > > Is there any precedence in other *BSDs or elsewhere? There is > already enough > difference in endian.h between the BSDs (OpenBSD has betohXX instead > of > beXXtoh) and it makes porting code difficult. I'd prefer to not add > gratuitous aliases for things that already have a well-known name. Max: Well well-known such things are not... otherwise I would not have been futzing around looking for it. Google showed nothing.. and finding the be64toh() took a while. The only thing the man page in ntohl shows is the 16/32 bit quantities and a nice disclaimer about conforming to POSIX - byteorder fun.. R > > Thanks, > Max > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell)