Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Mar 2011 11:26:12 -0500
From:      Frank Solensky <frank@solensky.org>
To:        freebsd-questions@freebsd.org
Subject:   Bit order == byte order??
Message-ID:  <910E776A-D865-4F78-8BE5-E974326636D0@solensky.org>

Next in thread | Raw E-Mail | Index | Archive | Help
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=



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?910E776A-D865-4F78-8BE5-E974326636D0>