From owner-freebsd-questions@FreeBSD.ORG Thu Mar 3 16:39:43 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D09E6106564A for ; Thu, 3 Mar 2011 16:39:43 +0000 (UTC) (envelope-from frank@solensky.org) Received: from qmta08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by mx1.freebsd.org (Postfix) with ESMTP id 957C78FC1C for ; Thu, 3 Mar 2011 16:39:43 +0000 (UTC) Received: from omta11.westchester.pa.mail.comcast.net ([76.96.62.36]) by qmta08.westchester.pa.mail.comcast.net with comcast id EgSH1g0080mv7h058gSUkF; Thu, 03 Mar 2011 16:26:28 +0000 Received: from [192.168.30.12] ([66.129.232.2]) by omta11.westchester.pa.mail.comcast.net with comcast id EgSG1g02703ltHu3XgSKhs; Thu, 03 Mar 2011 16:26:25 +0000 From: Frank Solensky Content-Type: text/plain; charset=us-ascii X-Mailer: iPhone Mail (8C148) Message-Id: <910E776A-D865-4F78-8BE5-E974326636D0@solensky.org> Date: Thu, 3 Mar 2011 11:26:12 -0500 To: freebsd-questions@freebsd.org Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (iPhone Mail 8C148) Subject: Bit order == byte order?? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2011 16:39:43 -0000 In sys/netinet/ip.h, the first octet of the ip header structure tests the by= te ordering to determine the ordering of the header length (ip_hl) and versi= on (ip_v) fields. My question: that always works? While my reading of the language specificat= ion document leaves both the ordering of the bits within a byte and the byte= s within a longer field as implementation choices, the two are independent o= f each other. I haven't run into a CPU where this assumption was proven incorrect. It just= surprised me to see that recently=